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

#include "stage/widget/element-box-widget.hpp"

Description

Widget arrangement to represent an entity for manipulation.

This uniform standard arrangement is comprised of

  • a leading Placement- or Type-Icon
  • a Menu button
  • a caption for identification The IDLabel widget offers standard hooks for wiring signals and controlling the layout; notably the widget extension can be confined to stay within given constraints.

Definition at line 99 of file element-box-widget.hpp.

Public Member Functions

 ~IDLabel ()
 
 IDLabel (Literal iconID, Literal menuSymb, Gtk::IconSize)
 
cuString getCaption () const
 
void setCaption (cuString &)
 
void imposeSizeConstraint (int, int)
 Ensure the IDLabel stays within a given size constraint.
 

Private Member Functions

void adaptSize (int, int)
 Multi-step procedure to keep this IDLabel widget within the given screen size constraints.
 

Private Attributes

Gtk::Image imgIcon_
 
Gtk::Image imgMenu_
 
Gtk::Button icon_
 
Gtk::Button menu_
 
Gtk::Label name_
 
Gtk::Requisition labelFullSize_ {}
 

Constructor & Destructor Documentation

◆ ~IDLabel()

~IDLabel ( )

Definition at line 112 of file element-box-widget.cpp.

◆ IDLabel()

Member Function Documentation

◆ getCaption()

cuString getCaption ( ) const

Definition at line 184 of file element-box-widget.cpp.

References IDLabel::name_.

Referenced by ElementBoxWidget::getName().

+ Here is the caller graph for this function:

◆ setCaption()

void setCaption ( cuString idCaption)

Definition at line 174 of file element-box-widget.cpp.

References IDLabel::labelFullSize_, and IDLabel::name_.

Referenced by ElementBoxWidget::ElementBoxWidget(), and ElementBoxWidget::setName().

+ Here is the caller graph for this function:

◆ imposeSizeConstraint()

void imposeSizeConstraint ( int  widthC,
int  heightC 
)

Ensure the IDLabel stays within a given size constraint.

In case the standard rendering complete with icon and name caption exceeds the given screen space, try to bring this widget into imposed limits by reducing or hiding some parts.

Definition at line 331 of file element-box-widget.cpp.

References IDLabel::adaptSize(), and IDLabel::labelFullSize_.

Referenced by ElementBoxWidget::imposeSizeConstraint().

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

◆ adaptSize()

void adaptSize ( int  widthC,
int  heightC 
)
private

Multi-step procedure to keep this IDLabel widget within the given screen size constraints.

In case the extension needs to be reduced, the name label and both icons are probed and possibly reduced. Otherwise, if there is sufficient headroom, an attempt is made possibly to show parts again, albeit with some hysteresis.

Todo:
as of 10/22, a planned full implementation will eventually shorten the caption text and possibly also combine both Icons into a single button when necessary... ///////////////////TICKET #1242 : adjust size of the ID caption

Definition at line 436 of file element-box-widget.cpp.

References IDLabel::icon_, IDLabel::menu_, and IDLabel::name_.

Referenced by IDLabel::imposeSizeConstraint().

+ Here is the caller graph for this function:

Member Data Documentation

◆ imgIcon_

Gtk::Image imgIcon_
private

Definition at line 102 of file element-box-widget.hpp.

Referenced by IDLabel::IDLabel().

◆ imgMenu_

Gtk::Image imgMenu_
private

Definition at line 103 of file element-box-widget.hpp.

Referenced by IDLabel::IDLabel().

◆ icon_

Gtk::Button icon_
private

Definition at line 104 of file element-box-widget.hpp.

Referenced by IDLabel::IDLabel(), and IDLabel::adaptSize().

◆ menu_

Gtk::Button menu_
private

Definition at line 105 of file element-box-widget.hpp.

Referenced by IDLabel::IDLabel(), and IDLabel::adaptSize().

◆ name_

Gtk::Label name_
private

◆ labelFullSize_

Gtk::Requisition labelFullSize_ {}
private

Definition at line 118 of file element-box-widget.hpp.

Referenced by IDLabel::imposeSizeConstraint(), and IDLabel::setCaption().

+ Inheritance diagram for IDLabel:
+ Collaboration diagram for IDLabel:

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