|
JX Application Framework
|
#include <JXDockManager.h>
Public Types | |
| enum | CloseDockMode { kCloseWindows , kUndockWindows } |
| enum | { kInvalidDockID = 0 } |
| enum | { kDNDMinSizeAtomIndex , kDNDWindowAtomIndex , kAtomCount } |
Public Member Functions | |
| JXDockManager (JXDisplay *display, const JString &title, JPrefsManager *prefsMgr=nullptr, const JPrefID &id=JFAID::kInvalidID) | |
| ~JXDockManager () override | |
| JXDockDirector * | CreateDock (const bool splitHoriz) |
| void | CloseAll () |
| bool | HasDocks () const |
| JPtrArray< JXDockDirector > * | GetDockList () const |
| bool | FindDock (const JIndex id, JXDockWidget **dock) |
| bool | IsLastDock (JXDockDirector *dock) const |
| virtual bool | CanDockAll () const |
| virtual void | DockAll () |
| bool | GetDefaultDock (const JUtf8Byte *windowType, JXDockWidget **dock) |
| void | SetDefaultDock (const JUtf8Byte *windowType, const JXDockWidget *dock) |
| bool | IsReadingSetup () const |
| void | ReadSetup (std::istream &input) |
| void | WriteSetup (std::ostream &output) const |
| void | SetIcon (JXImage *icon) |
| bool | CreateIcon (JXImage **icon) const |
| Atom | GetDNDMinSizeAtom () const |
| Atom | GetDNDWindowAtom () const |
| JIndex | GetUniqueDockID () |
| void | IDUsed (const JIndex id) |
| CloseDockMode | GetCloseDockMode () const |
| void | SetCloseDockMode (const CloseDockMode mode) |
Public Member Functions inherited from JXDirector | |
| JXDirector (JXDirector *supervisor) | |
| ~JXDirector () override | |
| bool | IsClosing () const |
| virtual bool | Close () |
| virtual void | Activate () |
| virtual bool | Deactivate () |
| bool | IsActive () const |
| virtual void | Suspend () |
| virtual void | Resume () |
| bool | IsSuspended () const |
| bool | HasSubdirectors () const |
| bool | GetSubdirectors (const JPtrArray< JXDirector > **list) const |
Public Member Functions inherited from JBroadcaster | |
| 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) |
Public Member Functions inherited from JPrefObject | |
| JPrefObject (JPrefsManager *prefsMgr, const JPrefID &id) | |
| virtual | ~JPrefObject () |
| bool | PrefInfoValid () const |
| bool | GetPrefInfo (JPrefsManager **mgr, JIndex *id) const |
| void | SetPrefInfo (JPrefsManager *prefsMgr, const JPrefID &id) |
| void | ReadPrefs () |
| void | WritePrefs () const |
Protected Member Functions | |
| void | DirectorClosed (JXDirector *theDirector) override |
| void | ReadPrefs (std::istream &input) override |
| void | WritePrefs (std::ostream &output) const override |
Protected Member Functions inherited from JXDirector | |
| JXDirector * | GetSupervisor () const |
| bool | CloseAllSubdirectors () |
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) |
This class is designed to be used as a global object. It maintains the list of active docking windows. Derived classes are responsible for calling Read/WritePrefs(). To do: support multiple displays
| JXDockManager::JXDockManager | ( | JXDisplay * | display, |
| const JString & | title, | ||
| JPrefsManager * | prefsMgr = nullptr, |
||
| const JPrefID & | id = JFAID::kInvalidID |
||
| ) |
|
override |
|
virtual |
Derived class should override this to return true if it implements DockAll().
| void JXDockManager::CloseAll | ( | ) |
| JXDockDirector * JXDockManager::CreateDock | ( | const bool | splitHoriz | ) |
|
overrideprotectedvirtual |
Listen for docks that are closed.
Reimplemented from JXDirector.
|
virtual |
Derived class should override this to dock all the windows and set docking positions for all window types.
| bool JXDockManager::FindDock | ( | const JIndex | id, |
| JXDockWidget ** | dock | ||
| ) |
|
inline |
| bool JXDockManager::GetDefaultDock | ( | const JUtf8Byte * | windowType, |
| JXDockWidget ** | dock | ||
| ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
overrideprotectedvirtual |
Implements JPrefObject.
| void JXDockManager::ReadSetup | ( | std::istream & | input | ) |
We assert that we can read the data that is provided because there is no way to skip over it.
|
inline |
| void JXDockManager::SetDefaultDock | ( | const JUtf8Byte * | windowType, |
| const JXDockWidget * | dock | ||
| ) |
If dock==nullptr, clears the mapping.
| void JXDockManager::SetIcon | ( | JXImage * | icon | ) |
We take ownership of the icon.
|
overrideprotectedvirtual |
Implements JPrefObject.
| void JXDockManager::WriteSetup | ( | std::ostream & | output | ) | const |