xentara-workbench-plugin v1.0.1
The Xentara Workbench Plugin Framework
Loading...
Searching...
No Matches
xentara::workbench::ui::Form Class Referencefinal

An interface used to add entry fields to a UI form. More...

#include <xentara/workbench/ui/Form.hpp>

Public Member Functions

template<std::derived_from< bindings::FormField > FieldType>
internal auto add (const FieldType &field) const -> void
 Adds a field to the form.
 
auto addSection (ui::StringView header=ui::StringView()) -> void
 Adds a section header to the form.
 
auto addGroup () const -> Group
 Adds a basic group to the form.
 
template<std::derived_from< bindings::FormGroup > GroupType>
auto addGroup (const GroupType &group) const -> Group
 Adds a specialized group to the form.
 

Detailed Description

An interface used to add entry fields to a UI form.

This class is a light-weight reference type referencing the actual UI form, meaning it can be easily copied.

Member Function Documentation

◆ add()

template<std::derived_from< bindings::FormField > FieldType>
internal auto xentara::workbench::ui::Form::add ( const FieldType &  field) const -> void

Adds a field to the form.

Parameters
fieldThe field to add to the form

◆ addGroup() [1/2]

auto xentara::workbench::ui::Form::addGroup ( ) const -> Group

Adds a basic group to the form.

A group groups the contained fields together visually.

Returns
Returns an object that can be used to add fields to the group
See also
bindings::CollapsibleGroup

◆ addGroup() [2/2]

template<std::derived_from< bindings::FormGroup > GroupType>
auto xentara::workbench::ui::Form::addGroup ( const GroupType &  group) const -> Group

Adds a specialized group to the form.

Parameters
groupThe group to add to the form
Returns
Returns an object that can be used to add fields to the group
See also
bindings::CollapsibleGroup

◆ addSection()

auto xentara::workbench::ui::Form::addSection ( ui::StringView  header = ui::StringView()) -> void

Adds a section header to the form.

Parameters
headerThe title for the section. If the title is empty, the distance between the previous field and the next field is simply increased