JX Application Framework
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Friends | List of all members
JXWindowDirector Class Reference

#include <JXWindowDirector.h>

Inheritance diagram for JXWindowDirector:
[legend]

Public Member Functions

 JXWindowDirector (JXDirector *supervisor)
 
 ~JXWindowDirector () override
 
void Activate () override
 
bool Deactivate () override
 
void Suspend () override
 
void Resume () override
 
JXWindowGetWindow () const
 
JXDisplayGetDisplay () const
 
virtual const JStringGetName () const
 
virtual bool GetMenuIcon (const JXImage **icon) const
 
virtual bool NeedsSave () const
 
- Public Member Functions inherited from JXDirector
 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
 
- Public Member Functions inherited from JBroadcaster
 JBroadcaster ()
 
virtual ~JBroadcaster ()
 
JBroadcasteroperator= (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 ()
 
- Protected Member Functions inherited from JXDirector
JXDirectorGetSupervisor () const
 
bool CloseAllSubdirectors ()
 
virtual void DirectorClosed (JXDirector *theDirector)
 
- Protected Member Functions inherited from JBroadcaster
 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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ JXWindowDirector()

JXWindowDirector::JXWindowDirector ( JXDirector supervisor)

◆ ~JXWindowDirector()

JXWindowDirector::~JXWindowDirector ( )
override

Member Function Documentation

◆ Activate()

void JXWindowDirector::Activate ( )
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.

◆ Deactivate()

bool JXWindowDirector::Deactivate ( )
overridevirtual

Reimplemented from JXDirector.

◆ GetDisplay()

JXDisplay * JXWindowDirector::GetDisplay ( ) const

◆ GetMenuIcon()

bool JXWindowDirector::GetMenuIcon ( const JXImage **  icon) const
virtual

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.

◆ GetName()

const JString & JXWindowDirector::GetName ( ) const
virtual

Return a name for the director. The default is to use the window title.

Reimplemented in JXFileDocument.

◆ GetWindow()

JXWindow * JXWindowDirector::GetWindow ( ) const
inline

◆ NeedsSave()

bool JXWindowDirector::NeedsSave ( ) const
virtual

Only needed by JXDocuments.

Reimplemented in JXDocument, and JXFileDocument.

◆ OKToDeactivate()

bool JXWindowDirector::OKToDeactivate ( )
protectedvirtual

◆ Resume()

void JXWindowDirector::Resume ( )
overridevirtual

Reimplemented from JXDirector.

◆ Suspend()

void JXWindowDirector::Suspend ( )
overridevirtual

Reimplemented from JXDirector.

Friends And Related Symbol Documentation

◆ JXWindow

friend class JXWindow
friend

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