Lumiera
0.pre.03
»edit your freedom«
|
#include "stage/workspace/panel-manager.hpp"
A class to manage DockItem objects for WorkspaceWindow.
Definition at line 53 of file panel-manager.hpp.
Public Member Functions | |
PanelManager (WorkspaceWindow &) | |
Gdl::Dock & | getDock () |
Gets a pointer to the dock object. More... | |
Gdl::DockBar & | getDockBar () |
Gets a pointer to the dock bar. More... | |
WorkspaceWindow & | getWorkspaceWindow () |
Returns a reference to the owner workspace window. | |
bool | hasPanel (const int description_index) |
was the indicated panel already allocated within this PanelManager's realm? | |
void | setupDock () |
Initialises this dock manager and creates the dock and all it's widgets. More... | |
panel::Panel & | showPanel (const int description_index) |
Shows a panel given a description index. More... | |
void | splitPanel (panel::Panel &panel, Gtk::Orientation split_direction) |
Splits a panel into two panels of the same type. More... | |
void | switchPanel (panel::Panel &old_panel, const int description_index) |
Switches a panel from one type to another, without touching the underlying GdlDockItem. More... | |
Static Public Member Functions | |
template<class P > | |
static int | findPanelID () |
retrieve the internal type-ID corresponding to the given panel implementation type. More... | |
static int | getPanelDescriptionCount () |
Gets the number of panel descriptions. More... | |
static const gchar * | getPanelStockID (const int index) |
Gets a panel description's stock id. More... | |
static const char * | getPanelTitle (int index) |
Gets a panel description's title. More... | |
Classes | |
class | Panel |
A helper class that will create PanelDescription objects. More... | |
class | PanelDescription |
A class to describe and instantiate Panel types. More... | |
Private Member Functions | |
void | clearPanels () |
Removes all panels from the panel list and deletes them. More... | |
panel::Panel * | createPanel_by_index (const int index) |
Creates a panel by description index. More... | |
panel::Panel * | createPanel_by_index (const int index, Gdl::DockItem &dock_item) |
Creates a panel by description index with a given GdlDockItem. More... | |
panel::Panel * | createPanel_by_name (const char *class_name) |
Creates a panel by class name. More... | |
void | createPanels () |
Creates the standard panel layout. More... | |
int | getPanelType (panel::Panel *const panel) const |
Gets the type of a given panel. More... | |
void | on_panel_shown (panel::Panel *panel) |
An event handler for when the panel is shown or hidden. More... | |
void | removePanel (panel::Panel *const panel) |
Removes a panel from the panel list and deletes it. More... | |
Static Private Member Functions | |
static int | findPanelDescription (const char *class_name) |
Find the index of a panel description given the class name. More... | |
Private Attributes | |
Gdl::Dock | dock_ |
The pointer to GDL dock widget. More... | |
Gdl::DockBar | dockBar_ |
The pointer to GDL dock bar widget. More... | |
Glib::RefPtr< Gdl::DockLayout > | dockLayout_ |
The pointer to GDL dock layout object. More... | |
GdlDockPlaceholder * | dockPlaceholders_ [4] |
Pointers to the 4 root place holders. More... | |
std::list< panel::Panel * > | panels_ |
list of all panels created | |
WorkspaceWindow & | workspaceWindow_ |
reference to the owner workspace window object | |
Static Private Attributes | |
static const PanelDescription | panelDescriptionList [] |
The list of panel descriptions. More... | |
static unsigned short | panelID = 0 |
An accumulator for the panel id. | |
void setupDock | ( | ) |
Initialises this dock manager and creates the dock and all it's widgets.
Definition at line 96 of file panel-manager.cpp.
Gdl::Dock & getDock | ( | ) |
Gets a pointer to the dock object.
Definition at line 118 of file panel-manager.cpp.
Gdl::DockBar & getDockBar | ( | ) |
Gets a pointer to the dock bar.
Definition at line 125 of file panel-manager.cpp.
panel::Panel & showPanel | ( | const int | description_index | ) |
Shows a panel given a description index.
description_index | The index of the panel type to show. |
Definition at line 148 of file panel-manager.cpp.
Referenced by Actions::populateShowPanelActions().
void switchPanel | ( | panel::Panel & | old_panel, |
const int | description_index | ||
) |
Switches a panel from one type to another, without touching the underlying GdlDockItem.
old_panel | The panel which will be transformed to a new type. |
description_index | The index of the panel description that will be instantiated. |
Definition at line 178 of file panel-manager.cpp.
References Panel::getDockItem().
Referenced by PanelBar::on_panel_type().
void splitPanel | ( | panel::Panel & | panel, |
Gtk::Orientation | split_direction | ||
) |
Splits a panel into two panels of the same type.
panel | The panel to split. |
split_direction | The direction to split the panel in. |
Definition at line 195 of file panel-manager.cpp.
References Panel::getDockItem().
Referenced by PanelBar::on_split_panel().
|
inlinestatic |
retrieve the internal type-ID corresponding to the given panel implementation type.
-1
if not found. Definition at line 353 of file panel-manager.hpp.
References stage::widget::name().
|
static |
Gets the number of panel descriptions.
Definition at line 226 of file panel-manager.cpp.
Referenced by Actions::populateShowPanelActions().
|
static |
Gets a panel description's stock id.
index | The index of the panel to retrieve. |
Definition at line 233 of file panel-manager.cpp.
Referenced by Actions::populateShowPanelActions().
|
static |
Gets a panel description's title.
index | The index of the panel to retrieve. |
Definition at line 241 of file panel-manager.cpp.
|
private |
Creates the standard panel layout.
Definition at line 249 of file panel-manager.cpp.
References Panel::getDockItem().
|
staticprivate |
Find the index of a panel description given the class name.
class_name | The name of the object class to search for. |
Definition at line 263 of file panel-manager.cpp.
|
private |
Creates a panel by description index.
index | The index of the description to instantiate. |
Definition at line 280 of file panel-manager.cpp.
References stage::widget::name().
|
private |
Creates a panel by description index with a given GdlDockItem.
index | The index of the description to instantiate. |
dock_item | The GdlDockItem to attach this panel to |
Definition at line 295 of file panel-manager.cpp.
References Panel::signal_hidePanel().
|
private |
Creates a panel by class name.
class_name | The name of the object class to create. |
Definition at line 314 of file panel-manager.cpp.
|
private |
Gets the type of a given panel.
panel | The Panel to get the type of |
Definition at line 323 of file panel-manager.cpp.
|
private |
Removes a panel from the panel list and deletes it.
panel | The panel to remove and delete. |
Definition at line 341 of file panel-manager.cpp.
|
private |
Removes all panels from the panel list and deletes them.
Definition at line 359 of file panel-manager.cpp.
|
private |
An event handler for when the panel is shown or hidden.
panel | A pointer to the panel that was hidden. |
Definition at line 371 of file panel-manager.cpp.
References Panel::is_iconified().
|
private |
The pointer to GDL dock widget.
Definition at line 61 of file panel-manager.hpp.
|
private |
The pointer to GDL dock bar widget.
Definition at line 66 of file panel-manager.hpp.
|
private |
The pointer to GDL dock layout object.
Definition at line 71 of file panel-manager.hpp.
|
private |
Pointers to the 4 root place holders.
Definition at line 76 of file panel-manager.hpp.
|
staticprivate |
The list of panel descriptions.
Definition at line 345 of file panel-manager.hpp.