xtd 1.0.0
Loading...
Searching...
No Matches
up_down_button.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "button_base.hpp"
6#include "orientation.hpp"
7
9namespace xtd {
11 namespace forms {
36 struct data;
37
38 public:
40
45
47
52 [[nodiscard]] virtual auto maximum() const noexcept -> xtd::int32;
57 virtual auto maximum(xtd::int32 value) -> up_down_button&;
58
62 [[nodiscard]] virtual auto minimum() const noexcept -> xtd::int32;
67 virtual auto minimum(xtd::int32 value) -> up_down_button&;
68
71 [[nodiscard]] virtual auto orientation() const noexcept -> xtd::forms::orientation;
76
80 [[nodiscard]] virtual auto value() const noexcept -> xtd::int32;
85 virtual auto value(xtd::int32 value) -> up_down_button&;
86
89 [[nodiscard]] virtual auto wrapped() const noexcept -> bool;
93 virtual auto wrapped(bool value) -> up_down_button&;
95
97
103 auto set_range(xtd::int32 min_value, xtd::int32 max_value) -> void;
104
108 [[nodiscard]] auto to_string() const noexcept -> xtd::string override;
110
112
116 [[nodiscard]] static auto create() -> up_down_button;
120 [[nodiscard]] static auto create(const xtd::drawing::point& location) -> up_down_button;
125 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size) -> up_down_button;
131 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> up_down_button;
135 [[nodiscard]] static auto create(xtd::int32 value) -> up_down_button;
140 [[nodiscard]] static auto create(xtd::int32 value, const xtd::drawing::point& location) -> up_down_button;
146 [[nodiscard]] static auto create(xtd::int32 value, const xtd::drawing::point& location, const xtd::drawing::size& size) -> up_down_button;
153 [[nodiscard]] static auto create(xtd::int32 value, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> up_down_button;
158 [[nodiscard]] static auto create(xtd::int32 value, xtd::int32 maximum) -> up_down_button;
164 [[nodiscard]] static auto create(xtd::int32 value, xtd::int32 maximum, const xtd::drawing::point& location) -> up_down_button;
171 [[nodiscard]] static auto create(xtd::int32 value, xtd::int32 maximum, const xtd::drawing::point& location, const xtd::drawing::size& size) -> up_down_button;
179 [[nodiscard]] static auto create(xtd::int32 value, xtd::int32 maximum, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> up_down_button;
185 [[nodiscard]] static auto create(xtd::int32 value, xtd::int32 minimum, xtd::int32 maximum) -> up_down_button;
192 [[nodiscard]] static auto create(xtd::int32 value, xtd::int32 minimum, xtd::int32 maximum, const xtd::drawing::point& location) -> up_down_button;
200 [[nodiscard]] static auto create(xtd::int32 value, xtd::int32 minimum, xtd::int32 maximum, const xtd::drawing::point& location, const xtd::drawing::size& size) -> up_down_button;
209 [[nodiscard]] static auto create(xtd::int32 value, xtd::int32 minimum, xtd::int32 maximum, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> up_down_button;
213 [[nodiscard]] static auto create(const xtd::forms::control& parent) -> up_down_button;
218 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location) -> up_down_button;
224 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size) -> up_down_button;
231 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> up_down_button;
236 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value) -> up_down_button;
242 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, const xtd::drawing::point& location) -> up_down_button;
249 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, const xtd::drawing::point& location, const xtd::drawing::size& size) -> up_down_button;
257 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> up_down_button;
263 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, xtd::int32 maximum) -> up_down_button;
270 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, xtd::int32 maximum, const xtd::drawing::point& location) -> up_down_button;
278 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, xtd::int32 maximum, const xtd::drawing::point& location, const xtd::drawing::size& size) -> up_down_button;
287 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, xtd::int32 maximum, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> up_down_button;
294 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, xtd::int32 minimum, xtd::int32 maximum) -> up_down_button;
302 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, xtd::int32 minimum, xtd::int32 maximum, const xtd::drawing::point& location) -> up_down_button;
311 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, xtd::int32 minimum, xtd::int32 maximum, const xtd::drawing::point& location, const xtd::drawing::size& size) -> up_down_button;
321 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::int32 value, xtd::int32 minimum, xtd::int32 maximum, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> up_down_button;
323
325
330
335
336 protected:
337
339
341 [[nodiscard]] auto create_params() const noexcept -> xtd::forms::create_params override;
343
345
349 auto on_handle_created(const xtd::event_args& e) -> void override;
350
358 virtual auto on_scroll(const xtd::event_args& e) -> void;
359
362 virtual auto on_value_changed(const xtd::event_args& e) -> void;
363
367 auto wnd_proc(xtd::forms::message& message) -> void override;
369
370 private:
371 auto wm_scroll_control(xtd::forms::message& message) -> void;
372
373 xtd::sptr<data> data_;
374 };
375 }
376}
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
Represents an event.
Definition event.hpp:23
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...
auto create_params() const noexcept -> xtd::forms::create_params override
Gets the required creation parameters when the control handle is created.
auto set_range(xtd::int32 min_value, xtd::int32 max_value) -> void
Sets the minimum and maximum values for a up_down_button.
xtd::event< up_down_button, xtd::event_handler > scroll
Occurs when either a mouse or keyboard action moves the scroll box.
Definition up_down_button.hpp:329
xtd::event< up_down_button, xtd::event_handler > value_changed
Occurs when the value of the value property changes.
Definition up_down_button.hpp:333
virtual auto maximum() const noexcept -> xtd::int32
Gets the maximum value for the up_down_button control.
up_down_button()
Initializes a new instance of up_down_button class.
virtual auto on_scroll(const xtd::event_args &e) -> void
Raises the up_down_button::scroll event.
static auto create() -> up_down_button
A factory to create an xtd::forms::up_down_button.
virtual auto value() const noexcept -> xtd::int32
Gets the value assigned to the up_down_button control.
auto to_string() const noexcept -> xtd::string override
Returns a string that represents the up_down_button control.
virtual auto orientation() const noexcept -> xtd::forms::orientation
Gets a value indicating the horizontal or vertical orientation of the up down button.
auto on_handle_created(const xtd::event_args &e) -> void override
Overrides control::on_handle_created(const event_args&).
virtual auto on_value_changed(const xtd::event_args &e) -> void
Raises the up_down_button::value_changed event.
auto wnd_proc(xtd::forms::message &message) -> void override
Processes Windows messages.
virtual auto wrapped() const noexcept -> bool
Gets a value indicate if value can be wrapped.
virtual auto minimum() const noexcept -> xtd::int32
Gets the minimum allowed value for the up_down_button control.
generic_event_handler< const xtd::event_args & > event_handler
Represents the method that will handle an event that has no event data.
Definition event_handler.hpp:24
#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
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
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::orientation enum class.
Implements a Windows message.
Definition message.hpp:33