tbx
0.7.3
|
Base class for the document window. More...
#include <docwindow.h>
Public Member Functions | |
DocWindow (Document *doc, std::string template_name) | |
Create the main window for a given document using a resource template. More... | |
virtual void | close_window (const tbx::EventInfo &close_event) |
Close window request from window. | |
void | dcs_discard (const tbx::EventInfo &info) |
Discard selected from DCS prompt so just delete the window. | |
void | dcs_save (const tbx::EventInfo &info) |
Save selected from the DCS prompt so show save window. | |
void | dcs_cancel (const tbx::EventInfo &info) |
Cancel selected from the DCS prompt so just delete dcs object. | |
Document * | document_interface () |
Return pointer to the document interface. | |
Document * | document_interface () const |
Return pointer to the document interface. | |
virtual void | document_modified_changed (Document *doc) |
Document modified flag has changed. | |
![]() | |
virtual | ~Listener () |
Destroy the listener object. | |
Static Public Member Functions | |
static Document * | document (tbx::Window window) |
Get the document showed by a window. | |
Protected Attributes | |
tbx::Window | _window |
Window showing document. | |
Document * | _document |
Document that is being shown. | |
Additional Inherited Members | |
![]() | |
Listener () | |
Construct the Listener object. | |
Base class for the document window.
This provides standard document window processing; Shows a "Discard/Cancel/Quit" dialogue if the document is modified when trying to close it. Updates the title to the file name and puts a "*" after it when it is modified.
It requires a Window resource (the template name is given in the constructor) that is an ancestor object/automatically shows and has the auto close flag unset.
For the DCS processing it needs a DCS resource called "DCS" For saving from the DCS it needs a SaveAs resource called "SaveAs"
tbx::doc::DocWindow::DocWindow | ( | Document * | doc, |
std::string | template_name | ||
) |