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

#include <item_selection_model.hpp>

Inheritance diagram for neogfx::basic_item_selection_model< Alloc >:
neogfx::object< reference_counted< i_item_selection_model > > neolib::object< Base > neogfx::i_properties neolib::lifetime< Base > neolib::i_lifetime

Public Types

typedef Alloc allocator_type
 
- Public Types inherited from neolib::lifetime< Base >
typedef neolib::destroyed_flag destroyed_flag
 

Public Member Functions

 define_declared_event (CurrentIndexChanged, current_index_changed, const optional_item_presentation_model_index &, const optional_item_presentation_model_index &) define_declared_event(SelectionChanged
 
const item_selection const item_selectiondefine_declared_event (PresentationModelAdded, presentation_model_added, i_item_presentation_model &) define_declared_event(PresentationModelChanged
 
const item_selection const item_selection i_item_presentation_model i_item_presentation_model & define_declared_event (PresentationModelRemoved, presentation_model_removed, i_item_presentation_model &) define_declared_event(ModeChanged
 
 basic_item_selection_model (item_selection_mode aMode=item_selection_mode::SingleSelection)
 
 basic_item_selection_model (i_item_presentation_model &aModel, item_selection_mode aMode=item_selection_mode::SingleSelection)
 
 ~basic_item_selection_model ()
 
bool has_presentation_model () const override
 
i_item_presentation_model & presentation_model () const override
 
void set_presentation_model (i_item_presentation_model &aModel) override
 
item_selection_mode mode () const override
 
void set_mode (item_selection_mode aMode) override
 
bool has_current_index () const override
 
item_presentation_model_index const & current_index () const override
 
void set_current_index (item_presentation_model_index const &aIndex) override
 
void clear_current_index () override
 
item_presentation_model_index relative_to_current_index (index_location aRelativeLocation, bool aSelectable=true, bool aEditable=false) const override
 
item_presentation_model_index relative_to_index (item_presentation_model_index const &aIndex, index_location aRelativeLocation, bool aSelectable=true, bool aEditable=false) const override
 
item_presentation_model_index next_cell () const override
 
item_presentation_model_index next_cell (item_presentation_model_index const &aIndex) const override
 
item_presentation_model_index previous_cell () const override
 
item_presentation_model_index previous_cell (item_presentation_model_index const &aIndex) const override
 
const item_selectionselection () const override
 
bool is_selected (item_presentation_model_index const &aIndex) const override
 
bool is_selectable (item_presentation_model_index const &aIndex) const override
 
void clear_selection () override
 
void select (item_presentation_model_index const &aIndex, item_selection_operation aOperation) override
 
void select (item_model_index const &aIndex, item_selection_operation aOperation) override
 
bool sorting () const override
 
bool filtering () const override
 
bool is_editable (item_presentation_model_index const &aIndex) const override
 
- Public Member Functions inherited from neogfx::object< reference_counted< i_item_selection_model > >
i_objectas_object () override
 
void class_name (neolib::i_string &aClassName) const override
 
neogfx::object_type object_type () const override
 
void property_changed (i_property &) override
 
const i_propertiesproperties () const override
 
i_propertiesproperties () override
 
void register_property (i_property &aProperty) override
 
const neogfx::property_mapproperty_map () const override
 
- Public Member Functions inherited from neolib::object< Base >
 define_declared_event (Destroying, destroying)
 
 define_declared_event (Destroyed, destroyed)
 
 object (lifetime_state aState=lifetime_state::Creating)
 
 ~object ()
 
void set_destroying () override
 
void set_destroyed () override
 
bool is_alive () const final
 
bool is_destroyed () const final
 
- Public Member Functions inherited from neolib::lifetime< Base >
 lifetime (lifetime_state aState=lifetime_state::Alive)
 
virtual ~lifetime ()
 
lifetime_state object_state () const final
 
std::shared_ptr< std::atomic< lifetime_state > > object_state_ptr () const final
 
bool is_creating () const final
 
bool is_destroying () const final
 
void set_alive () override
 
- Public Member Functions inherited from neolib::i_lifetime
virtual ~i_lifetime ()=default
 
- Public Member Functions inherited from neogfx::i_properties
uint32_t count () const
 
std::string name (uint32_t aIndex) const
 
const i_propertyproperty (uint32_t aIndex) const
 
i_propertyproperty (uint32_t aIndex)
 

Public Attributes

 selection_changed
 
const item_selection const item_selection presentation_model_changed
 
const item_selection const item_selection i_item_presentation_model i_item_presentation_model mode_changed
 

Additional Inherited Members

- Protected Member Functions inherited from neogfx::i_properties
neogfx::property_mapproperty_map ()
 

Detailed Description

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
class neogfx::basic_item_selection_model< Alloc >

Definition at line 32 of file item_selection_model.hpp.

Member Typedef Documentation

◆ allocator_type

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
typedef Alloc neogfx::basic_item_selection_model< Alloc >::allocator_type

Definition at line 42 of file item_selection_model.hpp.

Constructor & Destructor Documentation

◆ basic_item_selection_model() [1/2]

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
neogfx::basic_item_selection_model< Alloc >::basic_item_selection_model ( item_selection_mode  aMode = item_selection_mode::SingleSelection)
inline

Definition at line 47 of file item_selection_model.hpp.

◆ basic_item_selection_model() [2/2]

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
neogfx::basic_item_selection_model< Alloc >::basic_item_selection_model ( i_item_presentation_model &  aModel,
item_selection_mode  aMode = item_selection_mode::SingleSelection 
)
inline

Definition at line 57 of file item_selection_model.hpp.

◆ ~basic_item_selection_model()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
neogfx::basic_item_selection_model< Alloc >::~basic_item_selection_model ( )
inline

Definition at line 68 of file item_selection_model.hpp.

Member Function Documentation

◆ clear_current_index()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
void neogfx::basic_item_selection_model< Alloc >::clear_current_index ( )
inlineoverride

Definition at line 208 of file item_selection_model.hpp.

◆ clear_selection()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
void neogfx::basic_item_selection_model< Alloc >::clear_selection ( )
inlineoverride

Definition at line 346 of file item_selection_model.hpp.

◆ current_index()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
item_presentation_model_index const & neogfx::basic_item_selection_model< Alloc >::current_index ( ) const
inlineoverride

Definition at line 198 of file item_selection_model.hpp.

◆ define_declared_event() [1/3]

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
neogfx::basic_item_selection_model< Alloc >::define_declared_event ( CurrentIndexChanged  ,
current_index_changed  ,
const optional_item_presentation_model_index &  ,
const optional_item_presentation_model_index &   
)

◆ define_declared_event() [2/3]

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
const item_selection const item_selection & neogfx::basic_item_selection_model< Alloc >::define_declared_event ( PresentationModelAdded  ,
presentation_model_added  ,
i_item_presentation_model &   
)

◆ define_declared_event() [3/3]

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
const item_selection const item_selection i_item_presentation_model i_item_presentation_model & neogfx::basic_item_selection_model< Alloc >::define_declared_event ( PresentationModelRemoved  ,
presentation_model_removed  ,
i_item_presentation_model &   
)

◆ filtering()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
bool neogfx::basic_item_selection_model< Alloc >::filtering ( ) const
inlineoverride

Definition at line 503 of file item_selection_model.hpp.

◆ has_current_index()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
bool neogfx::basic_item_selection_model< Alloc >::has_current_index ( ) const
inlineoverride

Definition at line 194 of file item_selection_model.hpp.

◆ has_presentation_model()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
bool neogfx::basic_item_selection_model< Alloc >::has_presentation_model ( ) const
inlineoverride

Definition at line 74 of file item_selection_model.hpp.

◆ is_editable()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
bool neogfx::basic_item_selection_model< Alloc >::is_editable ( item_presentation_model_index const &  aIndex) const
inlineoverride

Definition at line 508 of file item_selection_model.hpp.

◆ is_selectable()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
bool neogfx::basic_item_selection_model< Alloc >::is_selectable ( item_presentation_model_index const &  aIndex) const
inlineoverride

Definition at line 342 of file item_selection_model.hpp.

◆ is_selected()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
bool neogfx::basic_item_selection_model< Alloc >::is_selected ( item_presentation_model_index const &  aIndex) const
inlineoverride

Definition at line 338 of file item_selection_model.hpp.

◆ mode()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
item_selection_mode neogfx::basic_item_selection_model< Alloc >::mode ( ) const
inlineoverride

Definition at line 181 of file item_selection_model.hpp.

◆ next_cell() [1/2]

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
item_presentation_model_index neogfx::basic_item_selection_model< Alloc >::next_cell ( ) const
inlineoverride

Definition at line 301 of file item_selection_model.hpp.

◆ next_cell() [2/2]

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
item_presentation_model_index neogfx::basic_item_selection_model< Alloc >::next_cell ( item_presentation_model_index const &  aIndex) const
inlineoverride

Definition at line 308 of file item_selection_model.hpp.

◆ presentation_model()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
i_item_presentation_model & neogfx::basic_item_selection_model< Alloc >::presentation_model ( ) const
inlineoverride

Definition at line 78 of file item_selection_model.hpp.

◆ previous_cell() [1/2]

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
item_presentation_model_index neogfx::basic_item_selection_model< Alloc >::previous_cell ( ) const
inlineoverride

Definition at line 317 of file item_selection_model.hpp.

◆ previous_cell() [2/2]

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
item_presentation_model_index neogfx::basic_item_selection_model< Alloc >::previous_cell ( item_presentation_model_index const &  aIndex) const
inlineoverride

Definition at line 324 of file item_selection_model.hpp.

◆ relative_to_current_index()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
item_presentation_model_index neogfx::basic_item_selection_model< Alloc >::relative_to_current_index ( index_location  aRelativeLocation,
bool  aSelectable = true,
bool  aEditable = false 
) const
inlineoverride

Definition at line 212 of file item_selection_model.hpp.

◆ relative_to_index()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
item_presentation_model_index neogfx::basic_item_selection_model< Alloc >::relative_to_index ( item_presentation_model_index const &  aIndex,
index_location  aRelativeLocation,
bool  aSelectable = true,
bool  aEditable = false 
) const
inlineoverride

Definition at line 216 of file item_selection_model.hpp.

◆ select() [1/2]

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
void neogfx::basic_item_selection_model< Alloc >::select ( item_model_index const &  aIndex,
item_selection_operation  aOperation 
)
inlineoverride

Definition at line 493 of file item_selection_model.hpp.

◆ select() [2/2]

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
void neogfx::basic_item_selection_model< Alloc >::select ( item_presentation_model_index const &  aIndex,
item_selection_operation  aOperation 
)
inlineoverride

Definition at line 356 of file item_selection_model.hpp.

◆ selection()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
const item_selection & neogfx::basic_item_selection_model< Alloc >::selection ( ) const
inlineoverride

Definition at line 334 of file item_selection_model.hpp.

◆ set_current_index()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
void neogfx::basic_item_selection_model< Alloc >::set_current_index ( item_presentation_model_index const &  aIndex)
inlineoverride

Definition at line 204 of file item_selection_model.hpp.

◆ set_mode()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
void neogfx::basic_item_selection_model< Alloc >::set_mode ( item_selection_mode  aMode)
inlineoverride

Definition at line 185 of file item_selection_model.hpp.

◆ set_presentation_model()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
void neogfx::basic_item_selection_model< Alloc >::set_presentation_model ( i_item_presentation_model &  aModel)
inlineoverride

Definition at line 84 of file item_selection_model.hpp.

◆ sorting()

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
bool neogfx::basic_item_selection_model< Alloc >::sorting ( ) const
inlineoverride

Definition at line 499 of file item_selection_model.hpp.

Member Data Documentation

◆ mode_changed

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
const item_selection const item_selection i_item_presentation_model i_item_presentation_model neogfx::basic_item_selection_model< Alloc >::mode_changed

Definition at line 40 of file item_selection_model.hpp.

◆ presentation_model_changed

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
const item_selection const item_selection neogfx::basic_item_selection_model< Alloc >::presentation_model_changed

Definition at line 38 of file item_selection_model.hpp.

◆ selection_changed

template<typename Alloc = std::allocator<std::pair<const item_presentation_model_index, selection_area>>>
neogfx::basic_item_selection_model< Alloc >::selection_changed

Definition at line 36 of file item_selection_model.hpp.


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