diff --git a/src/gui/workspace/panel-manager.hpp b/src/gui/workspace/panel-manager.hpp index 289107905..a1822fe2c 100644 --- a/src/gui/workspace/panel-manager.hpp +++ b/src/gui/workspace/panel-manager.hpp @@ -70,27 +70,61 @@ public: **/ GdlDock* get_dock() const; + /** + * Gets a pointer to the dock bar. + * @remarks Note that this must not be called before setup_dock. + **/ GdlDockBar* get_dock_bar() const; private: + /** + * Creates the standard panel layout. + **/ void create_panels(); + /** + * Creates a panel by class name. + * @param class_name The name of the object class to create. + **/ boost::shared_ptr create_panel_by_name( const char* class_name); private: + /** + * A reference to the owner workspace window object. + **/ WorkspaceWindow &workspaceWindow; + /** + * The pointer to GDL dock widget. + * @remarks This value is NULL until setup_dock has been called. + **/ GdlDock *dock; + + /** + * The pointer to GDL dock bar widget. + * @remarks This value is NULL until setup_dock has been called. + **/ GdlDockBar *dockBar; + + /** + * The pointer to GDL dock layout object. + * @remarks This value is NULL until setup_dock has been called. + **/ GdlDockLayout *dockLayout; + /** + * Pointers to the 4 root place holders. + * @remarks All 4 entries are NULL until setup_dock has been called. + **/ GdlDockPlaceholder *dockPlaceholders[4]; + /** + * The list of created panels. + **/ std::list< boost::shared_ptr > panels; - private: @@ -100,6 +134,14 @@ private: class PanelDescription { protected: + /** + * Constructor + * @param class_name The name of the Panel class + * @param title The localized title that will be shown on the + * panel. + * @param create_panel_proc A pointer to a function that will + * instantiate the panel object. + **/ PanelDescription(const char* class_name, const char *title, boost::shared_ptr (*const create_panel_proc)( WorkspaceWindow&)) : @@ -112,18 +154,27 @@ private: } public: + /** + * Returns a pointer to the string name of class. + **/ const char* get_class_name() const { ENSURE(className); return className; } - + + /** + * Returns the localized title that will be shown on the panel. + **/ const char* get_title() const { ENSURE(titleName); return titleName; } + /** + * Creates an instance of this panel. + **/ boost::shared_ptr create( WorkspaceWindow& owner_window) const { @@ -132,21 +183,45 @@ private: } private: + /** + * A pointer to the string name of class. + **/ const char* className; + + /** + * The localized title that will be shown on the panel. + **/ const char* titleName; + + /** + * A pointer to a function that will instantiate the panel object. + **/ boost::shared_ptr (*const createPanelProc)( WorkspaceWindow&); }; + /** + * A helper class that will create PanelDescription objects. + * @param P The type of panels::Panel that the PanelDescription will + * describe. + **/ template class Panel : public PanelDescription { public: + /** + * Constructor + **/ Panel() : PanelDescription(typeid(P).name(), P::get_title(), Panel::create_panel) {} private: + /** + * A helper function that will create a panel of type P + * @param workspace_window The owner workspace window. + * @return Returns a shared pointer to the panel object. + **/ static boost::shared_ptr create_panel( WorkspaceWindow &workspace_window) { @@ -155,8 +230,10 @@ private: } }; + /** + * The list of panel descriptions. + **/ static const PanelDescription panelDescriptionList[]; - }; } // namespace workspace