Lumiera  0.pre.03
»edit your freedom«
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 (Literal iconID, Literal menuSymb, Gtk::IconSize)
 
cuString getCaption () const
 
void imposeSizeConstraint (int, int)
 Ensure the IDLabel stays within a given size constraint. More...
 
void setCaption (cuString &)
 

Private Member Functions

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

Private Attributes

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

Member Function Documentation

◆ 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().

+ Here is the call 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.

Referenced by IDLabel::imposeSizeConstraint().

+ Here is the caller graph for this function:
+ Inheritance diagram for IDLabel:
+ Collaboration diagram for IDLabel:

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