Lumiera  0.pre.03
»edit your freedom«
element-box-widget.hpp File Reference

Go to the source code of this file.

Description

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"._

Usage

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

  • the stage::widget::Kind specifies the basic usage situation
  • expand / collapse functionality can be directly wired with a model::Tangible
  • 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.
Todo:

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"

Classes

class  ElementBoxWidget::Config
 
class  ElementBoxWidget
 A basic building block of the Lumiera UI. More...
 
class  IDLabel
 Widget arrangement to represent an entity for manipulation. More...
 
struct  ElementBoxWidget::Strategy
 

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...
 

Functions

ElementBoxWidget::Config::Qualifier constrained (SizeGetter widthConstraint)
 switch in to size-constrained layout mode. More...
 
ElementBoxWidget::Config::Qualifier constrained (SizeGetter widthConstraint, SizeGetter heightConstraint)
 activate size-constrained layout mode, similar as constrained(SizeGetter). More...
 
ElementBoxWidget::Config::Qualifier expander (model::Expander &expander)
 provide an expand/collapse button, wired with the given Expander
 
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
 

Namespaces

 stage
 Lumiera GTK UI implementation root.
 
 stage::widget
 Lumiera custom widgets.