xtd 0.2.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 virtual double decimal_place() const noexcept;
56 virtual numeric_up_down& decimal_place(int32 value);
57
61 virtual double increment() const noexcept;
66 virtual numeric_up_down& increment(double value);
67
71 virtual double maximum() const noexcept;
76 virtual numeric_up_down& maximum(double value);
77
81 virtual double minimum() const noexcept;
86 virtual numeric_up_down& minimum(double value);
87
91 virtual double value() const noexcept;
96 virtual numeric_up_down& value(double value);
97
100 virtual bool wrapped() const noexcept;
104 virtual numeric_up_down& wrapped(bool value);
106
108
114 void set_range(double min_value, double max_value);
115
119 xtd::string to_string() const noexcept override;
121
123
127 static numeric_up_down create();
131 static numeric_up_down create(const drawing::point& location);
136 static numeric_up_down create(const drawing::point& location, const drawing::size& size);
142 static numeric_up_down create(const drawing::point& location, const drawing::size& size, const xtd::string& name);
146 static numeric_up_down create(double value);
151 static numeric_up_down create(double value, const drawing::point& location);
157 static numeric_up_down create(double value, const drawing::point& location, const drawing::size& size);
164 static numeric_up_down create(double value, const drawing::point& location, const drawing::size& size, const xtd::string& name);
169 static numeric_up_down create(double value, double maximum);
175 static numeric_up_down create(double value, double maximum, const drawing::point& location);
182 static numeric_up_down create(double value, double maximum, const drawing::point& location, const drawing::size& size);
190 static numeric_up_down create(double value, double maximum, const drawing::point& location, const drawing::size& size, const xtd::string& name);
196 static numeric_up_down create(double value, double minimum, double maximum);
203 static numeric_up_down create(double value, double minimum, double maximum, const drawing::point& location);
211 static numeric_up_down create(double value, double minimum, double maximum, const drawing::point& location, const drawing::size& size);
220 static numeric_up_down create(double value, double minimum, double maximum, const drawing::point& location, const drawing::size& size, const xtd::string& name);
224 static numeric_up_down create(const control& parent);
229 static numeric_up_down create(const control& parent, const drawing::point& location);
235 static numeric_up_down create(const control& parent, const drawing::point& location, const drawing::size& size);
242 static numeric_up_down create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::string& name);
247 static numeric_up_down create(const control& parent, double value);
253 static numeric_up_down create(const control& parent, double value, const drawing::point& location);
260 static numeric_up_down create(const control& parent, double value, const drawing::point& location, const drawing::size& size);
268 static numeric_up_down create(const control& parent, double value, const drawing::point& location, const drawing::size& size, const xtd::string& name);
274 static numeric_up_down create(const control& parent, double value, double maximum);
281 static numeric_up_down create(const control& parent, double value, double maximum, const drawing::point& location);
289 static numeric_up_down create(const control& parent, double value, double maximum, const drawing::point& location, const drawing::size& size);
298 static numeric_up_down create(const control& parent, double value, double maximum, const drawing::point& location, const drawing::size& size, const xtd::string& name);
305 static numeric_up_down create(const control& parent, double value, double minimum, double maximum);
313 static numeric_up_down create(const control& parent, double value, double minimum, double maximum, const drawing::point& location);
322 static numeric_up_down create(const control& parent, double value, double minimum, double maximum, const drawing::point& location, const drawing::size& size);
332 static numeric_up_down create(const control& parent, double value, double minimum, double maximum, const drawing::point& location, const drawing::size& size, const xtd::string& name);
334
336
341
342 protected:
344
346 forms::create_params create_params() const noexcept override;
347 drawing::color default_back_color() const noexcept override;
348 drawing::color default_fore_color() const noexcept override;
350
352
358 xtd::uptr<xtd::object> clone() const override;
359
362 void on_handle_created(const event_args& e) override;
363
366 virtual void on_value_changed(const event_args& e);
367
368 void on_lost_focus(const event_args& e) override;
369
370 void wnd_proc(message& message) override;
372
374 void wm_command_control(message& message);
376
377 private:
378 xtd::sptr<data> data_;
379 };
380 }
381}
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:21
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
Implements a Windows message.
Definition message.hpp:28
Represents a standard Windows numeric up down.
Definition numeric_up_down.hpp:34
virtual double decimal_place() const noexcept
Gets the number of decimal places to display in the spin box (also known as an up-down control)....
numeric_up_down()
Initializes a new instance of the numeric_up_down class.
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<> event_handler
Represents the method that will handle an event that has no event data.
Definition event_handler.hpp:32
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
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
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::up_down_base control.