xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
scroll_bar.h
Go to the documentation of this file.
1 #pragma once
5 #include "control.h"
6 
8 namespace xtd {
10  namespace forms {
17  class forms_export_ scroll_bar : public control {
18  public:
25  virtual int32_t large_change() const;
32  virtual scroll_bar& large_change(int32_t large_change);
33 
38  virtual int32_t maximum() const;
43  virtual scroll_bar& maximum(int32_t maximum);
44 
47  virtual int32_t minimum() const;
50  virtual scroll_bar& minimum(int32_t minimum);
51 
57  virtual int32_t small_change() const;
63  virtual scroll_bar& small_change(int32_t small_change);
64 
68  virtual int32_t value() const;
72  virtual scroll_bar& value(int32_t value);
73 
77 
81 
82  protected:
84  scroll_bar() = default;
85 
86  xtd::forms::create_params create_params() const override;
87 
88  void on_handle_created(const event_args& e) override;
89 
96  virtual void on_scroll(const event_args& e);
97 
104  virtual void on_value_changed(const event_args& e);
105 
109  void wnd_proc(message& message) override;
110 
112  int32_t large_change_ = 10;
113  int32_t maximum_ = 100;
114  int32_t minimum_ = 0;
115  int32_t small_change_ = 1;
116  int32_t value_ = 0;
117  bool v_scroll_ = true;
119 
120  private:
121  void wm_scroll(message& message);
122  };
123  }
124 }
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
Represents a standard Windows scroll bar.
Definition: scroll_bar.h:17
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
event< scroll_bar, event_handler > scroll
Occurs when the scroll box has been moved by either a mouse or keyboard action.
Definition: scroll_bar.h:76
event< scroll_bar, event_handler > value_changed
Occurs when the xtd::forms::scroll_bar::value property is changed, either by a xtd::forms::scroll_bar...
Definition: scroll_bar.h:80
Represents an event.
Definition: event.h:21
The system-defined color of the background of a scroll bar.
Implements a Windows message.
Definition: message.h:25
Defines the base class for controls, which are components with visual representation.
Definition: control.h:68
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