xtd 0.2.0
Loading...
Searching...
No Matches
command_link_button.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "button_base.hpp"
6#include "dialog_result.hpp"
7#include "ibutton_control.hpp"
8#include "timer.hpp"
9#include <xtd/environment>
10#include <tuple>
11
13namespace xtd {
15 namespace forms {
40 struct data;
41
42 public:
44
50
52
56 virtual forms::auto_size_mode auto_size_mode() const noexcept;
60
63 virtual xtd::string& main_text() const noexcept;
67 virtual command_link_button& main_text(const xtd::string& value);
68
71 virtual xtd::string& supplementary_text() const noexcept;
75 virtual command_link_button& supplementary_text(const xtd::string& value);
76
79 xtd::string& text() const noexcept override;
84 xtd::forms::control& text(const xtd::string& value) override;
85
88 virtual std::tuple<xtd::string, xtd::string> texts() const noexcept;
93 virtual command_link_button& texts(const std::tuple<xtd::string, xtd::string>& texts);
95
97
104 void set_texts(const xtd::string& text, const xtd::string& supplementary_text);
105
112 [[deprecated("Replaced by xtd::forms::command_link_button::set_texts - Will be removed in version 0.4.0.")]]
113 control& texts(const xtd::string& text, const xtd::string& supplementary_text);
115
117
121 static command_link_button create();
125 static command_link_button create(const xtd::string& text);
130 static command_link_button create(const xtd::string& text, const drawing::point& location);
136 static command_link_button create(const xtd::string& text, const drawing::point& location, const drawing::size& size);
143 static command_link_button create(const xtd::string& text, const drawing::point& location, const drawing::size& size, const xtd::string& name);
147 static command_link_button create(const std::tuple<xtd::string, xtd::string>& texts);
152 static command_link_button create(const std::tuple<xtd::string, xtd::string>& texts, const drawing::point& location);
158 static command_link_button create(const std::tuple<xtd::string, xtd::string>& texts, const drawing::point& location, const drawing::size& size);
165 static command_link_button create(const std::tuple<xtd::string, xtd::string>& texts, const drawing::point& location, const drawing::size& size, const xtd::string& name);
169 static command_link_button create(const control& parent);
174 static command_link_button create(const control& parent, const xtd::string& text);
180 static command_link_button create(const control& parent, const xtd::string& text, const drawing::point& location);
187 static command_link_button create(const control& parent, const xtd::string& text, const drawing::point& location, const drawing::size& size);
195 static command_link_button create(const control& parent, const xtd::string& text, const drawing::point& location, const drawing::size& size, const xtd::string& name);
200 static command_link_button create(const control& parent, const std::tuple<xtd::string, xtd::string>& texts);
206 static command_link_button create(const control& parent, const std::tuple<xtd::string, xtd::string>& texts, const drawing::point& location);
213 static command_link_button create(const control& parent, const std::tuple<xtd::string, xtd::string>& texts, const drawing::point& location, const drawing::size& size);
221 static command_link_button create(const control& parent, const std::tuple<xtd::string, xtd::string>& texts, const drawing::point& location, const drawing::size& size, const xtd::string& name);
223
224 protected:
226
228 forms::create_params create_params() const noexcept override;
230
232
238 xtd::uptr<xtd::object> clone() const override;
239
240 drawing::size measure_control() const noexcept override;
241 void on_handle_created(const event_args& e) override;
243
244 private:
245 xtd::sptr<data> data_;
246 };
247 }
248}
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.hpp:18
Implements the basic functionality common to button controls.
Definition button_base.hpp:37
Defines the base class for controls, which are components with visual representation.
Definition control.hpp:81
Encapsulates the information needed when creating a control.
Definition create_params.hpp:29
Represents the version number of an assembly, operating system, or the xtd. This class cannot be inhe...
Definition version.hpp:114
Contains xtd::forms::dialog_result enum class.
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
std::unique_ptr< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
auto_size_mode
Specifies how a control will behave when its auto_size property is enabled.
Definition auto_size_mode.hpp:22
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.hpp:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Contains xtd::forms::timer component.