xtd 1.0.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::usize).
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.
using reverse_iterator
 Represents the reverse iterator type of the collection.
using const_reverse_iterator
 Represents the const reverse iterator type of the collection.
event< arranged_element_collection, delegate< void(xtd::usize, xtd::forms::link_label::link &item)> > item_added
 Occurs when an item is added to the collection.
event< arranged_element_collection, delegate< void(xtd::usize, xtd::forms::link_label::link &item)> > item_updated
 Occurs when an item is updated in the collection.
event< arranged_element_collection, delegate< void(xtd::usize, xtd::forms::link_label::link &item)> > item_removed
 Occurs when an item is removed from the collection.
static constexpr xtd::usize npos
 Represents a value that is not a valid position in a collection.
static constexpr xtd::usize bpos
 Represents the index of the first valid element in a collection.
static constexpr xtd::usize 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).
auto capacity () const noexcept -> size_type
 Gets the total number of elements the internal data structure can hold without resizing.
auto capacity (size_type value) -> void
 Sets the total number of elements the internal data structure can hold without resizing.
auto count () const noexcept -> size_type override
 Gets the number of elements contained in the xtd::forms::layout::arranged_element_collection <type_t>.
auto data () -> pointer
 Direct access to the underlying array.
auto data () const -> const_pointer
 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 auto sorted () const noexcept -> bool
 Checks whether the container is sorted.
virtual auto sorted (bool value) -> arranged_element_collection &
 Sets the container is sorted.
auto add (const xtd::forms::link_label::link &item) -> void override
 Adds an item to the xtd::forms::layout::arranged_element_collection <type_t>.
virtual auto add (xtd::forms::link_label::link &&item) -> void
 Adds an item to the xtd::forms::layout::arranged_element_collection <type_t>.
virtual auto add_range (const arranged_element_collection &collection) -> void
 Adds elements to the end.
virtual auto add_range (const std::vector< xtd::forms::link_label::link > &collection) -> void
 Adds elements to the end.
virtual auto add_range (const std::initializer_list< xtd::forms::link_label::link > &collection) -> void
 Adds elements to the end.
auto add_range (collection_t &&collection) -> void
 Adds elements to the end.
auto add_range (const collection_t &collection) -> void
 Adds elements to the end.
auto clear () -> void override
 Removes all items from the xtd::forms::layout::arranged_element_collection <type_t>.
auto contains (const xtd::forms::link_label::link &item) const noexcept -> bool override
 Determines whether the xtd::forms::layout::arranged_element_collection <type_t> contains a specific value.
auto copy_to (xtd::array< xtd::forms::link_label::link > &array, xtd::usize array_index) const -> void 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.
auto get_enumerator () const noexcept -> xtd::collections::generic::enumerator< xtd::forms::link_label::link > override
 Returns an enumerator that iterates through the xtd::forms::layout::arranged_element_collection <type_t>.
virtual auto insert (xtd::usize index, const xtd::forms::link_label::link &value) -> void
 Inserts specified element at specified index.
virtual auto sort () -> arranged_element_collection &
 Sorts the content.
auto remove (const xtd::forms::link_label::link &item) -> bool override
 Removes the first occurrence of a specific object from the xtd::forms::layout::arranged_element_collection <type_t>.
virtual auto remove_at (xtd::usize index) -> void
 Erases element at specified index.
auto reverse () -> arranged_element_collection &
 Reverses the order of the elements in the entire xtd::collections::generic::list <type_t>.
auto reverse (size_type index, size_type count) -> arranged_element_collection &
 Reverses the order of the elements in the specified range.
auto to_array () const noexcept -> xtd::array< xtd::forms::link_label::link >
 Gets an array with the elements of the container.
auto operator= (const arranged_element_collection &other) -> arranged_element_collection &
 Copy assignment operator. Replaces the contents with a copy of the contents of other.
auto operator= (arranged_element_collection &&other) noexcept -> arranged_element_collection &
 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.
auto operator= (const std::initializer_list< xtd::forms::link_label::link > &items) -> arranged_element_collection &
 Replaces the contents with those identified by initializer list ilist.
auto operator[] (size_type index) -> value_type &
 Access specified element.
auto operator[] (size_type index) const -> const value_type &
 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.
auto operator== (const arranged_element_collection &value) const -> bool
auto operator!= (const arranged_element_collection &value) const -> bool
auto max_size () const noexcept -> size_type
 Returns the maximum possible number of elements.
auto at (size_type pos) -> reference
 Access specified element with bounds checking.
auto at (size_type pos) const -> const_reference
 Access specified element with bounds checking.
auto back () -> reference
 Access the last element.
auto back () const -> const_reference
 Access the last element.
auto crbegin () const noexcept -> const_reverse_iterator
 Returns a reverse iterator to the end.
auto crend () const noexcept -> const_reverse_iterator
 Returns a reverse iterator to the end.
auto front () -> reference
 Access the first element.
auto front () const -> const_reference
 Access the first element.
auto get_allocator () const noexcept
 Returns the associated allocator.
auto emplace (xtd::collections::generic::list< value_type >::const_iterator pos, args_t &&... args) -> void
 Inserts specified element at specified position.
auto emplace_back (args_t &&... args) -> void
 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.
auto erase_at (xtd::usize index) -> void
 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.
auto insert_at (xtd::usize index, const xtd::forms::link_label::link &value) -> void
 Inserts specified element at specified index.
auto pop_back () -> void
 Removes the last element of the container.
auto push_back (const xtd::forms::link_label::link &item) -> void
 Adds an element to the end.
auto push_back (xtd::forms::link_label::link &&item) -> void
 Adds an element to the end.
auto push_back_range (const arranged_element_collection &collection) -> void
 Adds elements to the end.
auto push_back_range (const std::vector< xtd::forms::link_label::link > &collection) -> void
 Adds elements to the end.
auto push_back_range (const std::initializer_list< xtd::forms::link_label::link > &collection) -> void
 Adds elements to the end.
auto push_back_range (collection_t &&collection) -> void
 Adds elements to the end.
auto push_back_range (iterator_t begin, iterator_t end) -> void
 Adds elements to the end.
auto to_vector () const noexcept -> std::vector< xtd::forms::link_label::link >
 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.
auto reserve (size_type size) -> void
 Reserves storage.
auto shrink_to_fit () -> void
 Reduces memory usage by freeing unused memory.
 object ()=default
 Create a new instance of the ultimate base class object.
virtual auto equals (const object &obj) const noexcept -> bool
 Determines whether the specified object is equal to the current object.
virtual auto get_hash_code () const noexcept -> xtd::usize
 Serves as a hash function for a particular type.
virtual auto get_type () const noexcept -> type_object
 Gets the type of the current instance.
template<typename object_t>
auto memberwise_clone () const -> xtd::unique_ptr_object< object_t >
 Creates a shallow copy of the current object.
virtual auto to_string () const -> xtd::string
 Returns a xtd::string that represents the current object.
template<typename object_a_t, typename object_b_t>
static auto equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are considered equal.
template<typename object_a_t, typename object_b_t>
static auto reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are the same instance.
virtual auto on_item_added (xtd::usize index, xtd::forms::link_label::link &item) -> void
 Raises the xtd::forms::layout::arranged_element_collection::item_added event.
virtual auto on_item_updated (xtd::usize index, xtd::forms::link_label::link &item) -> void
 Raises the xtd::forms::layout::arranged_element_collection::item_updated event.
virtual auto on_item_removed (xtd::usize index, xtd::forms::link_label::link &item) -> void
 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: