xtd 0.2.0
track_bar.h
Go to the documentation of this file.
1 #pragma once
5 #include "control.h"
6 #include "orientation.h"
7 #include "tick_style.h"
8 
10 namespace xtd {
12  namespace forms {
32  class forms_export_ track_bar : public control {
33  struct data;
34 
35  public:
37 
41  track_bar();
43 
45 
50  virtual int32 large_change() const noexcept;
55  virtual track_bar& large_change(int32 large_change);
56 
59  virtual int32 maximum() const noexcept;
64  virtual track_bar& maximum(int32 maximum);
65 
68  virtual int32 minimum() const noexcept;
73  virtual track_bar& minimum(int32 minimum);
74 
77  virtual forms::orientation orientation() const noexcept;
83 
88  virtual int32 small_change() const noexcept;
94  virtual track_bar& small_change(int32 small_change);
95 
99  virtual int32 tick_frequency() const noexcept;
104  virtual track_bar& tick_frequency(int32 tick_frequency);
105 
109  virtual forms::tick_style tick_style() const noexcept;
115 
119  virtual int32 value() const noexcept;
124  virtual track_bar& value(int32 value);
126 
128 
134  void set_range(int32 min_value, int32 max_value);
135 
139  xtd::ustring to_string() const noexcept override;
141 
143 
148 
153 
154  protected:
156 
160  forms::create_params create_params() const noexcept override;
161 
162  drawing::size default_size() const noexcept override;
164 
166 
170  void on_handle_created(const event_args& e) override;
171 
179  virtual void on_scroll(const event_args& e);
180 
183  virtual void on_value_changed(const event_args& e);
184 
191  void set_bounds_core(int32 x, int32 y, int32 width, int32 height, bounds_specified specified) override;
192 
196  void set_client_size_core(int32 width, int32 height) override;
197 
201  void wnd_proc(message& message) override;
203 
204  private:
205  void wm_scroll_control(message& message);
206 
207  std::shared_ptr<data> data_;
208  };
209  }
210 }
event< track_bar, event_handler > scroll
Occurs when either a mouse or keyboard action moves the scroll box.
Definition: track_bar.h:147
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.
Specifies that the top edge of the control is defined.
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
Specifies that the left edge of the control is defined.
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
Specifies that the height of the control is defined.
Represents an event.
Definition: event.h:21
tick_style
Specifies the location of tick marks in a track_bar control.
Definition: tick_style.h:20
Specifies that the width of the control is defined.
Implements a Windows message.
Definition: message.h:26
Defines the base class for controls, which are components with visual representation.
Definition: control.h:78
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
Contains xtd::forms::control control.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
bounds_specified
Specifies the bounds of the control to use when defining a control&#39;s size and position. This enumeration has a flags attribute that allows a bitwise combination of its member values.
Definition: bounds_specified.h:20
event< track_bar, event_handler > value_changed
Occurs when the value property of a track bar changes, either by movement of the scroll box or by man...
Definition: track_bar.h:151
Contains xtd::forms::tick_style enum class.
Represents a standard Windows track bar.
Definition: track_bar.h:32
size_t size
Represents a size of any object in bytes.
Definition: types.h:195