xtd - Reference Guide  0.1.2
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
scroll_bar.h
Go to the documentation of this file.
1
4#pragma once
5#include "control.h"
6
8namespace xtd {
10 namespace forms {
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 an event.
Definition event.h:21
Defines the base class for controls, which are components with visual representation.
Definition control.h:67
Implements a Windows message.
Definition message.h:25
Represents a standard Windows scroll bar.
Definition scroll_bar.h:17
virtual int32_t large_change() const
Gets a value to be added to or subtracted from the xtd::forms::scroll_bar::value property when the sc...
virtual scroll_bar & value(int32_t value)
Sets or sets a numeric value that represents the current position of the scroll box on the scroll bar...
void wnd_proc(message &message) override
Processes Windows messages.
virtual scroll_bar & minimum(int32_t minimum)
Sets the lower limit of values of the scrollable range.
void on_handle_created(const event_args &e) override
Raises the control::handle_created event.
virtual int32_t maximum() const
Gets the upper limit of values of the scrollable range.
virtual int32_t value() const
Gets or sets a numeric value that represents the current position of the scroll box on the scroll bar...
virtual scroll_bar & large_change(int32_t large_change)
Sets a value to be added to or subtracted from the xtd::forms::scroll_bar::value property when the sc...
virtual int32_t small_change() const
Gets the value to be added to or subtracted from the xtd::forms::scroll_bar::value property when the ...
scroll_bar()=default
Initializes a new instance of scroll_bar class.
virtual void on_value_changed(const event_args &e)
Raises the scroll_bar::value_changed event.
xtd::forms::create_params create_params() const override
Gets the required creation parameters when the control handle is created.
virtual int32_t minimum() const
Gets the lower limit of values of the scrollable range.
virtual scroll_bar & maximum(int32_t maximum)
Sets the upper limit of values of the scrollable range.
virtual void on_scroll(const event_args &e)
Raises the xtd::forms::scroll_bar::scroll event.
virtual scroll_bar & small_change(int32_t small_change)
Sets the value to be added to or subtracted from the xtd::forms::scroll_bar::value property when the ...
Contains xtd::forms::control control.
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
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
#define forms_export_
Define shared library export.
Definition forms_export.h:13
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition about_box.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition system_report.h:17