xtd 0.2.0
Loading...
Searching...
No Matches
command_link_button.h
Go to the documentation of this file.
1
4#pragma once
5#include "button_base.h"
6#include "dialog_result.h"
7#include "ibutton_control.h"
8#include "timer.h"
9#include <xtd/environment>
10#include <tuple>
11
13namespace xtd {
15 namespace forms {
38 struct data;
39
40 public:
42
48
50
54 virtual forms::auto_size_mode auto_size_mode() const noexcept;
58
61 virtual xtd::ustring& main_text() const noexcept;
65 virtual command_link_button& main_text(const xtd::ustring& value);
66
69 virtual xtd::ustring& supplementary_text() const noexcept;
73 virtual command_link_button& supplementary_text(const xtd::ustring& value);
74
77 xtd::ustring& text() const noexcept override;
82 xtd::forms::control& text(const xtd::ustring& value) override;
83
86 virtual std::tuple<xtd::ustring, xtd::ustring> texts() const noexcept;
91 virtual command_link_button& texts(const std::tuple<xtd::ustring, xtd::ustring>& texts);
93
95
102 void set_texts(const xtd::ustring& text, const xtd::ustring& supplementary_text);
103
110 [[deprecated("Replaced by xtd::forms::command_link_button::set_texts - Will be removed in version 0.4.0")]]
111 control& texts(const xtd::ustring& text, const xtd::ustring& supplementary_text);
113
115
119 static command_link_button create();
123 static command_link_button create(const xtd::ustring& text);
128 static command_link_button create(const xtd::ustring& text, const drawing::point& location);
134 static command_link_button create(const xtd::ustring& text, const drawing::point& location, const drawing::size& size);
141 static command_link_button create(const xtd::ustring& text, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
145 static command_link_button create(const std::tuple<xtd::ustring, xtd::ustring>& texts);
150 static command_link_button create(const std::tuple<xtd::ustring, xtd::ustring>& texts, const drawing::point& location);
156 static command_link_button create(const std::tuple<xtd::ustring, xtd::ustring>& texts, const drawing::point& location, const drawing::size& size);
163 static command_link_button create(const std::tuple<xtd::ustring, xtd::ustring>& texts, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
167 static command_link_button create(const control& parent);
172 static command_link_button create(const control& parent, const xtd::ustring& text);
178 static command_link_button create(const control& parent, const xtd::ustring& text, const drawing::point& location);
185 static command_link_button create(const control& parent, const xtd::ustring& text, const drawing::point& location, const drawing::size& size);
193 static command_link_button create(const control& parent, const xtd::ustring& text, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
198 static command_link_button create(const control& parent, const std::tuple<xtd::ustring, xtd::ustring>& texts);
204 static command_link_button create(const control& parent, const std::tuple<xtd::ustring, xtd::ustring>& texts, const drawing::point& location);
211 static command_link_button create(const control& parent, const std::tuple<xtd::ustring, xtd::ustring>& texts, const drawing::point& location, const drawing::size& size);
219 static command_link_button create(const control& parent, const std::tuple<xtd::ustring, xtd::ustring>& texts, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
221
222 protected:
224
226 forms::create_params create_params() const noexcept override;
228
230
236 std::unique_ptr<xtd::object> clone() const override;
237
238 drawing::size measure_control() const noexcept override;
239 void on_handle_created(const event_args& e) override;
241
242 private:
243 std::shared_ptr<data> data_;
244 };
245 }
246}
Contains xtd::forms::button_base class.
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.h:18
Implements the basic functionality common to button controls.
Definition button_base.h:35
Defines the base class for controls, which are components with visual representation.
Definition control.h:79
Encapsulates the information needed when creating a control.
Definition create_params.h:27
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
Represents the version number of an assembly, operating system, or the xtd. This class cannot be inhe...
Definition version.h:110
Contains xtd::forms::dialog_result enum class.
#define forms_export_
Define shared library export.
Definition forms_export.h:13
size_t size
Represents a size of any object in bytes.
Definition types.h:197
auto_size_mode
Specifies how a control will behave when its auto_size property is enabled.
Definition auto_size_mode.h:20
Contains xtd::forms::ibutton_control interface.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::forms::timer component.