neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neogfx::nrc::ui_element< Base > Class Template Reference

#include <ui_element.hpp>

Inheritance diagram for neogfx::nrc::ui_element< Base >:
neolib::reference_counted< Base, DeallocateOnRelease >

Public Types

typedef neolib::ref_ptr< i_ui_element > element_ptr_t
 
typedef neolib::vector< element_ptr_tchildren_t
 
typedef neolib::vector< neolib::simple_variantconcrete_array_data_t
 

Public Member Functions

 ui_element (const i_ui_element_parser &aParser, ui_element_type aType)
 
 ui_element (const i_ui_element_parser &aParser, ui_element_type aType, const neolib::optional< neolib::string > &aId)
 
 ui_element (const i_ui_element_parser &aParser, i_ui_element &aParent, ui_element_type aType)
 
 ui_element (const i_ui_element_parser &aParser, i_ui_element &aParent, ui_element_type aType, const neolib::optional< neolib::string > &aId)
 
 ui_element (const i_ui_element_parser &aParser, i_ui_element &aParent, member_element_t, ui_element_type aType)
 
 ~ui_element ()
 
const i_ui_element_parserparser () const override
 
const neolib::i_stringname () const override
 
const neolib::i_stringfragment_name () const override
 
const neolib::i_stringtype_name () const override
 
void set_type_name (const neolib::i_string &aTypeName) override
 
const neolib::i_vector< neolib::i_string > & headers () const override
 
void add_header (std::string const &aHeader)
 
bool is_member_element () const override
 
bool anonymous () const override
 
const neolib::i_stringid () const override
 
const neolib::i_stringanonymous_id () const override
 
void generate_anonymous_id (neolib::i_string &aNewAnonymousId) const override
 
ui_element_type type () const override
 
const i_ui_element & fragment () const override
 
i_ui_element & fragment () override
 
bool has_parent () const override
 
const i_ui_element & parent () const override
 
i_ui_element & parent () override
 
const children_tchildren () const override
 
children_tchildren () override
 
void instantiate (i_app &aApp) override
 
void instantiate (i_widget &aWidget) override
 
void instantiate (i_layout &aLayout) override
 
- Public Member Functions inherited from neolib::reference_counted< Base, DeallocateOnRelease >
 reference_counted () noexcept
 
 reference_counted (const reference_counted &aOther) noexcept
 
 ~reference_counted ()
 
reference_countedoperator= (const reference_counted &)
 
void add_ref () const noexcept override
 
void release () const override
 
int32_t use_count () const noexcept override
 
const base_type * release_and_take_ownership () const override
 
base_type * release_and_take_ownership () override
 
void pin () const noexcept override
 
void unpin () const override
 
i_ref_control_blockcontrol_block () override
 

Protected Types

typedef std::set< std::string > data_names_t
 

Protected Member Functions

const data_names_tdata_names () const
 
void add_data_names (data_names_t aNames)
 
void parse (const neolib::i_string &aName, const data_t &aData) override
 
void parse (const neolib::i_string &aName, const array_data_t &aArrayData) override
 
void add_element_ref (const neolib::i_string &aRef) override
 
const neolib::i_set< neolib::i_string > & element_refs () const override
 
const neolib::i_stringgenerate_ctor_params (bool aParamsAfter=false) const override
 
const neolib::i_stringgenerate_base_ctor_args (bool aArgsAfter=false) const override
 
void emit_preamble () const override
 
void emit_ctor () const override
 
void emit_body () const override
 
neolib::string layout () const
 
void emit_generic_ctor () const
 
void emit_generic_ctor (const std::optional< neolib::string > &aText) const
 
template<typename Enum >
std::enable_if_t< std::is_enum_v< Enum >, void > emit_generic_ctor (std::string const &aEnumName, Enum aEnum) const
 
template<typename T >
void emit_generic_ctor (const T &aArgument) const
 
void emit (std::string const &aArgument) const
 
template<typename... Args>
void emit (std::string const &aFormat, const Args &... aArguments) const
 

Detailed Description

template<typename Base = i_ui_element>
class neogfx::nrc::ui_element< Base >

Definition at line 40 of file ui_element.hpp.

Member Typedef Documentation

◆ children_t

template<typename Base = i_ui_element>
typedef neolib::vector<element_ptr_t> neogfx::nrc::ui_element< Base >::children_t

Definition at line 49 of file ui_element.hpp.

◆ concrete_array_data_t

template<typename Base = i_ui_element>
typedef neolib::vector<neolib::simple_variant> neogfx::nrc::ui_element< Base >::concrete_array_data_t

Definition at line 52 of file ui_element.hpp.

◆ data_names_t

template<typename Base = i_ui_element>
typedef std::set<std::string> neogfx::nrc::ui_element< Base >::data_names_t
protected

Definition at line 54 of file ui_element.hpp.

◆ element_ptr_t

template<typename Base = i_ui_element>
typedef neolib::ref_ptr<i_ui_element> neogfx::nrc::ui_element< Base >::element_ptr_t

Definition at line 48 of file ui_element.hpp.

Constructor & Destructor Documentation

◆ ui_element() [1/5]

template<typename Base = i_ui_element>
neogfx::nrc::ui_element< Base >::ui_element ( const i_ui_element_parser aParser,
ui_element_type  aType 
)
inline

Definition at line 56 of file ui_element.hpp.

◆ ui_element() [2/5]

template<typename Base = i_ui_element>
neogfx::nrc::ui_element< Base >::ui_element ( const i_ui_element_parser aParser,
ui_element_type  aType,
const neolib::optional< neolib::string > &  aId 
)
inline

Definition at line 61 of file ui_element.hpp.

◆ ui_element() [3/5]

template<typename Base = i_ui_element>
neogfx::nrc::ui_element< Base >::ui_element ( const i_ui_element_parser aParser,
i_ui_element< Base > &  aParent,
ui_element_type  aType 
)
inline

Definition at line 66 of file ui_element.hpp.

◆ ui_element() [4/5]

template<typename Base = i_ui_element>
neogfx::nrc::ui_element< Base >::ui_element ( const i_ui_element_parser aParser,
i_ui_element< Base > &  aParent,
ui_element_type  aType,
const neolib::optional< neolib::string > &  aId 
)
inline

Definition at line 72 of file ui_element.hpp.

◆ ui_element() [5/5]

template<typename Base = i_ui_element>
neogfx::nrc::ui_element< Base >::ui_element ( const i_ui_element_parser aParser,
i_ui_element< Base > &  aParent,
member_element_t  ,
ui_element_type  aType 
)
inline

Definition at line 78 of file ui_element.hpp.

◆ ~ui_element()

template<typename Base = i_ui_element>
neogfx::nrc::ui_element< Base >::~ui_element ( )
inline

Definition at line 84 of file ui_element.hpp.

Member Function Documentation

◆ add_data_names()

template<typename Base = i_ui_element>
void neogfx::nrc::ui_element< Base >::add_data_names ( data_names_t  aNames)
inlineprotected

Definition at line 239 of file ui_element.hpp.

◆ add_element_ref()

template<typename Base = i_ui_element>
void neogfx::nrc::ui_element< Base >::add_element_ref ( const neolib::i_string aRef)
inlineoverrideprotected

Definition at line 347 of file ui_element.hpp.

◆ add_header()

template<typename Base = i_ui_element>
void neogfx::nrc::ui_element< Base >::add_header ( std::string const &  aHeader)
inline

Definition at line 119 of file ui_element.hpp.

◆ anonymous()

template<typename Base = i_ui_element>
bool neogfx::nrc::ui_element< Base >::anonymous ( ) const
inlineoverride

Definition at line 128 of file ui_element.hpp.

◆ anonymous_id()

template<typename Base = i_ui_element>
const neolib::i_string & neogfx::nrc::ui_element< Base >::anonymous_id ( ) const
inlineoverride

Definition at line 138 of file ui_element.hpp.

◆ children() [1/2]

template<typename Base = i_ui_element>
const children_t & neogfx::nrc::ui_element< Base >::children ( ) const
inlineoverride

Definition at line 208 of file ui_element.hpp.

◆ children() [2/2]

template<typename Base = i_ui_element>
children_t & neogfx::nrc::ui_element< Base >::children ( )
inlineoverride

Definition at line 212 of file ui_element.hpp.

◆ data_names()

template<typename Base = i_ui_element>
const data_names_t & neogfx::nrc::ui_element< Base >::data_names ( ) const
inlineprotected

Definition at line 235 of file ui_element.hpp.

◆ element_refs()

template<typename Base = i_ui_element>
const neolib::i_set< neolib::i_string > & neogfx::nrc::ui_element< Base >::element_refs ( ) const
inlineoverrideprotected

Definition at line 358 of file ui_element.hpp.

◆ emit() [1/2]

template<typename Base = i_ui_element>
void neogfx::nrc::ui_element< Base >::emit ( std::string const &  aArgument) const
inlineprotected

Definition at line 541 of file ui_element.hpp.

◆ emit() [2/2]

template<typename Base = i_ui_element>
template<typename... Args>
void neogfx::nrc::ui_element< Base >::emit ( std::string const &  aFormat,
const Args &...  aArguments 
) const
inlineprotected

Definition at line 546 of file ui_element.hpp.

◆ emit_body()

template<typename Base = i_ui_element>
void neogfx::nrc::ui_element< Base >::emit_body ( ) const
inlineoverrideprotected

Definition at line 406 of file ui_element.hpp.

◆ emit_ctor()

template<typename Base = i_ui_element>
void neogfx::nrc::ui_element< Base >::emit_ctor ( ) const
inlineoverrideprotected

Definition at line 401 of file ui_element.hpp.

◆ emit_generic_ctor() [1/4]

template<typename Base = i_ui_element>
void neogfx::nrc::ui_element< Base >::emit_generic_ctor ( ) const
inlineprotected

Definition at line 510 of file ui_element.hpp.

◆ emit_generic_ctor() [2/4]

template<typename Base = i_ui_element>
void neogfx::nrc::ui_element< Base >::emit_generic_ctor ( const std::optional< neolib::string > &  aText) const
inlineprotected

Definition at line 517 of file ui_element.hpp.

◆ emit_generic_ctor() [3/4]

template<typename Base = i_ui_element>
template<typename T >
void neogfx::nrc::ui_element< Base >::emit_generic_ctor ( const T &  aArgument) const
inlineprotected

Definition at line 533 of file ui_element.hpp.

◆ emit_generic_ctor() [4/4]

template<typename Base = i_ui_element>
template<typename Enum >
std::enable_if_t< std::is_enum_v< Enum >, void > neogfx::nrc::ui_element< Base >::emit_generic_ctor ( std::string const &  aEnumName,
Enum  aEnum 
) const
inlineprotected

Definition at line 525 of file ui_element.hpp.

◆ emit_preamble()

template<typename Base = i_ui_element>
void neogfx::nrc::ui_element< Base >::emit_preamble ( ) const
inlineoverrideprotected

Definition at line 396 of file ui_element.hpp.

◆ fragment() [1/2]

template<typename Base = i_ui_element>
const i_ui_element & neogfx::nrc::ui_element< Base >::fragment ( ) const
inlineoverride

Definition at line 183 of file ui_element.hpp.

◆ fragment() [2/2]

template<typename Base = i_ui_element>
i_ui_element & neogfx::nrc::ui_element< Base >::fragment ( )
inlineoverride

Definition at line 190 of file ui_element.hpp.

◆ fragment_name()

template<typename Base = i_ui_element>
const neolib::i_string & neogfx::nrc::ui_element< Base >::fragment_name ( ) const
inlineoverride

Definition at line 97 of file ui_element.hpp.

◆ generate_anonymous_id()

template<typename Base = i_ui_element>
void neogfx::nrc::ui_element< Base >::generate_anonymous_id ( neolib::i_string aNewAnonymousId) const
inlineoverride

Definition at line 173 of file ui_element.hpp.

◆ generate_base_ctor_args()

template<typename Base = i_ui_element>
const neolib::i_string & neogfx::nrc::ui_element< Base >::generate_base_ctor_args ( bool  aArgsAfter = false) const
inlineoverrideprotected

Definition at line 380 of file ui_element.hpp.

◆ generate_ctor_params()

template<typename Base = i_ui_element>
const neolib::i_string & neogfx::nrc::ui_element< Base >::generate_ctor_params ( bool  aParamsAfter = false) const
inlineoverrideprotected

Definition at line 362 of file ui_element.hpp.

◆ has_parent()

template<typename Base = i_ui_element>
bool neogfx::nrc::ui_element< Base >::has_parent ( ) const
inlineoverride

Definition at line 194 of file ui_element.hpp.

◆ headers()

template<typename Base = i_ui_element>
const neolib::i_vector< neolib::i_string > & neogfx::nrc::ui_element< Base >::headers ( ) const
inlineoverride

Definition at line 115 of file ui_element.hpp.

◆ id()

template<typename Base = i_ui_element>
const neolib::i_string & neogfx::nrc::ui_element< Base >::id ( ) const
inlineoverride

Definition at line 132 of file ui_element.hpp.

◆ instantiate() [1/3]

template<typename Base = i_ui_element>
void neogfx::nrc::ui_element< Base >::instantiate ( i_app aApp)
inlineoverride

Definition at line 217 of file ui_element.hpp.

◆ instantiate() [2/3]

template<typename Base = i_ui_element>
void neogfx::nrc::ui_element< Base >::instantiate ( i_layout aLayout)
inlineoverride

Definition at line 223 of file ui_element.hpp.

◆ instantiate() [3/3]

template<typename Base = i_ui_element>
void neogfx::nrc::ui_element< Base >::instantiate ( i_widget aWidget)
inlineoverride

Definition at line 220 of file ui_element.hpp.

◆ is_member_element()

template<typename Base = i_ui_element>
bool neogfx::nrc::ui_element< Base >::is_member_element ( ) const
inlineoverride

Definition at line 124 of file ui_element.hpp.

◆ layout()

template<typename Base = i_ui_element>
neolib::string neogfx::nrc::ui_element< Base >::layout ( ) const
inlineprotected

Definition at line 487 of file ui_element.hpp.

◆ name()

template<typename Base = i_ui_element>
const neolib::i_string & neogfx::nrc::ui_element< Base >::name ( ) const
inlineoverride

Definition at line 93 of file ui_element.hpp.

◆ parent() [1/2]

template<typename Base = i_ui_element>
const i_ui_element & neogfx::nrc::ui_element< Base >::parent ( ) const
inlineoverride

Definition at line 198 of file ui_element.hpp.

◆ parent() [2/2]

template<typename Base = i_ui_element>
i_ui_element & neogfx::nrc::ui_element< Base >::parent ( )
inlineoverride

Definition at line 204 of file ui_element.hpp.

◆ parse() [1/2]

template<typename Base = i_ui_element>
void neogfx::nrc::ui_element< Base >::parse ( const neolib::i_string aName,
const array_data_t &  aArrayData 
)
inlineoverrideprotected

Definition at line 317 of file ui_element.hpp.

◆ parse() [2/2]

template<typename Base = i_ui_element>
void neogfx::nrc::ui_element< Base >::parse ( const neolib::i_string aName,
const data_t &  aData 
)
inlineoverrideprotected

Definition at line 243 of file ui_element.hpp.

◆ parser()

template<typename Base = i_ui_element>
const i_ui_element_parser & neogfx::nrc::ui_element< Base >::parser ( ) const
inlineoverride

Definition at line 88 of file ui_element.hpp.

◆ set_type_name()

template<typename Base = i_ui_element>
void neogfx::nrc::ui_element< Base >::set_type_name ( const neolib::i_string aTypeName)
inlineoverride

Definition at line 111 of file ui_element.hpp.

◆ type()

template<typename Base = i_ui_element>
ui_element_type neogfx::nrc::ui_element< Base >::type ( ) const
inlineoverride

Definition at line 177 of file ui_element.hpp.

◆ type_name()

template<typename Base = i_ui_element>
const neolib::i_string & neogfx::nrc::ui_element< Base >::type_name ( ) const
inlineoverride

Definition at line 101 of file ui_element.hpp.


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