Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
PanelBar Class Reference

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

Description

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

Definition at line 45 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.
 

Private Member Functions

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

Private Attributes

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

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 42 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.

Todo:
still not completely ported to GTK-3 and not used as of 5/2025 /////////////////////////////////TICKET #937 : complete Port to GTK-3

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

References MenuButton::append(), PanelManager::getPanelDescriptionCount(), PanelManager::getPanelTitle(), 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 125 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_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 135 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:

◆ on_hide()

void on_hide ( )
overrideprivate

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

Definition at line 143 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 150 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:

Member Data Documentation

◆ panel_

panel::Panel& panel_
private

reference to the owner panel

Definition at line 49 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 53 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 58 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 63 of file panel-bar.hpp.

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

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