JX Application Framework
|
#include <JXWindowDirector.h>
Public Member Functions | |
JXWindowDirector (JXDirector *supervisor) | |
~JXWindowDirector () override | |
void | Activate () override |
bool | Deactivate () override |
void | Suspend () override |
void | Resume () override |
JXWindow * | GetWindow () const |
JXDisplay * | GetDisplay () const |
virtual const JString & | GetName () const |
virtual bool | GetMenuIcon (const JXImage **icon) const |
virtual bool | NeedsSave () const |
![]() | |
JXDirector (JXDirector *supervisor) | |
~JXDirector () override | |
bool | IsClosing () const |
virtual bool | Close () |
bool | IsActive () const |
bool | IsSuspended () const |
bool | HasSubdirectors () const |
bool | GetSubdirectors (const JPtrArray< JXDirector > **list) const |
![]() | |
JBroadcaster () | |
virtual | ~JBroadcaster () |
JBroadcaster & | operator= (const JBroadcaster &source) |
bool | HasSenders () const |
JSize | GetSenderCount () const |
bool | HasRecipients () const |
JSize | GetRecipientCount () const |
virtual JString | ToString () const |
template<class T > | |
void | ListenTo (const JBroadcaster *sender, const std::function< void(const T &)> &f) |
Protected Member Functions | |
virtual bool | OKToDeactivate () |
![]() | |
JXDirector * | GetSupervisor () const |
bool | CloseAllSubdirectors () |
virtual void | DirectorClosed (JXDirector *theDirector) |
![]() | |
JBroadcaster (const JBroadcaster &source) | |
void | ListenTo (const JBroadcaster *sender) |
void | StopListening (const JBroadcaster *sender) |
void | ClearWhenGoingAway (const JBroadcaster *sender, void *pointerToMember) |
void | StopListening (const JBroadcaster *sender, const std::type_info &messageType) |
template<class T > | |
void | Send (JBroadcaster *recipient, const T &message) |
template<class T > | |
void | Broadcast (const T &message) |
virtual void | Receive (JBroadcaster *sender, const Message &message) |
void | SendWithFeedback (JBroadcaster *recipient, Message *message) |
void | BroadcastWithFeedback (Message *message) |
virtual void | ReceiveWithFeedback (JBroadcaster *sender, Message *message) |
virtual void | ReceiveGoingAway (JBroadcaster *sender) |
Friends | |
class | JXWindow |
Maintains a window and only a window. If you need to maintain data as well, derive your class from JXDocument so you can override OKToClose() to give the user a chance to save the data before it is tossed. Close() does not call OKToDeactivate() because we assume that any information displayed in the window is either not supposed to be saved or has already been saved by the object calling Close(). If a JXDocument wants to display information in sub-windows, each of these sub-windows should be set to JXWindow::kDeactivateDirector so only the JXDocument will toss the sub-window. OKToDeactivate() checks that everything in the window is valid. The default is to check whether the object with focus is willing to unfocus. If this is not enough, the derived class can override the method.
JXWindowDirector::JXWindowDirector | ( | JXDirector * | supervisor | ) |
|
override |
|
overridevirtual |
We do not propagate the Activate message to subdirectors because each derived class must decide whether or not this is appropriate.
Reimplemented from JXDirector.
|
overridevirtual |
Reimplemented from JXDirector.
JXDisplay * JXWindowDirector::GetDisplay | ( | ) | const |
Return an icon to display in JXWDMenu.
Does not return JXImage* because that would force all derived classes to provide an icon, and many don't need it.
The client retains ownership of the JXImage.
Reimplemented in JXDocument.
|
virtual |
Return a name for the director. The default is to use the window title.
Reimplemented in JXFileDocument.
|
inline |
|
virtual |
Only needed by JXDocuments.
Reimplemented in JXDocument, and JXFileDocument.
|
protectedvirtual |
Check that the active object is willing to unfocus.
Reimplemented in JXChooseColorDialog, JXChooseFileDialog, JXChoosePathDialog, JXDocument, JXEPSPrintSetupDialog, JXGetNewDirDialog, JXModalDialogDirector, JXOpenDisplayDialog, JXPSPrintSetupDialog, JXPTPrintSetupDialog, and JXSaveFileDialog.
|
overridevirtual |
Reimplemented from JXDirector.
|
overridevirtual |
Reimplemented from JXDirector.
|
friend |