I’m writing these problems caused by the features our software needs which are not straight in GoDiagram, but I think with the powerful and flexible design of GoDiagram, they can all be solved.
- Dividing GoView(or GoDocument) into several vertical regions
There should be a horizontal line drawn at the bottom edge of each region. And the region height can be changed by the user by dragging this line.
More importantly, GoObject objects in one region cannot be moved into another region.
So how to add the line : A kind of GoNode? or GoLink? or just draw it in GoView? How to make it draggable vertically? By adding GoHandles on it if it’s a GoObject object?
And how to constrain the objects in its own region: overriding DoInternalDrop? Any better solutions?
- Page and template
Page should follow a template in my software. The template should have margins, and a table at the right bottom corner of the page. GoObject objects cannot be moved to or dropped on margin areas or any other place outside of the page.
The table has a standard layout, such as title, date, etc. The table has no need to be editable, but it should be on the paper when the page is printed.
How to make the table: Drawing it in OnPaint of GoView? Making a GoObject for it?
How to constrain objects: GoSheet may be helpful, but margins of GoSheet belong to the GoDocument
object, which makes it a little difficult to constrain GoObjet
objects. I thinking overriding both DoExternalDrop and DoInternalDrop methods will solve this problem, at the same time overriding some other properties of GoView and GoDocument.
- Multiple pages
Because the page (template) size is fixed, when too many objects in a document (not GoDocument object), multiple pages will be used to display this document.
So how to realise multiple page feature?
Using multiple GoSheet objects in a single GoView object?
I’m not sure it’s possible to use multiple GoSheet objects in a single GoView.
Or using multiple GoDocument objects, with each for one page?