xtd 0.2.0
up_down_button.h
Go to the documentation of this file.
1 #pragma once
5 #include "button_base.h"
6 #include "orientation.h"
7 
9 namespace xtd {
11  namespace forms {
33  class forms_export_ up_down_button : public button_base {
34  struct data;
35 
36  public:
38 
43 
45 
50  virtual int32 maximum() const noexcept;
55  virtual up_down_button& maximum(int32 value);
56 
60  virtual int32 minimum() const noexcept;
65  virtual up_down_button& minimum(int32 value);
66 
69  virtual forms::orientation orientation() const noexcept;
74 
78  virtual int32 value() const noexcept;
83  virtual up_down_button& value(int32 value);
84 
87  virtual bool wrapped() const noexcept;
91  virtual up_down_button& wrapped(bool value);
93 
95 
101  void set_range(int32 min_value, int32 max_value);
102 
106  xtd::ustring to_string() const noexcept override;
108 
110 
115 
120 
121  protected:
122 
124 
126  forms::create_params create_params() const noexcept override;
128 
130 
134  void on_handle_created(const event_args& e) override;
135 
143  virtual void on_scroll(const event_args& e);
144 
147  virtual void on_value_changed(const event_args& e);
148 
152  void wnd_proc(message& message) override;
154 
155  private:
156  void wm_scroll_control(message& message);
157 
158  std::shared_ptr<data> data_;
159  };
160  }
161 }
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.h:18
Contains xtd::forms::orientation enum class.
Implements the basic functionality common to button controls.
Definition: button_base.h:35
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Encapsulates the information needed when creating a control.
Definition: create_params.h:27
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
event< up_down_button, event_handler > scroll
Occurs when either a mouse or keyboard action moves the scroll box.
Definition: up_down_button.h:114
Represents a standard Windows up down button.
Definition: up_down_button.h:33
std::string to_string(const date_time &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: date_time.h:1063
orientation
Specifies the orientation of controls or elements of controls.
Definition: orientation.h:20
Represents an event.
Definition: event.h:21
event< up_down_button, event_handler > value_changed
Occurs when the value of the value property changes.
Definition: up_down_button.h:118
Implements a Windows message.
Definition: message.h:26
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13