xtd 0.2.0
Loading...
Searching...
No Matches
xtd::forms::link_label::link_collection Class Reference
Inheritance diagram for xtd::forms::link_label::link_collection:
xtd::forms::layout::arranged_element_collection< xtd::forms::link_label::link > xtd::object

Definition

Represents a collection of controls.

Public Aliases

using base
 Represents the base type of the collection.
 

Public Constructors

 link_collection ()=default
 Creates a new object xtd::forms::control::control_collection with specified allocator (optional).
 

Operators

const_reference operator[] (const xtd::string &name) const noexcept
 Gets the first xtd::forms::control::control_collection in the list with the specified name.
 
reference operator[] (const xtd::string &name) noexcept
 Gets the first xtd::forms::control::control_collection in the list with the specified name.
 

Additional Inherited Members

using base_type
 Represents the list base type.
 
using const_base_type
 Represents the list base type.
 
using size_type
 Represents the list size type (usually xtd::size).
 
using reference
 Represents the reference of list value type.
 
using const_reference
 Represents the const reference of list value type.
 
using pointer
 Represents the pointer of list value type.
 
using const_pointer
 Represents the const pointer of list value type.
 
using read_only_collection
 Represents the read only collection of of list.
 
event< arranged_element_collection, delegate< void(size_t, xtd::forms::link_label::link &item)> > item_added
 Occurs when an item is added to the collection.
 
event< arranged_element_collection, delegate< void(size_t, xtd::forms::link_label::link &item)> > item_updated
 Occurs when an item is updated in the collection.
 
event< arranged_element_collection, delegate< void(size_t, xtd::forms::link_label::link &item)> > item_removed
 Occurs when an item is removed from the collection.
 
event< arranged_element_collection, delegate< void(size_t, xtd::forms::link_label::link &item)> > item_added
 Occurs when an item is added to the collection.
 
event< arranged_element_collection, delegate< void(size_t, xtd::forms::link_label::link &item)> > item_updated
 Occurs when an item is updated in the collection.
 
event< arranged_element_collection, delegate< void(size_t, xtd::forms::link_label::link &item)> > item_removed
 Occurs when an item is removed from the collection.
 
static constexpr xtd::size npos
 Represents a value that is not a valid position in a collection.
 
static constexpr xtd::size bpos
 Represents the index of the first valid element in a collection.
 
static constexpr xtd::size epos
 Represents the index of the last valid element in a collection.
 
static constexpr xtd::size npos
 Represents a value that is not a valid position in a collection.
 
static constexpr xtd::size bpos
 Represents the index of the first valid element in a collection.
 
static constexpr xtd::size epos
 Represents the index of the last valid element in a collection.
 
 arranged_element_collection ()=default
 Initializes a new instance of the xtd::forms::layout::arranged_element_collection class that is empty.
 
 arranged_element_collection (size_type capacity)
 Constructs the container with specified count default-inserted instances of type_t. No copies are made.
 
 arranged_element_collection (const xtd::collections::generic::ienumerable< xtd::forms::link_label::link > &collection)
 Initializes a new instance of the xtd::forms::layout::arranged_element_collection <type_t> class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied.
 
 arranged_element_collection (const arranged_element_collection &collection)
 Default copy constructor with specified list.
 
 arranged_element_collection (arranged_element_collection &&collection)
 Move constructor with specified list.
 
 arranged_element_collection (const base_type &collection)
 Copy constructor with specified base type list.
 
 arranged_element_collection (base_type &&collection)
 Move constructor with specified base type list.
 
 arranged_element_collection (std::initializer_list< xtd::forms::link_label::link > items)
 Constructs the container with the contents of the specified initializer list, and allocator.
 
 arranged_element_collection (input_iterator_t first, input_iterator_t last)
 Constructs the container with the contents of the range [first, last).
 
 arranged_element_collection ()=default
 Initializes a new instance of the xtd::forms::layout::arranged_element_collection class that is empty.
 
 arranged_element_collection (size_type capacity)
 Constructs the container with specified count default-inserted instances of type_t. No copies are made.
 
 arranged_element_collection (const xtd::collections::generic::ienumerable< xtd::forms::link_label::link > &collection)
 Initializes a new instance of the xtd::forms::layout::arranged_element_collection <type_t> class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied.
 
 arranged_element_collection (const arranged_element_collection &collection)
 Default copy constructor with specified list.
 
 arranged_element_collection (arranged_element_collection &&collection)
 Move constructor with specified list.
 
 arranged_element_collection (const base_type &collection)
 Copy constructor with specified base type list.
 
 arranged_element_collection (base_type &&collection)
 Move constructor with specified base type list.
 
 arranged_element_collection (std::initializer_list< xtd::forms::link_label::link > items)
 Constructs the container with the contents of the specified initializer list, and allocator.
 
 arranged_element_collection (input_iterator_t first, input_iterator_t last)
 Constructs the container with the contents of the range [first, last).
 
size_type capacity () const noexcept
 Gets the total number of elements the internal data structure can hold without resizing.
 
void capacity (size_type value)
 Sets the total number of elements the internal data structure can hold without resizing.
 
size_type count () const noexcept override
 Gets the number of elements contained in the xtd::forms::layout::arranged_element_collection <type_t>.
 
pointer data ()
 Direct access to the underlying array.
 
const_pointer data () const
 Direct access to the underlying array.
 
const auto & items () const
 Returns the underlying base type items.
 
auto & items ()
 Returns the underlying base type items.
 
virtual bool sorted () const noexcept
 Checks whether the container is sorted.
 
virtual arranged_element_collectionsorted (bool value)
 Sets the container is sorted.
 
size_type capacity () const noexcept
 Gets the total number of elements the internal data structure can hold without resizing.
 
void capacity (size_type value)
 Sets the total number of elements the internal data structure can hold without resizing.
 
size_type count () const noexcept override
 Gets the number of elements contained in the xtd::forms::layout::arranged_element_collection <type_t>.
 
pointer data ()
 Direct access to the underlying array.
 
const_pointer data () const
 Direct access to the underlying array.
 
const auto & items () const
 Returns the underlying base type items.
 
auto & items ()
 Returns the underlying base type items.
 
virtual bool sorted () const noexcept
 Checks whether the container is sorted.
 
virtual arranged_element_collectionsorted (bool value)
 Sets the container is sorted.
 
void add (const xtd::forms::link_label::link &item) override
 Adds an item to the xtd::forms::layout::arranged_element_collection <type_t>.
 
virtual void add (xtd::forms::link_label::link &&item)
 Adds an item to the xtd::forms::layout::arranged_element_collection <type_t>.
 
virtual void add_range (const arranged_element_collection &collection)
 Adds elements to the end.
 
virtual void add_range (const std::vector< xtd::forms::link_label::link > &collection)
 Adds elements to the end.
 
virtual void add_range (const std::initializer_list< xtd::forms::link_label::link > &collection)
 Adds elements to the end.
 
void add_range (collection_t &&collection)
 Adds elements to the end.
 
void add_range (const collection_t &collection)
 Adds elements to the end.
 
void clear () override
 Removes all items from the xtd::forms::layout::arranged_element_collection <type_t>.
 
bool contains (const xtd::forms::link_label::link &item) const noexcept override
 Determines whether the xtd::forms::layout::arranged_element_collection <type_t> contains a specific value.
 
void copy_to (xtd::array< xtd::forms::link_label::link > &array, xtd::size array_index) const override
 Copies the elements of the xtd::forms::layout::arranged_element_collection <type_t> to an xtd::array, starting at a particular xtd::array index.
 
xtd::collections::generic::enumerator< xtd::forms::link_label::linkget_enumerator () const noexcept override
 Returns an enumerator that iterates through the xtd::forms::layout::arranged_element_collection <type_t>.
 
virtual void insert (xtd::size index, const xtd::forms::link_label::link &value)
 Inserts specified element at specified index.
 
virtual arranged_element_collectionsort ()
 Sorts the content.
 
bool remove (const xtd::forms::link_label::link &item) override
 Removes the first occurrence of a specific object from the xtd::forms::layout::arranged_element_collection <type_t>.
 
virtual void remove_at (size_t index)
 Erases element at specified index.
 
xtd::array< xtd::forms::link_label::linkto_array () const noexcept
 Gets an array with the elements of the container.
 
void add (const xtd::forms::link_label::link &item) override
 Adds an item to the xtd::forms::layout::arranged_element_collection <type_t>.
 
virtual void add (xtd::forms::link_label::link &&item)
 Adds an item to the xtd::forms::layout::arranged_element_collection <type_t>.
 
virtual void add_range (const arranged_element_collection &collection)
 Adds elements to the end.
 
virtual void add_range (const std::vector< xtd::forms::link_label::link > &collection)
 Adds elements to the end.
 
virtual void add_range (const std::initializer_list< xtd::forms::link_label::link > &collection)
 Adds elements to the end.
 
void add_range (collection_t &&collection)
 Adds elements to the end.
 
void add_range (const collection_t &collection)
 Adds elements to the end.
 
void clear () override
 Removes all items from the xtd::forms::layout::arranged_element_collection <type_t>.
 
bool contains (const xtd::forms::link_label::link &item) const noexcept override
 Determines whether the xtd::forms::layout::arranged_element_collection <type_t> contains a specific value.
 
void copy_to (xtd::array< xtd::forms::link_label::link > &array, xtd::size array_index) const override
 Copies the elements of the xtd::forms::layout::arranged_element_collection <type_t> to an xtd::array, starting at a particular xtd::array index.
 
xtd::collections::generic::enumerator< xtd::forms::link_label::linkget_enumerator () const noexcept override
 Returns an enumerator that iterates through the xtd::forms::layout::arranged_element_collection <type_t>.
 
virtual void insert (xtd::size index, const xtd::forms::link_label::link &value)
 Inserts specified element at specified index.
 
virtual arranged_element_collectionsort ()
 Sorts the content.
 
bool remove (const xtd::forms::link_label::link &item) override
 Removes the first occurrence of a specific object from the xtd::forms::layout::arranged_element_collection <type_t>.
 
virtual void remove_at (size_t index)
 Erases element at specified index.
 
xtd::array< xtd::forms::link_label::linkto_array () const noexcept
 Gets an array with the elements of the container.
 
arranged_element_collectionoperator= (const arranged_element_collection &other)
 Copy assignment operator. Replaces the contents with a copy of the contents of other.
 
arranged_element_collectionoperator= (arranged_element_collection &&other) noexcept
 Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in other is moved from other into this container). other is in a valid but unspecified state afterwards.
 
arranged_element_collectionoperator= (const std::initializer_list< xtd::forms::link_label::link > &items)
 Replaces the contents with those identified by initializer list ilist.
 
value_type & operator[] (size_type index)
 Access specified element.
 
const value_type & operator[] (size_type index) const
 Access specified element.
 
 operator const_base_type & () const noexcept
 Returns a reference to the underlying base type.
 
 operator base_type & () noexcept
 Returns a reference to the underlying base type.
 
bool operator== (const arranged_element_collection &value) const
 
bool operator!= (const arranged_element_collection &value) const
 
arranged_element_collectionoperator= (const arranged_element_collection &other)
 Copy assignment operator. Replaces the contents with a copy of the contents of other.
 
arranged_element_collectionoperator= (arranged_element_collection &&other) noexcept
 Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in other is moved from other into this container). other is in a valid but unspecified state afterwards.
 
arranged_element_collectionoperator= (const std::initializer_list< xtd::forms::link_label::link > &items)
 Replaces the contents with those identified by initializer list ilist.
 
value_type & operator[] (size_type index)
 Access specified element.
 
const value_type & operator[] (size_type index) const
 Access specified element.
 
 operator const_base_type & () const noexcept
 Returns a reference to the underlying base type.
 
 operator base_type & () noexcept
 Returns a reference to the underlying base type.
 
bool operator== (const arranged_element_collection &value) const
 
bool operator!= (const arranged_element_collection &value) const
 
size_type max_size () const noexcept
 Returns the maximum possible number of elements.
 
size_type max_size () const noexcept
 Returns the maximum possible number of elements.
 
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 back ()
 Access the last element.
 
const_reference back () const
 Access the last element.
 
const_reverse_iterator crbegin () const noexcept
 Returns a reverse iterator to the end.
 
const_reverse_iterator crend () const noexcept
 Returns a reverse iterator to the end.
 
reference front ()
 Access the first element.
 
const_reference front () const
 Access the first element.
 
auto get_allocator () const noexcept
 Returns the associated allocator.
 
void emplace (xtd::collections::generic::list< value_type >::const_iterator pos, args_t &&... args)
 Inserts specified element at specified position.
 
void emplace_back (args_t &&... args)
 Adds an element to the end.
 
auto erase (xtd::collections::generic::list< value_type >::iterator pos)
 Erases element at specified position.
 
auto erase (xtd::collections::generic::list< value_type >::const_iterator pos)
 Erases element at specified position.
 
auto erase (xtd::collections::generic::list< value_type >::iterator first, xtd::collections::generic::list< value_type >::iterator last)
 Erases elements at specified range.
 
auto erase (xtd::collections::generic::list< value_type >::const_iterator first, xtd::collections::generic::list< value_type >::const_iterator last)
 Erases elements at specified range.
 
void erase_at (size_t index)
 Erases element at specified index.
 
auto insert (xtd::collections::generic::list< value_type >::const_iterator pos, const xtd::forms::link_label::link &value)
 Inserts specified element at specified position.
 
auto insert (xtd::collections::generic::list< value_type >::const_iterator pos, xtd::forms::link_label::link &&value)
 Inserts specified element at specified position.
 
void insert_at (size_t index, const xtd::forms::link_label::link &value)
 Inserts specified element at specified index.
 
void pop_back ()
 Removes the last element of the container.
 
void push_back (const xtd::forms::link_label::link &item)
 Adds an element to the end.
 
void push_back (xtd::forms::link_label::link &&item)
 Adds an element to the end.
 
void push_back_range (const arranged_element_collection &collection)
 Adds elements to the end.
 
void push_back_range (const std::vector< xtd::forms::link_label::link > &collection)
 Adds elements to the end.
 
void push_back_range (const std::initializer_list< xtd::forms::link_label::link > &collection)
 Adds elements to the end.
 
void push_back_range (collection_t &&collection)
 Adds elements to the end.
 
void push_back_range (iterator_t begin, iterator_t end)
 Adds elements to the end.
 
std::vector< xtd::forms::link_label::linkto_vector () const noexcept
 Gets an array with the elements of the container.
 
auto rbegin () noexcept
 Returns a reverse iterator to the end.
 
auto rbegin () const noexcept
 Returns a reverse iterator to the end.
 
auto rend () noexcept
 Returns a reverse iterator to the end.
 
auto rend () const noexcept
 Returns a reverse iterator to the end.
 
void reserve (size_type size)
 Reserves storage.
 
void shrink_to_fit ()
 Reduces memory usage by freeing unused memory.
 
auto insert (xtd::collections::generic::list< value_type >::const_iterator pos, const xtd::forms::link_label::link &value)
 Inserts specified element at specified position.
 
auto insert (xtd::collections::generic::list< value_type >::const_iterator pos, xtd::forms::link_label::link &&value)
 Inserts specified element at specified position.
 
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 back ()
 Access the last element.
 
const_reference back () const
 Access the last element.
 
const_reverse_iterator crbegin () const noexcept
 Returns a reverse iterator to the end.
 
const_reverse_iterator crend () const noexcept
 Returns a reverse iterator to the end.
 
reference front ()
 Access the first element.
 
const_reference front () const
 Access the first element.
 
auto get_allocator () const noexcept
 Returns the associated allocator.
 
void emplace (xtd::collections::generic::list< value_type >::const_iterator pos, args_t &&... args)
 Inserts specified element at specified position.
 
void emplace_back (args_t &&... args)
 Adds an element to the end.
 
auto erase (xtd::collections::generic::list< value_type >::iterator pos)
 Erases element at specified position.
 
auto erase (xtd::collections::generic::list< value_type >::const_iterator pos)
 Erases element at specified position.
 
auto erase (xtd::collections::generic::list< value_type >::iterator first, xtd::collections::generic::list< value_type >::iterator last)
 Erases elements at specified range.
 
auto erase (xtd::collections::generic::list< value_type >::const_iterator first, xtd::collections::generic::list< value_type >::const_iterator last)
 Erases elements at specified range.
 
void erase_at (size_t index)
 Erases element at specified index.
 
void insert_at (size_t index, const xtd::forms::link_label::link &value)
 Inserts specified element at specified index.
 
void pop_back ()
 Removes the last element of the container.
 
void push_back (const xtd::forms::link_label::link &item)
 Adds an element to the end.
 
void push_back (xtd::forms::link_label::link &&item)
 Adds an element to the end.
 
void push_back_range (const arranged_element_collection &collection)
 Adds elements to the end.
 
void push_back_range (const std::vector< xtd::forms::link_label::link > &collection)
 Adds elements to the end.
 
void push_back_range (const std::initializer_list< xtd::forms::link_label::link > &collection)
 Adds elements to the end.
 
void push_back_range (collection_t &&collection)
 Adds elements to the end.
 
void push_back_range (iterator_t begin, iterator_t end)
 Adds elements to the end.
 
std::vector< xtd::forms::link_label::linkto_vector () const noexcept
 Gets an array with the elements of the container.
 
auto rbegin () noexcept
 Returns a reverse iterator to the end.
 
auto rbegin () const noexcept
 Returns a reverse iterator to the end.
 
auto rend () noexcept
 Returns a reverse iterator to the end.
 
auto rend () const noexcept
 Returns a reverse iterator to the end.
 
void reserve (size_type size)
 Reserves storage.
 
void shrink_to_fit ()
 Reduces memory usage by freeing unused memory.
 
 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 xtd::size 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<class object_t>
xtd::unique_ptr_object< 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.
 
template<class object_a_t, class 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<class object_a_t, class 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.
 
virtual void on_item_added (size_t index, xtd::forms::link_label::link &item)
 Raises the xtd::forms::layout::arranged_element_collection::item_added event.
 
virtual void on_item_updated (size_t index, xtd::forms::link_label::link &item)
 Raises the xtd::forms::layout::arranged_element_collection::item_updated event.
 
virtual void on_item_removed (size_t index, xtd::forms::link_label::link &item)
 Raises the xtd::forms::layout::arranged_element_collection::item_removed event.
 
virtual void on_item_added (size_t index, xtd::forms::link_label::link &item)
 Raises the xtd::forms::layout::arranged_element_collection::item_added event.
 
virtual void on_item_updated (size_t index, xtd::forms::link_label::link &item)
 Raises the xtd::forms::layout::arranged_element_collection::item_updated event.
 
virtual void on_item_removed (size_t index, xtd::forms::link_label::link &item)
 Raises the xtd::forms::layout::arranged_element_collection::item_removed event.
 

Member Typedef Documentation

◆ base

Represents the base type of the collection.

Constructor & Destructor Documentation

◆ link_collection()

xtd::forms::link_label::link_collection::link_collection ( )
explicitdefault

Creates a new object xtd::forms::control::control_collection with specified allocator (optional).

Remarks
If allocator not specified, the std::allocator<value_type> is used.

Member Function Documentation

◆ operator[]() [1/2]

const_reference xtd::forms::link_label::link_collection::operator[] ( const xtd::string & name) const
noexcept

Gets the first xtd::forms::control::control_collection in the list with the specified name.

Parameters
nameThe name of the xtd::forms::control to get from the list.
Returns
The first xtd::forms::control in the list with the given Name. This item returns optional with no value if no xtd::forms::control with the given name can be found.
Remarks
The operator [] property is case-sensitive when searching for names. That is, if two controls exist with the names "Lname" and "lname", operator [] property will find only the xtd::forms::control with the xtd::forms::control::name() that you specify, not both.

◆ operator[]() [2/2]

reference xtd::forms::link_label::link_collection::operator[] ( const xtd::string & name)
noexcept

Gets the first xtd::forms::control::control_collection in the list with the specified name.

Parameters
nameThe name of the xtd::forms::control to get from the list.
Returns
The first xtd::forms::control in the list with the given Name. This item returns optional with no value if no xtd::forms::control with the given name can be found.
Remarks
The operator [] property is case-sensitive when searching for names. That is, if two controls exist with the names "Lname" and "lname", operator [] property will find only the xtd::forms::control with the xtd::forms::control::name() that you specify, not both.

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