xtd 1.0.0
Loading...
Searching...
No Matches
numeric_up_down.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "application.hpp"
6#include "up_down_base.hpp"
7
9namespace xtd {
11 namespace forms {
35 struct data;
36
37 public:
39
44
46
51 [[nodiscard]] virtual auto decimal_place() const noexcept -> xtd::uint32;
57
61 [[nodiscard]] virtual auto increment() const noexcept -> double;
66 virtual auto increment(double value) -> numeric_up_down&;
67
71 [[nodiscard]] virtual auto maximum() const noexcept -> double;
76 virtual auto maximum(double value) -> numeric_up_down&;
77
81 [[nodiscard]] virtual auto minimum() const noexcept -> double;
86 virtual auto minimum(double value) -> numeric_up_down&;
87
91 [[nodiscard]] virtual auto value() const noexcept -> double;
96 virtual auto value(double value) -> numeric_up_down&;
97
100 [[nodiscard]] virtual auto wrapped() const noexcept -> bool;
104 virtual auto wrapped(bool value) -> numeric_up_down&;
106
108
114 auto set_range(double min_value, double max_value) -> void;
115
119 [[nodiscard]] auto to_string() const noexcept -> xtd::string override;
121
123
127 [[nodiscard]] static auto create() -> numeric_up_down;
131 [[nodiscard]] static auto create(const xtd::drawing::point& location) -> numeric_up_down;
136 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size) -> numeric_up_down;
142 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> numeric_up_down;
146 [[nodiscard]] static auto create(double value) -> numeric_up_down;
151 [[nodiscard]] static auto create(double value, const xtd::drawing::point& location) -> numeric_up_down;
157 [[nodiscard]] static auto create(double value, const xtd::drawing::point& location, const xtd::drawing::size& size) -> numeric_up_down;
164 [[nodiscard]] static auto create(double value, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> numeric_up_down;
169 [[nodiscard]] static auto create(double value, double maximum) -> numeric_up_down;
175 [[nodiscard]] static auto create(double value, double maximum, const xtd::drawing::point& location) -> numeric_up_down;
182 [[nodiscard]] static auto create(double value, double maximum, const xtd::drawing::point& location, const xtd::drawing::size& size) -> numeric_up_down;
190 [[nodiscard]] static auto create(double value, double maximum, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> numeric_up_down;
196 [[nodiscard]] static auto create(double value, double minimum, double maximum) -> numeric_up_down;
203 [[nodiscard]] static auto create(double value, double minimum, double maximum, const xtd::drawing::point& location) -> numeric_up_down;
211 [[nodiscard]] static auto create(double value, double minimum, double maximum, const xtd::drawing::point& location, const xtd::drawing::size& size) -> numeric_up_down;
220 [[nodiscard]] static auto create(double value, double minimum, double maximum, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> numeric_up_down;
224 [[nodiscard]] static auto create(const xtd::forms::control& parent) -> numeric_up_down;
229 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location) -> numeric_up_down;
235 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size) -> numeric_up_down;
242 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> numeric_up_down;
247 [[nodiscard]] static auto create(const xtd::forms::control& parent, double value) -> numeric_up_down;
253 [[nodiscard]] static auto create(const xtd::forms::control& parent, double value, const xtd::drawing::point& location) -> numeric_up_down;
260 [[nodiscard]] static auto create(const xtd::forms::control& parent, double value, const xtd::drawing::point& location, const xtd::drawing::size& size) -> numeric_up_down;
268 [[nodiscard]] static auto create(const xtd::forms::control& parent, double value, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> numeric_up_down;
274 [[nodiscard]] static auto create(const xtd::forms::control& parent, double value, double maximum) -> numeric_up_down;
281 [[nodiscard]] static auto create(const xtd::forms::control& parent, double value, double maximum, const xtd::drawing::point& location) -> numeric_up_down;
289 [[nodiscard]] static auto create(const xtd::forms::control& parent, double value, double maximum, const xtd::drawing::point& location, const xtd::drawing::size& size) -> numeric_up_down;
298 [[nodiscard]] static auto create(const xtd::forms::control& parent, double value, double maximum, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> numeric_up_down;
305 [[nodiscard]] static auto create(const xtd::forms::control& parent, double value, double minimum, double maximum) -> numeric_up_down;
313 [[nodiscard]] static auto create(const xtd::forms::control& parent, double value, double minimum, double maximum, const xtd::drawing::point& location) -> numeric_up_down;
322 [[nodiscard]] static auto create(const xtd::forms::control& parent, double value, double minimum, double maximum, const xtd::drawing::point& location, const xtd::drawing::size& size) -> numeric_up_down;
332 [[nodiscard]] static auto create(const xtd::forms::control& parent, double value, double minimum, double maximum, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> numeric_up_down;
334
336
341
342 protected:
344
346 auto create_params() const noexcept -> xtd::forms::create_params override;
347 auto default_back_color() const noexcept -> xtd::drawing::color override;
348 auto default_fore_color() const noexcept -> xtd::drawing::color override;
350
352
356 auto on_handle_created(const event_args& e) -> void override;
357
360 virtual auto on_value_changed(const event_args& e) -> void;
361
362 auto on_lost_focus(const event_args& e) -> void override;
363
364 auto wnd_proc(message& message) -> void override;
366
368 auto wm_command_control(message& message) -> void;
370
371 private:
372 xtd::sptr<data> data_;
373 };
374 }
375}
Contains xtd::forms::application 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
Defines the base class for controls, which are components with visual representation.
Definition control.hpp:81
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.
numeric_up_down()
Initializes a new instance of the numeric_up_down class.
auto default_back_color() const noexcept -> xtd::drawing::color override
Gets the default background color of the control.
auto on_lost_focus(const event_args &e) -> void override
Raises the xtd::forms::control::lost_focus event.
auto to_string() const noexcept -> xtd::string override
Returns a string that represents the track_bar control.
virtual auto increment() const noexcept -> double
Gets the value to increment or decrement the spin box (also known as an up-down control) when the up ...
virtual auto value() const noexcept -> double
Gets the value assigned to the spin box (also known as an up-down control).
xtd::event< numeric_up_down, xtd::event_handler > value_changed
Occurs when the value property has been changed in some way.
Definition numeric_up_down.hpp:339
auto on_handle_created(const event_args &e) -> void override
Overrides control::on_handle_created(const event_args&).
virtual auto on_value_changed(const event_args &e) -> void
Raises the numeric_up_down::value_changed event.
virtual auto wrapped() const noexcept -> bool
Gets a value indicate if value can be wrapped.
auto default_fore_color() const noexcept -> xtd::drawing::color override
Gets the default foreground color of the control.
auto wnd_proc(message &message) -> void override
Processes Windows messages.
virtual auto minimum() const noexcept -> double
Gets the minimum allowed value for the spin box (also known as an up-down control).
virtual auto decimal_place() const noexcept -> xtd::uint32
Gets the number of decimal places to display in the spin box (also known as an up-down control)....
static auto create() -> numeric_up_down
A factory to create an xtd::forms::numeric_up_down.
auto set_range(double min_value, double max_value) -> void
Sets the minimum and maximum values for a track_bar.
virtual auto maximum() const noexcept -> double
Gets the maximum value for the spin box (also known as an up-down control).
Implements the basic functionality required by a spin box (also known as an up-down control).
Definition up_down_base.hpp:23
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
std::uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.hpp:23
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.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
constexpr auto size() const noexcept -> size_type
Returns the number of elements.
Definition read_only_span.hpp:217
Implements a Windows message.
Definition message.hpp:33
Contains xtd::forms::up_down_base control.