Back to Blog
Dialog maker free6/19/2023 ![]() Changed accessors for m_type - SetType and GetType - to public. ![]() Copy/paste-handling removed to a separate class ( CDiagramClipboardHandler) to allow several containers to share the same clipboard.All this to simplify deriving from CDiagramEntit圜ontainer. Moved the member function Find to the protected section. Added array accessors for derived classes. Made several undo- and copy/paste functions virtual.This is to redraw the editor properly after changes in the dialog in MDI-apps. Sending this window as a parent to the property dialog.Earlier, when loading a document, the scrollbars were not reset to 0,0. Set scrollbar positions to zero in Clear.Set interact mode to MODE_NONE after Ctrl+clicking item (to avoid undesired movement of lines).Added accessors for states to allow access for derived classes.Made some message mapping functions virtual to allow enhancements in derived classes.SendMessageToObjects sets the selected-flag to TRUE - sending the message only to selected objects.The documentation is updated accordingly, and the changes are: CDiagramEditor Other than that, I must admit that refactoring is a major hassle in MSVC++ 6.0, something I thought only wimps complained about earlier (have I been lucky in the small amount of refactoring necessary in my life up to this point?). I had to work around this by adding an explicit redraw-parent to CDiagramPropertyDlg and adding a new member Redraw that should be used instead of GetParent()->RedrawWindow() in derived classes for MDI-applications. Thus, the editor was not updated correctly when changes where made to the objects. It is accomplished by separating out the copy/paste-functionality from CDiagramEntit圜ontainer and putting it in a class of its own - CDiagramClipboardHandler.Įspecially irritating, while doing these modifications using a MDI-app as the host, was that even though property dialogs were created with the editor as the parent, the parent returned calling GetParent in the OnOK-handlers. The second modification is to be able to use CDiagramEditor in a MDI-application, where you might want to copy and paste objects across editors. Make it possible to use the same internal clipboard for several editors.Facilitate deriving from CDiagramEntit圜ontainer.Working intensely with the CDiagramEditor, I've made a few enhancements to the package, mainly to: CDiagramPropertyDlg - Pure virtual base class for object property dialogs.Īs it is quite a lot of code, I've added HTML-documentation with an overview of the classes, and a page of How-tos and class details for the bigger classes.CDiagramLine - A CDiagramEntity-derived class that can be used as a base class for line objects.CDiagramEntity - Base class for the drawing objects.CDiagramEntit圜ontainer - A container class for the editor data.The package consists of the following classes: The smaller one, DiagramEditorDemo, shows the basics, adding an editor to a dialog application.ĭialogEditorDemo is a SDI doc/view application showing how to use the separate data container class, how to plug into the document loading and saving, and using a factory to create the drawing objects, how to add print and print preview, custom background redraw, exporting, and much, much more. Of course, this package is fiendishly difficult to use? No, add an instance of CDiagramEditor to your app, derive the drawing classes you need, and you have an editor. Support for object-specific property dialogs.Īnd more. ![]()
0 Comments
Read More
Leave a Reply. |