Inkscape
Vector Graphics Editor
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages Concepts
Inkscape::UI::Widget::Labelled Class Reference

Adds a label with optional icon to another widget. More...

#include <labelled.h>

Inheritance diagram for Inkscape::UI::Widget::Labelled:
Inkscape::UI::Widget::RegisteredWidget< Labelled > Inkscape::UI::Widget::Entry Inkscape::UI::Widget::FontButton Inkscape::UI::Widget::LabelledColorPicker Inkscape::UI::Widget::LabelledComboBoxEnum< E > Inkscape::UI::Widget::Point Inkscape::UI::Widget::Scalar Inkscape::UI::Widget::Text

Public Member Functions

 Labelled (Glib::ustring const &label, Glib::ustring const &tooltip, Gtk::Widget *widget, Glib::ustring const &icon={}, bool mnemonic=true)
 Construct a Labelled Widget.
 
Gtk::Widget const * getWidget () const
 
Gtk::Widget * getWidget ()
 
Gtk::Label const * getLabel () const
 
Gtk::Label * getLabel ()
 

Private Member Functions

bool on_mnemonic_activate (bool group_cycling) final
 

Private Attributes

Gtk::Widget * _widget = nullptr
 
Gtk::Label * _label = nullptr
 

Detailed Description

Adds a label with optional icon to another widget.

Definition at line 30 of file labelled.h.

Constructor & Destructor Documentation

◆ Labelled()

Inkscape::UI::Widget::Labelled::Labelled ( Glib::ustring const &  label,
Glib::ustring const &  tooltip,
Gtk::Widget *  widget,
Glib::ustring const &  icon = {},
bool  mnemonic = true 
)

Construct a Labelled Widget.

Parameters
labelLabel text.
tooltipTooltip markup to set on this Box.
widgetWidget to label; should be allocated with new, as it will be passed to Gtk::manage().
iconIcon name, placed before the label (defaults to empty).
mnemonicMnemonic toggle; if true, an underscore (_) in the text indicates the next character should be used for the mnemonic accelerator key (defaults to true).

Definition at line 23 of file labelled.cpp.

References _label, _widget, image, Inkscape::UI::pack_start(), Inkscape::UI::shrink, and sp_get_icon_image().

Member Function Documentation

◆ getLabel() [1/2]

Gtk::Label * Inkscape::UI::Widget::Labelled::getLabel ( )
inline

Definition at line 52 of file labelled.h.

References _label.

◆ getLabel() [2/2]

Gtk::Label const * Inkscape::UI::Widget::Labelled::getLabel ( ) const
inline

◆ getWidget() [1/2]

Gtk::Widget * Inkscape::UI::Widget::Labelled::getWidget ( )
inline

Definition at line 49 of file labelled.h.

References _widget.

◆ getWidget() [2/2]

◆ on_mnemonic_activate()

bool Inkscape::UI::Widget::Labelled::on_mnemonic_activate ( bool  group_cycling)
finalprivate

Definition at line 50 of file labelled.cpp.

References _widget.

Member Data Documentation

◆ _label

Gtk::Label* Inkscape::UI::Widget::Labelled::_label = nullptr
private

Definition at line 56 of file labelled.h.

Referenced by getLabel(), getLabel(), and Labelled().

◆ _widget

Gtk::Widget* Inkscape::UI::Widget::Labelled::_widget = nullptr
private

Definition at line 55 of file labelled.h.

Referenced by getWidget(), getWidget(), Labelled(), and on_mnemonic_activate().


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