Lumiera  0.pre.03
»edityourfreedom«
PanelBar Class Reference

#include "gui/widget/panel-bar.hpp"

Description

A container widget for widgets to be displayed on GDL panels grips.

Definition at line 54 of file panel-bar.hpp.

Public Member Functions

 PanelBar (panel::Panel &owner_panel, const gchar *stock_id)
 create a PanelBar with a given stock_id. More...
 

Private Member Functions

void on_hide ()
 An event handler for when the "Hide" menu item is clicked. More...
 
void on_lock ()
 Event handler for when the "Lock" menu item is clicked. More...
 
void on_panel_type (int type_index)
 An event handler for when a panel type is chosen. More...
 
void on_split_panel (Gtk::Orientation split_direction)
 Event handler for when the split panel menu item is clicked. More...
 
void setupPanelButton ()
 Sets up panelButton, populating it with menu items. More...
 

Private Attributes

Gtk::CheckMenuItem * lockItem_
 pointer to the lock menu item. More...
 
panel::Panelpanel_
 reference to the owner panel More...
 
MenuButton panelButton_
 The panel menu drop-down button widget, that will be displayed in the corner of the bar. More...
 
Glib::RefPtr< Gdk::Window > window_
 The bar window. More...
 

Constructor & Destructor Documentation

◆ PanelBar()

PanelBar ( panel::Panel owner_panel,
const gchar *  stock_id 
)

create a PanelBar with a given stock_id.

Parameters
owner_panelThe GDL panel that is the parent of this panel bar.
stock_idThe stock id with a name and an icon for this panel.

Definition at line 50 of file panel-bar.cpp.

References PanelBar::panelButton_, and PanelBar::setupPanelButton().

+ Here is the call graph for this function:

Member Function Documentation

◆ setupPanelButton()

void setupPanelButton ( )
private

Sets up panelButton, populating it with menu items.

Keeping this snippet for easy reference list.push_back( Menu_Helpers::StockMenuElem( StockID(PanelManager::get_panel_stock_id(i)), bind(mem_fun(*this, &PanelBar::on_panel_type), i) ));

Definition at line 68 of file panel-bar.cpp.

References MenuButton::append(), ENSURE(), Panel::is_locked(), PanelBar::lockItem_, NULL, PanelBar::on_hide(), PanelBar::on_lock(), PanelBar::on_panel_type(), PanelBar::on_split_panel(), PanelBar::panel_, and PanelBar::panelButton_.

Referenced by PanelBar::PanelBar().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ on_panel_type()

void on_panel_type ( int  type_index)
private

An event handler for when a panel type is chosen.

Parameters
type_indexindex of the panel description that will be instantiated.

Definition at line 126 of file panel-bar.cpp.

References Panel::getPanelManager(), PanelBar::panel_, and PanelManager::switchPanel().

Referenced by PanelBar::setupPanelButton().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ on_hide()

void on_hide ( )
private

An event handler for when the "Hide" menu item is clicked.

Definition at line 133 of file panel-bar.cpp.

References PanelBar::panel_, and Panel::show().

Referenced by PanelBar::setupPanelButton().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ on_lock()

void on_lock ( )
private

Event handler for when the "Lock" menu item is clicked.

Definition at line 140 of file panel-bar.cpp.

References Panel::is_locked(), Panel::lock(), PanelBar::lockItem_, and PanelBar::panel_.

Referenced by PanelBar::setupPanelButton().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ on_split_panel()

void on_split_panel ( Gtk::Orientation  split_direction)
private

Event handler for when the split panel menu item is clicked.

Parameters
split_directionThe direction to split in.

Definition at line 159 of file panel-bar.cpp.

References Panel::getPanelManager(), PanelBar::panel_, and PanelManager::splitPanel().

Referenced by PanelBar::setupPanelButton().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ panel_

panel::Panel& panel_
private

reference to the owner panel

Definition at line 58 of file panel-bar.hpp.

Referenced by PanelBar::on_hide(), PanelBar::on_lock(), PanelBar::on_panel_type(), PanelBar::on_split_panel(), and PanelBar::setupPanelButton().

◆ panelButton_

MenuButton panelButton_
private

The panel menu drop-down button widget, that will be displayed in the corner of the bar.

Definition at line 62 of file panel-bar.hpp.

Referenced by PanelBar::PanelBar(), and PanelBar::setupPanelButton().

◆ lockItem_

Gtk::CheckMenuItem* lockItem_
private

pointer to the lock menu item.

Remarks
This value will remain NULL until after setup_panel_button has been called.

Definition at line 67 of file panel-bar.hpp.

Referenced by PanelBar::on_lock(), and PanelBar::setupPanelButton().

◆ window_

Glib::RefPtr<Gdk::Window> window_
private

The bar window.

Remarks
This window is used only to set the cursor as an arrow for any child widgets.

Definition at line 72 of file panel-bar.hpp.

+ Inheritance diagram for PanelBar:
+ Collaboration diagram for PanelBar:

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