xtd 0.2.0
scroll_bar.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "control.hpp"
6
8namespace xtd {
10 namespace forms {
22 struct data;
23
24 public:
26
34 virtual int32 large_change() const noexcept;
42
47 virtual int32 maximum() const noexcept;
53
56 virtual int32 minimum() const noexcept;
60
66 virtual int32 small_change() const noexcept;
73
77 virtual int32 value() const noexcept;
83
85
90
95
96 protected:
98
102 explicit scroll_bar(bool vertical);
104
106
108 xtd::forms::create_params create_params() const noexcept override;
110
112
114 void on_handle_created(const event_args& e) override;
115
122 virtual void on_scroll(const event_args& e);
123
130 virtual void on_value_changed(const event_args& e);
131
135 void wnd_proc(message& message) override;
137
138 private:
139 void wm_scroll_control(message& message);
140
141 xtd::sptr<data> data_;
142 };
143 }
144}
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
control()
Initializes a new instance of the xtd::forms::control class with default settings.
virtual int32 large_change() const noexcept
Gets a value to be added to or subtracted from the xtd::forms::scroll_bar::value property when the sc...
virtual int32 maximum() const noexcept
Gets the upper limit of values of the scrollable range.
void wnd_proc(message &message) override
Processes Windows messages.
scroll_bar(bool vertical)
Initializes a new instance of scroll_bar class.
virtual int32 value() const noexcept
Gets or sets a numeric value that represents the current position of the scroll box on the scroll bar...
void on_handle_created(const event_args &e) override
Raises the xtd::forms::control::handle_created event.
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.hpp:93
event< scroll_bar, event_handler > scroll
Occurs when the scroll box has been moved by either a mouse or keyboard action.
Definition scroll_bar.hpp:89
xtd::forms::create_params create_params() const noexcept override
Gets the required creation parameters when the control handle is created.
virtual int32 minimum() const noexcept
Gets the lower limit of values of the scrollable range.
virtual void on_value_changed(const event_args &e)
Raises the scroll_bar::value_changed event.
virtual int32 small_change() const noexcept
Gets the value to be added to or subtracted from the xtd::forms::scroll_bar::value property when the ...
virtual void on_scroll(const event_args &e)
Raises the xtd::forms::scroll_bar::scroll event.
Contains xtd::forms::control control.
generic_event_handler< const xtd::event_args & > event_handler
Represents the method that will handle an event that has no event data.
Definition event_handler.hpp:24
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
@ e
The E key.
Definition keys.hpp:207
@ vertical
The control or element is oriented vertically.
Definition orientation.hpp:26
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201
Implements a Windows message.
Definition message.hpp:33