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.
link.h
Go to the documentation of this file.
1 #pragma once
5 #include <any>
6 #include <tuple>
7 #include <xtd/object.h>
8 #include <xtd/ustring.h>
9 
11 namespace xtd {
13  namespace forms {
15  class link_label;
17 
27  class link : public object {
28  public:
30 
33  link() = default;
37  link(size_t start, size_t length);
42  link(size_t start, size_t length, std::any link_data);
44 
46  link(const link&) = default;
47  link(link&&) = default;
48  link& operator=(const link&) = default;
49  bool operator==(const link& other) const {return enabled_ == other.enabled_ && length_ == other.length_ && name_ == other.name_ && start_ == other.start_;}
50  bool operator!=(const link& other) const {return !operator==(other);}
52 
54 
58  const xtd::ustring& description() const;
62  link& description(const xtd::ustring& value);
63 
67  bool enabled() const;
72  link& enabled(bool value);
73 
77  size_t length() const;
82  link& length(size_t value);
83 
87  std::any link_data() const;
92  link& link_data(std::any value);
93 
96  const xtd::ustring& name() const;
100  link& name(const xtd::ustring& value);
101 
105  size_t start() const;
110  link& start(size_t value);
111 
114  std::any tag() const;
118  link& tag(std::any value);
119 
124  bool visited() const;
130  link& visited(bool value);
132 
133  private:
134  friend link_label;
135  xtd::ustring description_;
136  bool enabled_ = true;
137  size_t length_ = 0;
138  std::any link_data_;
139  xtd::ustring name_;
140  size_t start_ = 0;
141  std::any tag_;
142  bool visited_ = false;
143  bool active_ = false;
144  };
145  }
146 }
147 
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
Contains xtd::ustring class.
The operating system is other.
Indicates that all styles except allow_binary_specifier, allow_octal_specifier and allow_hex_specifie...
Contains xtd::object class.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:27
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13