Loading...
Searching...
No Matches
oscr::LayoutBuilder< Info > Struct Template Referencefinal
Inheritance diagram for oscr::LayoutBuilder< Info >:
Process::LayoutBuilderBase

Public Types

using inputs_type = typename avnd::input_introspection< Info >::type
 
using outputs_type = typename avnd::output_introspection< Info >::type
 

Public Member Functions

std::shared_ptr< score::LayoutSelection > selectionNamed (std::string_view name)
 
template<typename Port_T , typename Item >
void setupControl (QGraphicsItem *parent, Port_T *port, const Process::ControlLayout &lay, Item &item)
 
template<typename Item >
void setupCondition (score::GraphicsLayout &lay, auto... recursive_members)
 
template<typename Item >
Process::ControlPresentation presentationFor () const
 
template<typename Item >
void createControl (Item &item, auto... member)
 
template<typename Item , typename T >
void createWidget (Item &it, const T &member)
 
template<typename Item , typename... T>
requires (sizeof...(T) > 1)
void createWidget (Item &item, T... recursive_members)
 
score::GraphicsStripCell * enclosingCell () const
 The strip cell being built, if any.
 
void acceptFileDrops (Process::FileChooserBase &port)
 Files dropped on the enclosing strip cell set the port.
 
template<typename Item >
void createDisplay (Item &item, auto... member)
 
void addControlInlet (std::vector< Process::ControlInlet * > &ports, auto... member)
 
template<typename Item >
void createCustomMultiControl (Item &item, auto... recursive_members)
 
template<typename Item >
void createCustom (Item &item)
 
template<typename Item >
void watchControl (Item &item, auto member)
 
template<typename Item >
void createCustomControl (Item &item, auto... member)
 
template<typename Item >
void subLayout (Item &item, score::GraphicsLayout *new_l, auto... recursive_members)
 
template<typename Item >
void walkMembers (Item &item, auto... recursive_members)
 
template<typename Item >
auto initRecursiveLayout ()
 
template<typename Item >
void walkLayout (Item &item, auto... recursive_members)
 
- Public Member Functions inherited from Process::LayoutBuilderBase
Process::ControlLayout makePort (Process::Inlet &portModel, const Process::ControlPresentation &={})
 
Process::ControlLayout makePort (Process::Outlet &portModel, const Process::ControlPresentation &={})
 
std::pair< Process::ControlInlet *, Process::ControlLayout > makeInlet (Process::Inlet *, const Process::ControlPresentation &={})
 
std::pair< Process::ControlOutlet *, Process::ControlLayout > makeOutlet (Process::Outlet *, const Process::ControlPresentation &={})
 
std::vector< std::pair< Process::ControlInlet *, Process::ControlLayout > > makeInlets (std::span< Process::Inlet * >)
 
std::vector< std::pair< Process::ControlOutlet *, Process::ControlLayout > > makeOutlets (std::span< Process::Outlet * >)
 
QGraphicsItem * makeLabel (std::string_view item)
 
void finalizeLayout (QGraphicsItem *rootItem)
 
template<typename T >
score::BrushSet & get_brush (T cur)
 
template<typename Item >
void setupLayout (const Item &it, score::GraphicsLayout &item)
 
template<typename Item >
void setupItem (const Item &it, QGraphicsItem &item)
 

Static Public Member Functions

static QString displayText (const Process::ControlInlet &port, const ossia::value &v, const QFontMetricsF &metrics, qreal max_width=72.)
 What a display shows for a value: an entry's name, or a number.
 
template<typename Item , typename F >
static void forEachMember (Item &item, F &&f)
 
- Static Public Member Functions inherited from Process::LayoutBuilderBase
template<typename T >
static Qt::Alignment get_alignment (T cur) noexcept
 Any enum with left, center and right, like halp::alignments.
 

Public Attributes

inputs_type temp_inputs {}
 
outputs_type temp_outputs {}
 
Info::ui * rootUi {}
 
QObject * connections {}
 Context object of the connections to this build's widgets.
 
int tableDepth {}
 Depth in titled tables: controls there hide their labels.
 
std::map< std::string, std::shared_ptr< score::LayoutSelection >, std::less<> > selections
 Named selections, and the one each selecting table drives.
 
std::map< score::GraphicsTableLayout *, std::shared_ptr< score::LayoutSelection > > tableSelections
 
- Public Attributes inherited from Process::LayoutBuilderBase
QObject & context
 
const Process::ProcessModel & proc
 
const Process::Context & doc
 
const Process::PortFactoryList & portFactory
 
const Process::Inlets & inlets
 
const Process::Outlets & outlets
 
QGraphicsItem * layout {}
 
std::vector< score::GraphicsLayout * > createdLayouts {}
 
bool marginOnNestedLayouts {true}
 

Member Function Documentation

◆ setupCondition()

template<typename Info >
template<typename Item >
void oscr::LayoutBuilder< Info >::setupCondition ( score::GraphicsLayout &  lay,
auto...  recursive_members 
)
inline

halp::enabled_when / visible_when, returned by Item::condition(). Enums match on entryIndex.

◆ setupControl()

template<typename Info >
template<typename Port_T , typename Item >
void oscr::LayoutBuilder< Info >::setupControl ( QGraphicsItem *  parent,
Port_T *  port,
const Process::ControlLayout &  lay,
Item &  item 
)
inline

Port_T is Process::ControlInlet or Process::ControlOutlet: a control a layout names is set up the same way whichever side it is on, the widget following the port's value.

◆ watchControl()

template<typename Info >
template<typename Item >
void oscr::LayoutBuilder< Info >::watchControl ( Item &  item,
auto  member 
)
inline

A custom item that shows a control without editing it: its watch() is given the control's field, with the value the control has, at once and each time it changes, whether the process runs or not.


The documentation for this struct was generated from the following file: