xtd 0.2.0
track_bar.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "control.hpp"
6#include "orientation.hpp"
7#include "tick_style.hpp"
8
10namespace xtd {
12 namespace forms {
35 struct data;
36
37 public:
39
45
47
52 virtual int32 large_change() const noexcept;
58
61 virtual int32 maximum() const noexcept;
67
70 virtual int32 minimum() const noexcept;
76
79 virtual forms::orientation orientation() const noexcept;
85
90 virtual int32 small_change() const noexcept;
97
101 virtual int32 tick_frequency() const noexcept;
107
111 virtual forms::tick_style tick_style() const noexcept;
117
121 virtual int32 value() const noexcept;
128
130
136 void set_range(int32 min_value, int32 max_value);
137
141 xtd::string to_string() const noexcept override;
143
145
153 static track_bar create(const drawing::point& location);
158 static track_bar create(const drawing::point& location, const drawing::size& size);
164 static track_bar create(const drawing::point& location, const drawing::size& size, const xtd::string& name);
173 static track_bar create(int32 value, const drawing::point& location);
179 static track_bar create(int32 value, const drawing::point& location, const drawing::size& size);
186 static track_bar create(int32 value, const drawing::point& location, const drawing::size& size, const xtd::string& name);
212 static track_bar create(int32 value, int32 maximum, const drawing::point& location, const drawing::size& size, const xtd::string& name);
242 static track_bar create(int32 value, int32 minimum, int32 maximum, const drawing::point& location, const drawing::size& size, const xtd::string& name);
251 static track_bar create(const control& parent, const drawing::point& location);
257 static track_bar create(const control& parent, const drawing::point& location, const drawing::size& size);
264 static track_bar create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::string& name);
275 static track_bar create(const control& parent, int32 value, const drawing::point& location);
282 static track_bar create(const control& parent, int32 value, const drawing::point& location, const drawing::size& size);
290 static track_bar create(const control& parent, int32 value, const drawing::point& location, const drawing::size& size, const xtd::string& name);
320 static track_bar create(const control& parent, int32 value, int32 maximum, const drawing::point& location, const drawing::size& size, const xtd::string& name);
354 static track_bar create(const control& parent, int32 value, int32 minimum, int32 maximum, const drawing::point& location, const drawing::size& size, const xtd::string& name);
356
358
363
368
369 protected:
371
375 forms::create_params create_params() const noexcept override;
376
377 drawing::size default_size() const noexcept override;
379
381
387 xtd::uptr<xtd::object> clone() const override;
388
391 void on_handle_created(const event_args& e) override;
392
400 virtual void on_scroll(const event_args& e);
401
404 virtual void on_value_changed(const event_args& e);
405
413
418
422 void wnd_proc(message& message) override;
424
425 private:
426 void wm_scroll_control(message& message);
427
428 xtd::sptr<data> data_;
429 };
430 }
431}
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
virtual int32 width() const noexcept
Gets the width of the control.
virtual drawing::point location() const noexcept
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its...
virtual int32 height() const noexcept
Gets the height of the control.
virtual const xtd::string & name() const noexcept
Gets the name of the control.
control()
Initializes a new instance of the xtd::forms::control class with default settings.
virtual drawing::size size() const noexcept
Gets the height and width of the control.
virtual std::optional< control_ref > parent() const noexcept
Gets the parent container of the control.
void set_client_size_core(int32 width, int32 height) override
Sets the size of the client area of the control.
virtual void on_value_changed(const event_args &e)
Raises the track_bar::value_changed event.
virtual forms::tick_style tick_style() const noexcept
Gets a value indicating how to display the tick marks on the track bar.
virtual forms::orientation orientation() const noexcept
Gets a value indicating the horizontal or vertical orientation of the track bar.
drawing::size default_size() const noexcept override
Gets the default size of the control.
virtual int32 value() const noexcept
Gets a numeric value that represents the current position of the scroll box on the track bar.
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.hpp:366
virtual int32 small_change() const noexcept
Gets he value added to or subtracted from the Value property when the scroll box is moved a small dis...
static track_bar create()
A factory to create an xtd::forms::track_bar.
xtd::uptr< xtd::object > clone() const override
Creates a new object that is a copy of the current instance.
event< track_bar, event_handler > scroll
Occurs when either a mouse or keyboard action moves the scroll box.
Definition track_bar.hpp:362
void set_range(int32 min_value, int32 max_value)
Sets the minimum and maximum values for a xtd::forms::track_bar.
virtual int32 large_change() const noexcept
Gets a value to be added to or subtracted from the value property when the scroll box is moved a larg...
void on_handle_created(const event_args &e) override
Overrides control::on_handle_created(const event_args&)
virtual int32 minimum() const noexcept
Gets the lower limit of the range this track_bar is working with.
forms::create_params create_params() const noexcept override
Gets the required creation parameters when the control handle is created.
virtual int32 maximum() const noexcept
Gets the upper limit of the range this track_bar is working with.
void wnd_proc(message &message) override
Processes Windows messages.
xtd::string to_string() const noexcept override
Returns a string that represents the track_bar control.
virtual void on_scroll(const event_args &e)
Raises the track_bar::scroll event.
void set_bounds_core(int32 x, int32 y, int32 width, int32 height, bounds_specified specified) override
Performs the work of setting the specified bounds of this control.
track_bar()
Initializes a new instance of the track_bar class.
virtual int32 tick_frequency() const noexcept
Gets a value that specifies the delta between ticks drawn on the control.
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
xtd::unique_ptr_object< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
bounds_specified
Specifies the bounds of the control to use when defining a control's size and position....
Definition bounds_specified.hpp:22
@ e
The E key.
Definition keys.hpp:207
@ y
Specifies that the top edge of the control is defined.
Definition bounds_specified.hpp:28
@ x
Specifies that the left edge of the control is defined.
Definition bounds_specified.hpp:26
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
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
Contains xtd::forms::orientation enum class.
Implements a Windows message.
Definition message.hpp:33
Contains xtd::forms::tick_style enum class.