Represents an area within a xtd::forms::link_label control that represents a hyperlink within the control.
- Header
#include <xtd/forms/link_area>
- Namespace
- xtd::forms
- Library
- xtd.forms
|
| bool | is_empty () const noexcept |
| | Gets a value indicating whether the LinkArea is empty.
|
| |
| size_t | length () const noexcept |
| | Gets the number of characters in the link area.
|
| |
| link_area & | length (size_t value) noexcept |
| | Sets the number of characters in the link area.
|
| |
| size_t | start () const noexcept |
| | Gets the starting location of the link area within the text of the xtd::forms::link_label.
|
| |
| link_area & | start (size_t value) noexcept |
| | Sets the starting location of the link area within the text of the xtd::forms::link_label.
|
| |
|
Determines whether the specified object is equal to the current object.
- Parameters
-
| obj | The object to compare with the current object. |
- Returns
true if the specified object is equal to the current object. otherwise, false.
|
| bool | equals (const xtd::object &obj) const noexcept override |
| | Determines whether the specified object is equal to the current object.
|
| |
| bool | equals (const link_area &other) const noexcept override |
| | Determines whether the specified object is equal to the current object.
|
| |
| xtd::size | get_hash_code () const noexcept override |
| | Serves as a hash function for a particular type.
|
| |
| xtd::string | to_string () const noexcept override |
| | Returns a xtd::string that represents the current object.
|
| |
|
| | object ()=default |
| | Create a new instance of the ultimate base class object.
|
| |
| 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 bool | equals (const link_area &) const noexcept=0 |
| | Indicates whether the current object is equal to another object of the same type.
|
| |
| 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.
|
| |
◆ link_area()
| xtd::forms::link_area::link_area |
( |
size_t | start, |
|
|
size_t | length ) |
|
noexcept |
Initializes a new instance of the xtd::forms::link_area class.
- Parameters
-
| start | The zero-based starting location of the link area within the text of the LinkLabel. |
| length | The number of characters, after the starting character, to include in the link area. |
◆ is_empty()
| bool xtd::forms::link_area::is_empty |
( |
| ) |
const |
|
noexcept |
Gets a value indicating whether the LinkArea is empty.
- Returns
true if the specified start and length return an empty link area; otherwise, false.
◆ length() [1/2]
| size_t xtd::forms::link_area::length |
( |
| ) |
const |
|
noexcept |
Gets the number of characters in the link area.
- Returns
- The number of characters, including spaces, in the link area.
◆ length() [2/2]
| link_area & xtd::forms::link_area::length |
( |
size_t | value | ) |
|
|
noexcept |
Sets the number of characters in the link area.
- Parameters
-
| value | The number of characters, including spaces, in the link area. |
- Returns
- This current instance.
◆ start() [1/2]
| size_t xtd::forms::link_area::start |
( |
| ) |
const |
|
noexcept |
Gets the starting location of the link area within the text of the xtd::forms::link_label.
- Returns
- The location within the text of the xtd::fors::link_label control where the link starts.
◆ start() [2/2]
| link_area & xtd::forms::link_area::start |
( |
size_t | value | ) |
|
|
noexcept |
Sets the starting location of the link area within the text of the xtd::forms::link_label.
- Parameters
-
| value | The location within the text of the xtd::fors::link_label control where the link starts. |
- Returns
- This current instance.
◆ equals() [1/2]
| bool xtd::forms::link_area::equals |
( |
const xtd::object & | obj | ) |
const |
|
overridevirtualnoexcept |
Determines whether the specified object is equal to the current object.
- Parameters
-
| obj | The object to compare with the current object. |
- Returns
true if the specified object is equal to the current object. otherwise, false.
- Examples
- The following code example compares the current instance with another object.
#include <xtd/xtd>
auto main() -> int {
auto object3 = object2;
object3 = object1;
}
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
ptr< type_t > new_ptr(args_t &&... args)
The xtd::new_ptr operator creates a xtd::ptr object.
Definition new_ptr.hpp:24
Reimplemented from xtd::object.
◆ equals() [2/2]
| bool xtd::forms::link_area::equals |
( |
const link_area & | other | ) |
const |
|
overridenoexcept |
Determines whether the specified object is equal to the current object.
- Parameters
-
| other | The object to compare with the current object. |
- Returns
true if the specified object is equal to the current object. otherwise, false.
◆ get_hash_code()
| xtd::size xtd::forms::link_area::get_hash_code |
( |
| ) |
const |
|
overridevirtualnoexcept |
Serves as a hash function for a particular type.
- Returns
- A hash code for the current object.
Reimplemented from xtd::object.
◆ to_string()
Returns a xtd::string that represents the current object.
- Returns
- A string that represents the current object.
- Examples
- The following code example demonstrates what to_string returns.
#include <xtd/xtd>
namespace examples {
namespace object_test {
class object1 :
public object {
};
}
}
auto main() -> int {
ptr<object> obj1 = new_ptr<examples::object_test::object1>();
console::write_line(obj1->to_string());
ptr<object> obj2 = new_ptr<date_time>(1971, 1, 5, 23, 5, 0);
console::write_line(obj2->to_string());
ptr<object> obj3 = new_ptr<boolean_object>();
console::write_line(obj3->to_string());
}
object()=default
Create a new instance of the ultimate base class object.
Reimplemented from xtd::object.
The documentation for this struct was generated from the following file: