xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
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  link() = default;
34  link(size_t start, size_t length);
39  link(size_t start, size_t length, std::any link_data);
41  link(const link&) = default;
42  link(link&&) = default;
43  link& operator=(const link&) = default;
44  bool operator==(const link& other) const {return enabled_ == other.enabled_ && length_ == other.length_ && name_ == other.name_ && start_ == other.start_;}
45  bool operator!=(const link& other) const {return !operator==(other);}
47 
50  const xtd::ustring& description() const;
54  link& description(const xtd::ustring& value);
55 
59  bool enabled() const;
64  link& enabled(bool value);
65 
69  size_t length() const;
74  link& length(size_t value);
75 
79  std::any link_data() const;
84  link& link_data(std::any value);
85 
88  const xtd::ustring& name() const;
92  link& name(const xtd::ustring& value);
93 
97  size_t start() const;
102  link& start(size_t value);
103 
106  std::any tag() const;
110  link& tag(std::any value);
111 
116  bool visited() const;
122  link& visited(bool value);
123 
124  private:
125  friend link_label;
126  xtd::ustring description_;
127  bool enabled_ = true;
128  size_t length_ = 0;
129  std::any link_data_;
130  xtd::ustring name_;
131  size_t start_ = 0;
132  std::any tag_;
133  bool visited_ = false;
134  bool active_ = false;
135  };
136  }
137 }
138 
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition: object.h:26
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd::object class.
Contains xtd::ustring class.