49 #ifndef STAGE_WIDGET_ELEMENT_BOX_WIDGET_H 50 #define STAGE_WIDGET_ELEMENT_BOX_WIDGET_H 94 using SizeGetter = std::function<int()>;
121 cuString getCaption()
const;
122 void setCaption(cuString&);
127 Gtk::Requisition labelFullSize_{};
144 :
public Gtk::EventBox
146 using _Base = Gtk::EventBox;
149 SizeGetter getWidth{};
150 SizeGetter getHeight{};
152 bool is_size_constrained()
const {
return bool(getWidth); }
153 bool shall_control_height()
const {
return bool(getHeight); }
165 template<
class... QS>
173 void setName(cuString&);
174 cuString getName()
const;
178 cuString get_label()
const {
return getName(); }
182 Gtk::SizeRequestMode get_request_mode_vfunc()
const final;
183 void get_preferred_width_vfunc (
int&,
int&)
const override;
184 void get_preferred_height_vfunc (
int&,
int&)
const override;
185 void get_preferred_height_for_width_vfunc (
int,
int&,
int&)
const override;
186 void on_size_allocate (Gtk::Allocation&)
override;
196 uString nameID_{
"∅"};
197 SizeGetter widthConstraint_;
198 SizeGetter heightConstraint_;
199 string logTODO_{nameID_};
202 friend Qualifier
name(
string id);
205 friend Qualifier
constrained(SizeGetter,SizeGetter);
208 template<
class... QS>
212 qualify(*
this, qual, qs...);
220 Gtk::IconSize getIconSize()
const;
231 inline ElementBoxWidget::Config::Qualifier
234 return ElementBoxWidget::Config::Qualifier{
242 inline ElementBoxWidget::Config::Qualifier
245 return ElementBoxWidget::Config::Qualifier{
253 inline ElementBoxWidget::Config::Qualifier
256 return ElementBoxWidget::Config::Qualifier{
268 inline ElementBoxWidget::Config::Qualifier
271 return ElementBoxWidget::Config::Qualifier{
274 config.widthConstraint_ = move(wC);
282 inline ElementBoxWidget::Config::Qualifier
283 constrained(SizeGetter widthConstraint, SizeGetter heightConstraint)
285 return ElementBoxWidget::Config::Qualifier{
286 [wC=move(widthConstraint),hC=move(heightConstraint)]
289 config.widthConstraint_ = move(wC);
290 config.heightConstraint_ = move(hC);
301 template<
class... QS>
inline string literal This is a marker type to indicate that
A front-end for using printf-style formatting.
Mix-in to accept and apply an arbitrary sequence of qualifier functors.
Helper components to implement some standard UI-element actions by installing a functor.
Marker types to indicate a literal string and a Symbol.
Lumiera GTK UI implementation root.
Mix-in to support builder functions to accept optional qualifier terms.
Functor component to support the default implementation of expanding/collapsing.
A set of basic GTK includes for the UI.