Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator > Class Template Reference

#include <kanzi/ui/node/concept/list_box/default_list_box_item_generator.hpp>

Inheritance diagram for kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >:
[legend]

Public Types

typedef shared_ptr< DefaultListBoxItemGenerator< TBaseItemGenerator > > DefaultListBoxItemGeneratorSharedPtr
 

Public Member Functions

TBaseItemGenerator::ItemSharedPtr acquireItem (size_t index) override
 Gets an object that should be displayed at the given index. More...
 
void attach (typename TBaseItemGenerator::ListBoxType &) override
 Attaches the Object Generator. More...
 
void detach (typename TBaseItemGenerator::ListBoxType &) override
 Detaches the Object Generator. More...
 
optional< size_t > findListIndex (typename TBaseItemGenerator::ItemSharedPtr const &object)
 Finds index of the given object in the list. More...
 
size_t getCount () override
 Gets the number of objects known by the object generator. More...
 
optional< size_t > getItemIndex (typename TBaseItemGenerator::ItemSharedPtr object) override
 Gets index of an object that has been returned from getObject, or KZU_UI_LIST_BOX_NO_ITEM if the object does not exist. More...
 
TBaseItemGenerator::VectorType getItemSize (size_t index) override
 Gets exact size of the object that should be displayed at the given index. More...
 
size_t getListCount ()
 Returns the number of objects controlled by the list interface. More...
 
TBaseItemGenerator::ItemSharedPtr getListObject (size_t index)
 Gets the object at the given index of the list. More...
 
void insertListObject (size_t index, typename TBaseItemGenerator::ItemSharedPtr object)
 Inserts an object at the given index. More...
 
void releaseItem (typename TBaseItemGenerator::ItemSharedPtr) override
 Frees an object that has been returned from getObject. More...
 
void removeListObject (size_t index)
 Removes an object at the given index from the object generator's list. More...
 
void replaceListObject (size_t index, typename TBaseItemGenerator::ItemSharedPtr object)
 Replaces the object at the given index in the object generator's list. More...
 

Static Public Member Functions

static DefaultListBoxItemGeneratorSharedPtr create (Domain *domain, string_view)
 
static void doArrange (Node3D &node)
 
static void doArrange (Node2D &node)
 
static void doRemeasure (Node3D &node)
 
static void doRemeasure (Node2D &node)
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 

Protected Member Functions

 DefaultListBoxItemGenerator (Domain *domain)
 

Member Typedef Documentation

template<typename TBaseItemGenerator >
typedef shared_ptr<DefaultListBoxItemGenerator<TBaseItemGenerator> > kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::DefaultListBoxItemGeneratorSharedPtr

Constructor & Destructor Documentation

template<typename TBaseItemGenerator >
kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::DefaultListBoxItemGenerator ( Domain domain)
inlineexplicitprotected

Member Function Documentation

template<typename TBaseItemGenerator >
static PropertyTypeEditorInfoSharedPtr kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::makeEditorInfo ( )
inlinestatic
template<typename TBaseItemGenerator >
static DefaultListBoxItemGeneratorSharedPtr kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::create ( Domain domain,
string_view   
)
inlinestatic
template<typename TBaseItemGenerator >
size_t kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::getListCount ( )
inline

Returns the number of objects controlled by the list interface.

template<typename TBaseItemGenerator >
TBaseItemGenerator::ItemSharedPtr kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::getListObject ( size_t  index)
inline

Gets the object at the given index of the list.

template<typename TBaseItemGenerator >
optional<size_t> kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::findListIndex ( typename TBaseItemGenerator::ItemSharedPtr const &  object)
inline

Finds index of the given object in the list.

template<typename TBaseItemGenerator >
void kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::insertListObject ( size_t  index,
typename TBaseItemGenerator::ItemSharedPtr  object 
)
inline

Inserts an object at the given index.

template<typename TBaseItemGenerator >
void kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::removeListObject ( size_t  index)
inline

Removes an object at the given index from the object generator's list.

template<typename TBaseItemGenerator >
void kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::replaceListObject ( size_t  index,
typename TBaseItemGenerator::ItemSharedPtr  object 
)
inline

Replaces the object at the given index in the object generator's list.

template<typename TBaseItemGenerator >
void kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::attach ( typename TBaseItemGenerator::ListBoxType &  )
inlineoverride

Attaches the Object Generator.

template<typename TBaseItemGenerator >
void kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::detach ( typename TBaseItemGenerator::ListBoxType &  )
inlineoverride

Detaches the Object Generator.

template<typename TBaseItemGenerator >
TBaseItemGenerator::ItemSharedPtr kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::acquireItem ( size_t  index)
inlineoverride

Gets an object that should be displayed at the given index.

If the object has already been created and not freed afterwards, returns the object from cache.

template<typename TBaseItemGenerator >
void kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::releaseItem ( typename TBaseItemGenerator::ItemSharedPtr  )
inlineoverride

Frees an object that has been returned from getObject.

template<typename TBaseItemGenerator >
optional<size_t> kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::getItemIndex ( typename TBaseItemGenerator::ItemSharedPtr  object)
inlineoverride

Gets index of an object that has been returned from getObject, or KZU_UI_LIST_BOX_NO_ITEM if the object does not exist.

template<typename TBaseItemGenerator >
static void kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::doRemeasure ( Node3D node)
inlinestatic
template<typename TBaseItemGenerator >
static void kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::doRemeasure ( Node2D node)
inlinestatic
template<typename TBaseItemGenerator >
static void kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::doArrange ( Node3D node)
inlinestatic
template<typename TBaseItemGenerator >
static void kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::doArrange ( Node2D node)
inlinestatic
template<typename TBaseItemGenerator >
TBaseItemGenerator::VectorType kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::getItemSize ( size_t  index)
inlineoverride

Gets exact size of the object that should be displayed at the given index.

This size will be used unless the list box is provided an object prototype. If it is not possible to determine item size, unbounded layout value is returned. Caching the sizes may be a good idea.

template<typename TBaseItemGenerator >
size_t kanzi::DefaultListBoxItemGenerator< TBaseItemGenerator >::getCount ( )
inlineoverride

Gets the number of objects known by the object generator.

Last index can be calculated as 'count' - 1.


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