xtd 0.2.0
Loading...
Searching...
No Matches
xtd::forms::layout::arranged_element_collection< type_t, sorter_t > Class Template Reference
Inheritance diagram for xtd::forms::layout::arranged_element_collection< type_t, sorter_t >:
xtd::object

Definition

template<typename type_t, typename sorter_t = sorter_none>
class xtd::forms::layout::arranged_element_collection< type_t, sorter_t >

Represents a collection of objects.

Header
#include <xtd/forms/layout/arranged_element_collection>
Namespace
xtd::forms::layout
Library
xtd.forms
Remarks
The xtd::forms::layout::arranged_element_collection class represents a collection of objects arranged on a design surface or inside a parent xtd.forms::container_control.
Examples
emoticons.cpp.

Classes

class  value_type
 Represents the value type of the collection. More...
 

Public Aliases

using allocator_type = std::allocator< value_type >
 Represents the allocator type of the collection.
 
using size_type = std::size_t
 Represents the size type of the collection.
 
using difference_type = std::ptrdiff_t
 Represents the pointer difference type of the collection.
 
using reference = value_type &
 Represents the value type reference of the collection.
 
using const_reference = const value_type &
 Represents the value type const reference the collection.
 
using pointer = typename std::allocator_traits< allocator_type >::pointer
 Represents the value type pointer of the collection.
 
using const_pointer = typename std::allocator_traits< allocator_type >::const_pointer
 Represents the value type const pointer of the collection.
 
using iterator = typename std::vector< value_type >::iterator
 Represents the iterator type of the collection.
 
using const_iterator = typename std::vector< value_type >::const_iterator
 Represents the const iterator type of the collection.
 
using reverse_iterator = typename std::vector< value_type >::reverse_iterator
 Represents the reverse iterator type of the collection.
 
using const_reverse_iterator = typename std::vector< value_type >::const_reverse_iterator
 Represents the const reverse iterator type of the collection.
 

Public Fields

static constexpr xtd::size npos
 This is a special value equal to the maximum value representable by the type size_t.
 

Public Events

event< arranged_element_collection, delegate< void(size_t, type_t &item)> > item_added
 Occurs when an item is added to the collection.
 
event< arranged_element_collection, delegate< void(size_t, type_t &item)> > item_updated
 Occurs when an item is updated in the collection.
 
event< arranged_element_collection, delegate< void(size_t, type_t &item)> > item_removed
 Occurs when an item is removed from the collection.
 

Public Constructors

 arranged_element_collection (const allocator_type &allocator=allocator_type())
 Creates a new object xtd::forms::layout::arranged_element_collection with specified allocator (optional).
 
 arranged_element_collection (const std::initializer_list< type_t > &il)
 Creates a new object xtd::diagnostics::trace_listener_collection with specified initializer list.
 

Public Methods

allocator_type get_allocator () const noexcept
 Returns the associated allocator.
 
reference at (size_type pos)
 Access specified element with bounds checking.
 
const_reference at (size_type pos) const
 Access specified element with bounds checking.
 
reference front ()
 Access the first element.
 
const_reference front () const
 Access the first element.
 
reference back ()
 Access the last element.
 
const_reference back () const
 Access the last element.
 
pointer data ()
 Direct access to the underlying array.
 
const_pointer data () const
 Direct access to the underlying array.
 
iterator begin () noexcept
 Returns an iterator to the beginning.
 
const_iterator begin () const noexcept
 Returns an iterator to the beginning.
 
const_iterator cbegin () const noexcept
 Returns an iterator to the beginning.
 
iterator end () noexcept
 Returns an iterator to the end.
 
const_iterator end () const noexcept
 Returns an iterator to the end.
 
const_iterator cend () const noexcept
 Returns an iterator to the end.
 
reverse_iterator rbegin () noexcept
 Returns a reverse iterator to the end.
 
const_reverse_iterator rbegin () const noexcept
 Returns a reverse iterator to the end.
 
const_reverse_iterator crbegin () const noexcept
 Returns a reverse iterator to the end.
 
reverse_iterator rend () noexcept
 Returns a reverse iterator to the end.
 
const_reverse_iterator rend () const noexcept
 Returns a reverse iterator to the end.
 
const_reverse_iterator crend () const noexcept
 Returns a reverse iterator to the end.
 
bool empty () const noexcept
 Checks whether the container is empty.
 
size_type size () const noexcept
 Returns the number of elements.
 
size_type max_size () const noexcept
 Returns the maximum possible number of elements.
 
void reserve (size_type size)
 Reserves storage.
 
size_type capacity () const noexcept
 Returns the number of elements that can be held in currently allocated storage.
 
void shrink_to_fit ()
 Reduces memory usage by freeing unused memory.
 
virtual bool sorted () const noexcept
 Checks whether the container is sorted.
 
virtual void sorted (bool value)
 Sets the container is sorted.
 
virtual void clear () noexcept
 clears the contents.
 
virtual iterator insert (const_iterator pos, const value_type &value)
 Inserts specified element at specified position.
 
virtual iterator insert (const_iterator pos, value_type &&value)
 Inserts specified element at specified position.
 
virtual void insert_at (size_t index, const value_type &value)
 Inserts specified element at specified index.
 
template<typename ... args_t>
void emplace (const_iterator pos, args_t &&... args)
 Inserts specified element at specified position.
 
template<typename ... args_t>
void emplace_back (args_t &&... args)
 Adds an element to the end.
 
virtual iterator erase (iterator pos)
 Erases element at specified position.
 
virtual iterator erase (const_iterator pos)
 Erases element at specified position.
 
virtual iterator erase (iterator first, iterator last)
 Erases elements at specified range.
 
virtual iterator erase (const_iterator first, const_iterator last)
 Erases elements at specified range.
 
virtual void erase_at (size_t index)
 Erases element at specified index.
 
virtual void pop_back ()
 Removes the last element of the container.
 
virtual void push_back (const value_type &item)
 Adds an element to the end.
 
virtual void push_back (value_type &&item)
 Adds an element to the end.
 
virtual void push_back_range (const arranged_element_collection &collection)
 Adds elements to the end.
 
virtual void push_back_range (const std::vector< value_type > &collection)
 Adds elements to the end.
 
virtual void push_back_range (const std::initializer_list< value_type > &collection)
 Adds elements to the end.
 
template<typename collection_t >
void push_back_range (collection_t &&collection)
 Adds elements to the end.
 
template<typename iterator_t >
void push_back_range (iterator_t begin, iterator_t end)
 Adds elements to the end.
 
virtual void sort ()
 Sorts the content.
 
std::vector< type_t > to_array () const noexcept
 Gets an array with the elements of the container.
 
std::vector< type_t > to_vector () const noexcept
 Gets an array with the elements of the container.
 

Public Operators

reference operator[] (size_type pos)
 Access specified element.
 
const_reference operator[] (size_type pos) const
 Access specified element.
 

Protected Methods

virtual void on_item_added (size_t index, type_t &item)
 Raises the xtd::forms::layout::arranged_element_collection::item_added event.
 
virtual void on_item_updated (size_t index, type_t &item)
 Raises the xtd::forms::layout::arranged_element_collection::item_updated event.
 
virtual void on_item_removed (size_t index, type_t &item)
 Raises the xtd::forms::layout::arranged_element_collection::item_removed event.
 

Additional Inherited Members

- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
virtual bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object.
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<typename object_t >
xtd::uptr< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
virtual xtd::string to_string () const noexcept
 Returns a xtd::string that represents the current object.
 
- Static Public Member Functions inherited from xtd::object
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
template<typename object_a_t , typename object_b_t >
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 

Member Typedef Documentation

◆ allocator_type

template<typename type_t , typename sorter_t = sorter_none>
using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::allocator_type = std::allocator<value_type>

Represents the allocator type of the collection.

◆ size_type

template<typename type_t , typename sorter_t = sorter_none>
using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::size_type = std::size_t

Represents the size type of the collection.

◆ difference_type

template<typename type_t , typename sorter_t = sorter_none>
using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::difference_type = std::ptrdiff_t

Represents the pointer difference type of the collection.

◆ reference

template<typename type_t , typename sorter_t = sorter_none>
using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::reference = value_type&

Represents the value type reference of the collection.

◆ const_reference

template<typename type_t , typename sorter_t = sorter_none>
using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::const_reference = const value_type&

Represents the value type const reference the collection.

◆ pointer

template<typename type_t , typename sorter_t = sorter_none>
using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::pointer = typename std::allocator_traits<allocator_type>::pointer

Represents the value type pointer of the collection.

◆ const_pointer

template<typename type_t , typename sorter_t = sorter_none>
using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::const_pointer = typename std::allocator_traits<allocator_type>::const_pointer

Represents the value type const pointer of the collection.

◆ iterator

template<typename type_t , typename sorter_t = sorter_none>
using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::iterator = typename std::vector<value_type>::iterator

Represents the iterator type of the collection.

◆ const_iterator

template<typename type_t , typename sorter_t = sorter_none>
using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::const_iterator = typename std::vector<value_type>::const_iterator

Represents the const iterator type of the collection.

◆ reverse_iterator

template<typename type_t , typename sorter_t = sorter_none>
using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::reverse_iterator = typename std::vector<value_type>::reverse_iterator

Represents the reverse iterator type of the collection.

◆ const_reverse_iterator

template<typename type_t , typename sorter_t = sorter_none>
using xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::const_reverse_iterator = typename std::vector<value_type>::const_reverse_iterator

Represents the const reverse iterator type of the collection.

Constructor & Destructor Documentation

◆ arranged_element_collection() [1/2]

template<typename type_t , typename sorter_t = sorter_none>
xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::arranged_element_collection ( const allocator_type allocator = allocator_type())
inlineexplicit

Creates a new object xtd::forms::layout::arranged_element_collection with specified allocator (optional).

Parameters
allocatorThe allocator associate to the collection (optional).
Remarks
If allocator not specified, the std::allocator<value_type> is used.

◆ arranged_element_collection() [2/2]

template<typename type_t , typename sorter_t = sorter_none>
xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::arranged_element_collection ( const std::initializer_list< type_t > &  il)
inline

Creates a new object xtd::diagnostics::trace_listener_collection with specified initializer list.

Parameters
ilThe initializer list that contains items to fill the collection.

Member Function Documentation

◆ get_allocator()

template<typename type_t , typename sorter_t = sorter_none>
allocator_type xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::get_allocator ( ) const
inlinenoexcept

Returns the associated allocator.

Returns
The associate allocator.

◆ at() [1/2]

template<typename type_t , typename sorter_t = sorter_none>
reference xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::at ( size_type  pos)
inline

Access specified element with bounds checking.

Parameters
posThe position of the element to return.
Exceptions
std::out_of_rangepos is greater than arranged_element_collection::size.

◆ at() [2/2]

template<typename type_t , typename sorter_t = sorter_none>
const_reference xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::at ( size_type  pos) const
inline

Access specified element with bounds checking.

Parameters
posThe position of the element to return.
Exceptions
std::out_of_rangepos is greater than arranged_element_collection::size.

◆ front() [1/2]

template<typename type_t , typename sorter_t = sorter_none>
reference xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::front ( )
inline

Access the first element.

Returns
The first element.

◆ front() [2/2]

template<typename type_t , typename sorter_t = sorter_none>
const_reference xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::front ( ) const
inline

Access the first element.

Returns
The first element.

◆ back() [1/2]

template<typename type_t , typename sorter_t = sorter_none>
reference xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::back ( )
inline

Access the last element.

Returns
The last element.

◆ back() [2/2]

template<typename type_t , typename sorter_t = sorter_none>
const_reference xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::back ( ) const
inline

Access the last element.

Returns
The last element.

◆ data() [1/2]

template<typename type_t , typename sorter_t = sorter_none>
pointer xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::data ( )
inline

Direct access to the underlying array.

Returns
The underlying array.

◆ data() [2/2]

template<typename type_t , typename sorter_t = sorter_none>
const_pointer xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::data ( ) const
inline

Direct access to the underlying array.

Returns
The underlying array.

◆ begin() [1/2]

template<typename type_t , typename sorter_t = sorter_none>
iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::begin ( )
inlinenoexcept

Returns an iterator to the beginning.

Returns
The iterator to the beginning.

◆ begin() [2/2]

template<typename type_t , typename sorter_t = sorter_none>
const_iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::begin ( ) const
inlinenoexcept

Returns an iterator to the beginning.

Returns
The iterator to the beginning.

◆ cbegin()

template<typename type_t , typename sorter_t = sorter_none>
const_iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::cbegin ( ) const
inlinenoexcept

Returns an iterator to the beginning.

Returns
The iterator to the beginning.

◆ end() [1/2]

template<typename type_t , typename sorter_t = sorter_none>
iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::end ( )
inlinenoexcept

Returns an iterator to the end.

Returns
The iterator to the end.

◆ end() [2/2]

template<typename type_t , typename sorter_t = sorter_none>
const_iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::end ( ) const
inlinenoexcept

Returns an iterator to the end.

Returns
The iterator to the end.

◆ cend()

template<typename type_t , typename sorter_t = sorter_none>
const_iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::cend ( ) const
inlinenoexcept

Returns an iterator to the end.

Returns
The iterator to the end.

◆ rbegin() [1/2]

template<typename type_t , typename sorter_t = sorter_none>
reverse_iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::rbegin ( )
inlinenoexcept

Returns a reverse iterator to the end.

Returns
The reverse iterator to the end.

◆ rbegin() [2/2]

template<typename type_t , typename sorter_t = sorter_none>
const_reverse_iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::rbegin ( ) const
inlinenoexcept

Returns a reverse iterator to the end.

Returns
The reverse iterator to the end.

◆ crbegin()

template<typename type_t , typename sorter_t = sorter_none>
const_reverse_iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::crbegin ( ) const
inlinenoexcept

Returns a reverse iterator to the end.

Returns
The reverse iterator to the end.

◆ rend() [1/2]

template<typename type_t , typename sorter_t = sorter_none>
reverse_iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::rend ( )
inlinenoexcept

Returns a reverse iterator to the end.

Returns
The reverse iterator to the end.

◆ rend() [2/2]

template<typename type_t , typename sorter_t = sorter_none>
const_reverse_iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::rend ( ) const
inlinenoexcept

Returns a reverse iterator to the end.

Returns
The reverse iterator to the end.

◆ crend()

template<typename type_t , typename sorter_t = sorter_none>
const_reverse_iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::crend ( ) const
inlinenoexcept

Returns a reverse iterator to the end.

Returns
The reverse iterator to the end.

◆ empty()

template<typename type_t , typename sorter_t = sorter_none>
bool xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::empty ( ) const
inlinenoexcept

Checks whether the container is empty.

Returns
true if container is empty; otherwise false.

◆ size()

template<typename type_t , typename sorter_t = sorter_none>
size_type xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::size ( ) const
inlinenoexcept

Returns the number of elements.

Returns
The number of elements.

◆ max_size()

template<typename type_t , typename sorter_t = sorter_none>
size_type xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::max_size ( ) const
inlinenoexcept

Returns the maximum possible number of elements.

Returns
The maximum possible number of elements.

◆ reserve()

template<typename type_t , typename sorter_t = sorter_none>
void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::reserve ( size_type  size)
inline

Reserves storage.

◆ capacity()

template<typename type_t , typename sorter_t = sorter_none>
size_type xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::capacity ( ) const
inlinenoexcept

Returns the number of elements that can be held in currently allocated storage.

Returns
The number of elements that can be held in currently allocated storage.

◆ shrink_to_fit()

template<typename type_t , typename sorter_t = sorter_none>
void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::shrink_to_fit ( )
inline

Reduces memory usage by freeing unused memory.

◆ sorted() [1/2]

template<typename type_t , typename sorter_t = sorter_none>
virtual bool xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::sorted ( ) const
inlinevirtualnoexcept

Checks whether the container is sorted.

Returns
true if container is sorted; otherwise false.

◆ sorted() [2/2]

template<typename type_t , typename sorter_t = sorter_none>
virtual void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::sorted ( bool  value)
inlinevirtual

Sets the container is sorted.

Parameters
valuetrue if container is sorted; otherwise false.

◆ clear()

template<typename type_t , typename sorter_t = sorter_none>
virtual void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::clear ( )
inlinevirtualnoexcept

clears the contents.

◆ insert() [1/2]

template<typename type_t , typename sorter_t = sorter_none>
virtual iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::insert ( const_iterator  pos,
const value_type value 
)
inlinevirtual

Inserts specified element at specified position.

Parameters
posThe iterator before which the content will be inserted. pos may be the arranged_element_collection::end iterator.
valueThe element to insert.

Reimplemented in xtd::forms::control::control_collection.

◆ insert() [2/2]

template<typename type_t , typename sorter_t = sorter_none>
virtual iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::insert ( const_iterator  pos,
value_type &&  value 
)
inlinevirtual

Inserts specified element at specified position.

Parameters
posThe iterator before which the content will be inserted. pos may be the arranged_element_collection::end iterator.
valueThe element to insert.

◆ insert_at()

template<typename type_t , typename sorter_t = sorter_none>
virtual void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::insert_at ( size_t  index,
const value_type value 
)
inlinevirtual

Inserts specified element at specified index.

Parameters
indexThe index before which the content will be inserted.
valueThe element to insert.

Reimplemented in xtd::forms::control::control_collection.

◆ emplace()

template<typename type_t , typename sorter_t = sorter_none>
template<typename ... args_t>
void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::emplace ( const_iterator  pos,
args_t &&...  args 
)
inline

Inserts specified element at specified position.

Parameters
posThe iterator before which the content will be inserted. pos may be the arranged_element_collection::end iterator.
argsThe arguments to forward to the constructor of the element

◆ emplace_back()

template<typename type_t , typename sorter_t = sorter_none>
template<typename ... args_t>
void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::emplace_back ( args_t &&...  args)
inline

Adds an element to the end.

Parameters
argsThe arguments to forward to the constructor of the element

◆ erase() [1/4]

template<typename type_t , typename sorter_t = sorter_none>
virtual iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::erase ( iterator  pos)
inlinevirtual

Erases element at specified position.

Parameters
posThe iterator which the content will be erased.

◆ erase() [2/4]

template<typename type_t , typename sorter_t = sorter_none>
virtual iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::erase ( const_iterator  pos)
inlinevirtual

Erases element at specified position.

Parameters
posThe iterator which the content will be erased.

◆ erase() [3/4]

template<typename type_t , typename sorter_t = sorter_none>
virtual iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::erase ( iterator  first,
iterator  last 
)
inlinevirtual

Erases elements at specified range.

Parameters
firstThe first iterator range which the content will be erased.
firstThe last iterator range which the content will be erased.

◆ erase() [4/4]

template<typename type_t , typename sorter_t = sorter_none>
virtual iterator xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::erase ( const_iterator  first,
const_iterator  last 
)
inlinevirtual

Erases elements at specified range.

Parameters
firstThe first iterator range which the content will be erased.
firstThe last iterator range which the content will be erased.

◆ erase_at()

template<typename type_t , typename sorter_t = sorter_none>
virtual void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::erase_at ( size_t  index)
inlinevirtual

Erases element at specified index.

Parameters
posThe index which the content will be erased.

◆ pop_back()

template<typename type_t , typename sorter_t = sorter_none>
virtual void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::pop_back ( )
inlinevirtual

Removes the last element of the container.

◆ push_back() [1/2]

template<typename type_t , typename sorter_t = sorter_none>
virtual void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::push_back ( const value_type item)
inlinevirtual

Adds an element to the end.

Parameters
itemThe element to add.

Reimplemented in xtd::forms::control::control_collection.

◆ push_back() [2/2]

template<typename type_t , typename sorter_t = sorter_none>
virtual void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::push_back ( value_type &&  item)
inlinevirtual

Adds an element to the end.

Parameters
itemThe element to add.

◆ push_back_range() [1/5]

template<typename type_t , typename sorter_t = sorter_none>
virtual void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::push_back_range ( const arranged_element_collection< type_t, sorter_t > &  collection)
inlinevirtual

Adds elements to the end.

Parameters
collectionThe elements to add.
Examples
demo.cpp.

◆ push_back_range() [2/5]

template<typename type_t , typename sorter_t = sorter_none>
virtual void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::push_back_range ( const std::vector< value_type > &  collection)
inlinevirtual

Adds elements to the end.

Parameters
collectionThe elements to add.

◆ push_back_range() [3/5]

template<typename type_t , typename sorter_t = sorter_none>
virtual void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::push_back_range ( const std::initializer_list< value_type > &  collection)
inlinevirtual

Adds elements to the end.

Parameters
collectionThe elements to add.

◆ push_back_range() [4/5]

template<typename type_t , typename sorter_t = sorter_none>
template<typename collection_t >
void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::push_back_range ( collection_t &&  collection)
inline

Adds elements to the end.

Parameters
collectionThe elements to add.

◆ push_back_range() [5/5]

template<typename type_t , typename sorter_t = sorter_none>
template<typename iterator_t >
void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::push_back_range ( iterator_t  begin,
iterator_t  end 
)
inline

Adds elements to the end.

Parameters
collectionThe elements to add.

◆ sort()

template<typename type_t , typename sorter_t = sorter_none>
virtual void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::sort ( )
inlinevirtual

Sorts the content.

◆ to_array()

template<typename type_t , typename sorter_t = sorter_none>
std::vector< type_t > xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::to_array ( ) const
inlinenoexcept

Gets an array with the elements of the container.

Returns
The array that contains elements of the container.

◆ to_vector()

template<typename type_t , typename sorter_t = sorter_none>
std::vector< type_t > xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::to_vector ( ) const
inlinenoexcept

Gets an array with the elements of the container.

Returns
The array that contains elements of the container.

◆ operator[]() [1/2]

template<typename type_t , typename sorter_t = sorter_none>
reference xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::operator[] ( size_type  pos)
inline

Access specified element.

Returns
The requested element.

◆ operator[]() [2/2]

template<typename type_t , typename sorter_t = sorter_none>
const_reference xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::operator[] ( size_type  pos) const
inline

Access specified element.

Returns
The requested element.

◆ on_item_added()

template<typename type_t , typename sorter_t = sorter_none>
virtual void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::on_item_added ( size_t  index,
type_t &  item 
)
inlinevirtual

Raises the xtd::forms::layout::arranged_element_collection::item_added event.

Parameters
indexThe index of the item.
itemThe item added.

◆ on_item_updated()

template<typename type_t , typename sorter_t = sorter_none>
virtual void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::on_item_updated ( size_t  index,
type_t &  item 
)
inlinevirtual

Raises the xtd::forms::layout::arranged_element_collection::item_updated event.

Parameters
indexThe index of the item.
itemThe item updated.

◆ on_item_removed()

template<typename type_t , typename sorter_t = sorter_none>
virtual void xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::on_item_removed ( size_t  index,
type_t &  item 
)
inlinevirtual

Raises the xtd::forms::layout::arranged_element_collection::item_removed event.

Parameters
indexThe index of the item.
itemThe item removed.

Reimplemented in xtd::forms::control::control_collection.

Member Data Documentation

◆ npos

template<typename type_t , typename sorter_t = sorter_none>
constexpr xtd::size xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::npos
inlinestaticconstexpr

This is a special value equal to the maximum value representable by the type size_t.

◆ item_added

template<typename type_t , typename sorter_t = sorter_none>
event<arranged_element_collection, delegate<void(size_t, type_t& item)> > xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::item_added

Occurs when an item is added to the collection.

Remarks
For more information about handling events, see Handling and Raising Events.

◆ item_updated

template<typename type_t , typename sorter_t = sorter_none>
event<arranged_element_collection, delegate<void(size_t, type_t& item)> > xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::item_updated

Occurs when an item is updated in the collection.

Remarks
For more information about handling events, see Handling and Raising Events.

◆ item_removed

template<typename type_t , typename sorter_t = sorter_none>
event<arranged_element_collection, delegate<void(size_t, type_t& item)> > xtd::forms::layout::arranged_element_collection< type_t, sorter_t >::item_removed

Occurs when an item is removed from the collection.

Remarks
For more information about handling events, see Handling and Raising Events.

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