![]() |
Lumiera 0.pre.04
»edit your freedom«
|
Widget to render an ID label with associated icon. More...
Go to the source code of this file.
Widget to render an ID label with associated icon.
This is a UI building block used at various places, e.g. to show the name of a clip in the media bins or in the timeline, to indicate the kind of an effect, or to render a marker label in the tracks or the timeline ruler. The common denominator of all those elements is that they combine some icon with a possibly abridged text and render them with a given indicator style, configurable via CSS. There is support for picking the icon and the indicator style based on some notion of _"type"._
Build a custom widget with ElementBoxWidget as base class; invoke the base ctor using the DSL qualifier syntax to select from the preconfigured layout options
a special size constrained layout mode can be activated, to allow for display on a time calibrated canvas; the actual translation from time to pixel size must be done by the concrete subclass (e.g. stage::model::Clip), accessible through the getter-λ passed to the constrained(λ) clause.
WIP-WIP-WIP as of 11/2018 ///////////////////////////////////////////////////////////////////////TICKET #1185
WIP-WIP-WIP as of 9/2022 ///////////////////////////////////////////////////////////////////////TICKET #1219
Definition in file element-box-widget.hpp.
#include "stage/gtk-base.hpp"#include "stage/model/expander-revealer.hpp"#include "lib/builder-qualifier-support.hpp"#include "lib/format-string.hpp"#include "lib/symbol.hpp"#include <functional>#include <utility>#include <string>#include "lib/format-cout.hpp"Namespaces | |
| namespace | stage |
| Lumiera GTK UI implementation root. | |
| namespace | stage::widget |
| Lumiera custom widgets. | |
Typedefs | |
| using | SizeGetter = std::function< int()> |
Enumerations | |
| enum | Kind { MARK , SPAN , ITEM , CONTENT } |
| the presentation intent for the ElementBoxWidget More... | |
| enum | Type { VIDEO , AUDIO , TEXT , AUTO , EVENT , EFFECT , LABEL , RULER , GROUP , META } |
| the type of content object to derive suitable styling (background colour, icon) More... | |
Classes | |
| class | IDLabel |
| Widget arrangement to represent an entity for manipulation. More... | |
| class | ElementBoxWidget |
| A basic building block of the Lumiera UI. More... | |
| struct | ElementBoxWidget::Strategy |
| class | ElementBoxWidget::Config |
Functions | |
| ElementBoxWidget::Config::Qualifier | kind (Kind kind) |
| qualify the basic use case for the new ElementBoxWidget | |
| ElementBoxWidget::Config::Qualifier | name (string id) |
| define the name-ID displayed in the caption | |
| ElementBoxWidget::Config::Qualifier | expander (model::Expander &expander) |
| provide an expand/collapse button, wired with the given Expander | |
| ElementBoxWidget::Config::Qualifier | constrained (SizeGetter widthConstraint) |
| switch in to size-constrained layout mode. | |
| ElementBoxWidget::Config::Qualifier | constrained (SizeGetter widthConstraint, SizeGetter heightConstraint) |
| activate size-constrained layout mode, similar as constrained(SizeGetter). | |