tbx  0.7.3
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
tbx::doc::DocWindow Class Reference

Base class for the document window. More...

#include <docwindow.h>

Inheritance diagram for tbx::doc::DocWindow:
tbx::doc::DocModifiedChangedListener tbx::CloseWindowListener tbx::DCSDiscardListener tbx::DCSSaveListener tbx::DCSCancelListener tbx::Listener tbx::Listener tbx::Listener tbx::Listener tbx::Listener

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.
 
Documentdocument_interface ()
 Return pointer to the document interface.
 
Documentdocument_interface () const
 Return pointer to the document interface.
 
virtual void document_modified_changed (Document *doc)
 Document modified flag has changed.
 
- Public Member Functions inherited from tbx::Listener
virtual ~Listener ()
 Destroy the listener object.
 

Static Public Member Functions

static Documentdocument (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

- Protected Member Functions inherited from tbx::Listener
 Listener ()
 Construct the Listener object.
 

Detailed Description

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"

Constructor & Destructor Documentation

tbx::doc::DocWindow::DocWindow ( Document doc,
std::string  template_name 
)

Create the main window for a given document using a resource template.

Parameters
docDocument to create the window for
template_namename of Window template in resources to use

The documentation for this class was generated from the following files: