xtd 1.0.0
Loading...
Searching...
No Matches
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 [[nodiscard]] virtual auto large_change() const noexcept -> xtd::int32;
42
47 [[nodiscard]] virtual auto maximum() const noexcept -> xtd::int32;
52 virtual auto maximum(xtd::int32 value) -> scroll_bar&;
53
56 [[nodiscard]] virtual auto minimum() const noexcept -> xtd::int32;
59 virtual auto minimum(xtd::int32 value) -> scroll_bar&;
60
66 [[nodiscard]] virtual auto small_change() const noexcept -> xtd::int32;
73
77 [[nodiscard]] virtual auto value() const noexcept -> xtd::int32;
81 virtual auto value(xtd::int32 value) -> scroll_bar&;
83
85
90
95
96 protected:
98
102 explicit scroll_bar(bool vertical);
104
106
108 [[nodiscard]] auto create_params() const noexcept -> xtd::forms::create_params override;
110
112
114 auto on_handle_created(const event_args& e) -> void override;
115
122 virtual auto on_scroll(const event_args& e) -> void;
123
130 virtual auto on_value_changed(const event_args& e) -> void;
131
135 auto wnd_proc(message& message) -> void override;
137
138 private:
139 auto wm_scroll_control(message& message) -> void;
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:23
Defines the base class for controls, which are components with visual representation.
Definition control.hpp:81
virtual auto large_change() const noexcept -> xtd::int32
Gets a value to be added to or subtracted from the xtd::forms::scroll_bar::value property when the sc...
virtual auto minimum() const noexcept -> xtd::int32
Gets the lower limit of values of the scrollable range.
auto create_params() const noexcept -> xtd::forms::create_params override
Gets the required creation parameters when the control handle is created.
auto on_handle_created(const event_args &e) -> void override
Raises the xtd::forms::control::handle_created event.
scroll_bar(bool vertical)
Initializes a new instance of scroll_bar class.
virtual auto small_change() const noexcept -> xtd::int32
Gets the value to be added to or subtracted from the xtd::forms::scroll_bar::value property when the ...
xtd::event< scroll_bar, xtd::event_handler > scroll
Occurs when the scroll box has been moved by either a mouse or keyboard action.
Definition scroll_bar.hpp:89
virtual auto on_scroll(const event_args &e) -> void
Raises the xtd::forms::scroll_bar::scroll event.
xtd::event< scroll_bar, xtd::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
virtual auto on_value_changed(const event_args &e) -> void
Raises the scroll_bar::value_changed event.
virtual auto maximum() const noexcept -> xtd::int32
Gets the upper limit of values of the scrollable range.
auto wnd_proc(message &message) -> void override
Processes Windows messages.
virtual auto value() const noexcept -> xtd::int32
Gets or sets a numeric value that represents the current position of the scroll box on the scroll bar...
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
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
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 auto data() const noexcept -> const_pointer
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:197
Implements a Windows message.
Definition message.hpp:33