40 #ifndef STAGE_WIDGET_ELEMENT_BOX_WIDGET_H 41 #define STAGE_WIDGET_ELEMENT_BOX_WIDGET_H 85 using SizeGetter = std::function<int()>;
112 cuString getCaption()
const;
113 void setCaption(cuString&);
118 Gtk::Requisition labelFullSize_{};
135 :
public Gtk::EventBox
137 using _Base = Gtk::EventBox;
140 SizeGetter getWidth{};
141 SizeGetter getHeight{};
143 bool is_size_constrained()
const {
return bool(getWidth); }
144 bool shall_control_height()
const {
return bool(getHeight); }
156 template<
class... QS>
164 void setName(cuString&);
165 cuString getName()
const;
169 cuString get_label()
const {
return getName(); }
173 Gtk::SizeRequestMode get_request_mode_vfunc()
const final;
174 void get_preferred_width_vfunc (
int&,
int&)
const override;
175 void get_preferred_height_vfunc (
int&,
int&)
const override;
176 void get_preferred_height_for_width_vfunc (
int,
int&,
int&)
const override;
177 void on_size_allocate (Gtk::Allocation&)
override;
187 uString nameID_{
"∅"};
188 SizeGetter widthConstraint_;
189 SizeGetter heightConstraint_;
190 string logTODO_{nameID_};
193 friend Qualifier
name(
string id);
196 friend Qualifier
constrained(SizeGetter,SizeGetter);
199 template<
class... QS>
203 qualify(*
this, qual, qs...);
211 Gtk::IconSize getIconSize()
const;
222 inline ElementBoxWidget::Config::Qualifier
225 return ElementBoxWidget::Config::Qualifier{
233 inline ElementBoxWidget::Config::Qualifier
236 return ElementBoxWidget::Config::Qualifier{
244 inline ElementBoxWidget::Config::Qualifier
247 return ElementBoxWidget::Config::Qualifier{
259 inline ElementBoxWidget::Config::Qualifier
262 return ElementBoxWidget::Config::Qualifier{
265 config.widthConstraint_ = move(wC);
273 inline ElementBoxWidget::Config::Qualifier
274 constrained(SizeGetter widthConstraint, SizeGetter heightConstraint)
276 return ElementBoxWidget::Config::Qualifier{
277 [wC=move(widthConstraint),hC=move(heightConstraint)]
280 config.widthConstraint_ = move(wC);
281 config.heightConstraint_ = move(hC);
292 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.