xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Public Types | Public Member Functions | List of all members
xtd::forms::link_label::link_collection Class Reference

#include <link_label.h>

Definition

Represents a collection of controls.

Public Types

using base = xtd::forms::layout::arranged_element_collection< xtd::forms::link_label::link >
 Represents the base type of the collection. More...
 
- Public Types inherited from xtd::forms::layout::arranged_element_collection< xtd::forms::link_label::link >
using allocator_type = std::allocator< value_type >
 Represents the allocator type of the collection. More...
 
using const_iterator = typename std::vector< value_type >::const_iterator
 Represents the const iterator type of the collection. More...
 
using const_pointer = typename std::allocator_traits< allocator_type >::const_pointer
 Represents the value type const pointer of the collection. More...
 
using const_reference = const value_type &
 Represents the value type const reference the collection. More...
 
using const_reverse_iterator = typename std::vector< value_type >::const_reverse_iterator
 Represents the const reverse iterator type of the collection. More...
 
using difference_type = std::ptrdiff_t
 Represents the pointer difference type of the collection. More...
 
using iterator = typename std::vector< value_type >::iterator
 Represents the iterator type of the collection. More...
 
using pointer = typename std::allocator_traits< allocator_type >::pointer
 Represents the value type pointer of the collection. More...
 
using reference = value_type &
 Represents the value type reference of the collection. More...
 
using reverse_iterator = typename std::vector< value_type >::reverse_iterator
 Represents the reverse iterator type of the collection. More...
 
using size_type = std::size_t
 Represents the size type of the collection. More...
 

Public Member Functions

 link_collection (const allocator_type &allocator=allocator_type())
 Creates a new object xtd::forms::control::control_collection with specified allocator (optional). More...
 
const_reference operator[] (const xtd::ustring &name) const
 Gets the first xtd::forms::control::control_collection in the list with the specified name. More...
 
reference operator[] (const xtd::ustring &name)
 Gets the first xtd::forms::control::control_collection in the list with the specified name. More...
 
- Public Member Functions inherited from xtd::forms::layout::arranged_element_collection< xtd::forms::link_label::link >
 arranged_element_collection (const allocator_type &allocator=allocator_type())
 Creates a new object xtd::forms::layout::arranged_element_collection with specified allocator (optional). More...
 
 arranged_element_collection (const std::initializer_list< xtd::forms::link_label::link > &il)
 Creates a new object xtd::diagnostics::trace_listener_collection with specified initializer list. More...
 
reference at (size_type pos)
 Access specified element with bounds checking. More...
 
const_reference at (size_type pos) const
 Access specified element with bounds checking. More...
 
reference back ()
 Access the last element. More...
 
const_reference back () const
 Access the last element. More...
 
iterator begin ()
 Returns an iterator to the beginning. More...
 
const_iterator begin () const
 Returns an iterator to the beginning. More...
 
size_type capacity () const
 Returns the number of elements that can be held in currently allocated storage. More...
 
const_iterator cbegin () const
 Returns an iterator to the beginning. More...
 
const_iterator cend () const
 Returns an iterator to the end. More...
 
void clear ()
 clears the contents. More...
 
const_reverse_iterator crbegin () const
 Returns a reverse iterator to the end. More...
 
const_reverse_iterator crend () const
 Returns a reverse iterator to the end. More...
 
pointer data ()
 Direct access to the underlying array. More...
 
const_pointer data () const
 Direct access to the underlying array. More...
 
bool empty () const
 Checks whether the container is empty. More...
 
iterator end ()
 Returns an iterator to the end. More...
 
const_iterator end () const
 Returns an iterator to the end. More...
 
iterator erase (iterator pos)
 Erases element at specified position. More...
 
iterator erase (const_iterator pos)
 Erases element at specified position. More...
 
iterator erase (iterator first, iterator last)
 Erases elements at specified range. More...
 
iterator erase (const_iterator first, const_iterator last)
 Erases elements at specified range. More...
 
void erase_at (size_t index)
 Erases element at specified index. More...
 
reference front ()
 Access the first element. More...
 
const_reference front () const
 Access the first element. More...
 
allocator_type get_allocator () const
 Returns the associated allocator. More...
 
iterator insert (iterator pos, const value_type &value)
 Inserts specified element at specified position. More...
 
iterator insert (const_iterator pos, const value_type &value)
 Inserts specified element at specified position. More...
 
iterator insert (const_iterator pos, const value_type &&value)
 Inserts specified element at specified position. More...
 
void insert_at (size_t index, const value_type &value)
 Inserts specified element at specified index. More...
 
size_type max_size () const
 Returns the maximum possible number of elements. More...
 
reference operator[] (size_type pos)
 Access specified element. More...
 
const_reference operator[] (size_type pos) const
 Access specified element. More...
 
void push_back (const value_type &item)
 Adds an element to the end. More...
 
void push_back (value_type &&item)
 Adds an element to the end. More...
 
void push_back_range (const arranged_element_collection &collection)
 Adds elements to the end. More...
 
void push_back_range (const std::vector< value_type > &collection)
 Adds elements to the end. More...
 
void push_back_range (const std::initializer_list< value_type > &collection)
 Adds elements to the end. More...
 
void push_back_range (collection_t collection)
 Adds elements to the end. More...
 
reverse_iterator rbegin ()
 Returns a reverse iterator to the end. More...
 
const_reverse_iterator rbegin () const
 Returns a reverse iterator to the end. More...
 
reverse_iterator rend ()
 Returns a reverse iterator to the end. More...
 
const_reverse_iterator rend () const
 Returns a reverse iterator to the end. More...
 
void reserve (size_type size)
 Reserves storage. More...
 
void shrink_to_fit ()
 Reduces memory usage by freeing unused memory. More...
 
size_type size () const
 Returns the number of elements. More...
 
void sort ()
 Sorts the content. More...
 
bool sorted () const
 Checks whether the container is sorted. More...
 
void sorted (bool value)
 Sets the container is sorted. More...
 
std::vector< xtd::forms::link_label::linkto_array () const
 Gets an array with the elements of the container. More...
 
std::vector< xtd::forms::link_label::linkto_vector () const
 Gets an array with the elements of the container. More...
 

Additional Inherited Members

- Public Attributes inherited from xtd::forms::layout::arranged_element_collection< xtd::forms::link_label::link >
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. More...
 
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. More...
 
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. More...
 
- Static Public Attributes inherited from xtd::forms::layout::arranged_element_collection< xtd::forms::link_label::link >
static const size_type npos
 This is a special value equal to the maximum value representable by the type size_t. More...
 

Member Typedef Documentation

◆ base

Represents the base type of the collection.

Constructor & Destructor Documentation

◆ link_collection()

xtd::forms::link_label::link_collection::link_collection ( const allocator_type allocator = allocator_type())
explicit

Creates a new object xtd::forms::control::control_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.

Member Function Documentation

◆ operator[]() [1/2]

const_reference xtd::forms::link_label::link_collection::operator[] ( const xtd::ustring name) const

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::ustring name)

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: