xtd 1.0.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 [[nodiscard]] virtual auto auto_size_mode() const noexcept -> xtd::forms::auto_size_mode;
60
63 [[nodiscard]] virtual auto main_text() const noexcept -> const xtd::string&;
67 virtual auto main_text(const xtd::string& value) -> command_link_button&;
68
71 [[nodiscard]] virtual auto supplementary_text() const noexcept -> const xtd::string&;
75 virtual auto supplementary_text(const xtd::string& value) -> command_link_button&;
76
79 [[nodiscard]] auto text() const noexcept -> const xtd::string& override;
84 auto text(const xtd::string& value) -> xtd::forms::control& override;
85
88 [[nodiscard]] virtual auto texts() const noexcept -> std::tuple<xtd::string, xtd::string>;
93 virtual auto texts(const std::tuple<xtd::string, xtd::string>& value) -> command_link_button&;
95
97
104 auto set_texts(const xtd::string& text, const xtd::string& supplementary_text) -> void;
106
108
112 [[nodiscard]] static auto create() -> command_link_button;
116 [[nodiscard]] static auto create(const xtd::string& text) -> command_link_button;
121 [[nodiscard]] static auto create(const xtd::string& text, const xtd::drawing::point& location) -> command_link_button;
127 [[nodiscard]] static auto create(const xtd::string& text, const xtd::drawing::point& location, const xtd::drawing::size& size) -> command_link_button;
134 [[nodiscard]] static auto create(const xtd::string& text, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> command_link_button;
138 [[nodiscard]] static auto create(const std::tuple<xtd::string, xtd::string>& texts) -> command_link_button;
143 [[nodiscard]] static auto create(const std::tuple<xtd::string, xtd::string>& texts, const xtd::drawing::point& location) -> command_link_button;
149 [[nodiscard]] static auto create(const std::tuple<xtd::string, xtd::string>& texts, const xtd::drawing::point& location, const xtd::drawing::size& size) -> command_link_button;
156 [[nodiscard]] static auto create(const std::tuple<xtd::string, xtd::string>& texts, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> command_link_button;
160 [[nodiscard]] static auto create(const xtd::forms::control& parent) -> command_link_button;
165 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text) -> command_link_button;
171 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, const xtd::drawing::point& location) -> command_link_button;
178 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, const xtd::drawing::point& location, const xtd::drawing::size& size) -> command_link_button;
186 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::string& text, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> command_link_button;
191 [[nodiscard]] static auto create(const xtd::forms::control& parent, const std::tuple<xtd::string, xtd::string>& texts) -> command_link_button;
197 [[nodiscard]] static auto create(const xtd::forms::control& parent, const std::tuple<xtd::string, xtd::string>& texts, const xtd::drawing::point& location) -> command_link_button;
204 [[nodiscard]] static auto create(const xtd::forms::control& parent, const std::tuple<xtd::string, xtd::string>& texts, const xtd::drawing::point& location, const xtd::drawing::size& size) -> command_link_button;
212 [[nodiscard]] static auto create(const xtd::forms::control& parent, const std::tuple<xtd::string, xtd::string>& texts, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> command_link_button;
214
216
224 [[deprecated("Replaced by xtd::forms::command_link_button::set_texts - Will be removed in version 1.2.0.")]]
225 [[nodiscard]] auto texts(const xtd::string& text, const xtd::string& supplementary_text) -> xtd::forms::control&;
227
228 protected:
230
232 [[nodiscard]] auto create_params() const noexcept -> xtd::forms::create_params override;
234
236
238 [[nodiscard]] auto measure_control() const noexcept -> xtd::drawing::size override;
239 auto on_handle_created(const event_args& e) -> void override;
241
242 private:
243 xtd::sptr<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.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
virtual auto size() const noexcept -> xtd::drawing::size
Gets the height and width of the control.
virtual auto parent() const noexcept -> std::optional< xtd::forms::control_ref >
Gets the parent container of the control.
virtual auto name() const noexcept -> const xtd::string &
Gets the name of the control.
virtual auto location() const noexcept -> xtd::drawing::point
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its...
Contains xtd::forms::dialog_result enum class.
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
Contains xtd::forms::ibutton_control interface.
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr auto data() const noexcept -> const_pointer
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:197
Contains xtd::forms::timer component.