tbx
0.7.6
|
Helper classes to create a document based application. More...
Classes | |
class | DocCreator |
Templated class to provide information on a documents file type and how to create the document and its window. More... | |
class | DocCreatorBase |
Base class to help create a document and a window to show it in. More... | |
class | DocFileInfo |
Show the File information dialog box and automatically fill it in from the document in it's ancestor window. More... | |
class | DocIconbar |
Class to tie clicks and icon bar load events to document creation. More... | |
class | DocManager |
Class to manage all the documents. More... | |
class | DocModifiedChangedListener |
Listener for document modified state changed. More... | |
class | DocPositionWindow |
Class to reposition each newly opened document window so the titles don't overlap. More... | |
class | DocSaveAs |
Class to use save as dialogue box to save the document. More... | |
class | Document |
Base class for a document. More... | |
class | DocWindow |
Base class for the document window. More... | |
Helper classes to create a document based application.
The doc namespace provides helper classes to make it easy to produce a document editing application.
Using these classes means you can concentrate on application functionality as they handle all the plumbing for you.
e.g.
The main entry point to it then becomes
All that is then needed is to derive your document from tbx::doc::Document and overload the document_size, load(std::istream &is) and save(std::ostream &os) functions.
The window to display the document should be derived from tbx::doc::DocWindow and modified to show the data when it is created.
If more functionality is required from the iconbar you may want to derive a class from DocIconbar as well.
For this functionality to work you need to have the following resources.
Also you will want to create a icon bar menu with the Quit option on and a menu for the main window that has entries to show SaveAs and FileInfo.
Set the Doc... class descriptions for other settings needed for the resources.