xtd 0.2.0
up_down_button.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "button_base.hpp"
6#include "orientation.hpp"
7
9namespace xtd {
11 namespace forms {
36 struct data;
37
38 public:
40
45
47
52 virtual int32 maximum() const noexcept;
58
62 virtual int32 minimum() const noexcept;
68
71 virtual forms::orientation orientation() const noexcept;
76
80 virtual int32 value() const noexcept;
86
89 virtual bool wrapped() const noexcept;
95
97
103 void set_range(int32 min_value, int32 max_value);
104
108 xtd::string to_string() const noexcept override;
110
112
120 static up_down_button create(const drawing::point& location);
125 static up_down_button create(const drawing::point& location, const drawing::size& size);
131 static up_down_button create(const drawing::point& location, const drawing::size& size, const xtd::string& name);
153 static up_down_button create(int32 value, const drawing::point& location, const drawing::size& size, const xtd::string& name);
179 static up_down_button create(int32 value, int32 maximum, const drawing::point& location, const drawing::size& size, const xtd::string& name);
209 static up_down_button create(int32 value, int32 minimum, int32 maximum, const drawing::point& location, const drawing::size& size, const xtd::string& name);
218 static up_down_button create(const control& parent, const drawing::point& location);
224 static up_down_button create(const control& parent, const drawing::point& location, const drawing::size& size);
231 static up_down_button create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::string& name);
249 static up_down_button create(const control& parent, int32 value, const drawing::point& location, const drawing::size& size);
257 static up_down_button create(const control& parent, int32 value, const drawing::point& location, const drawing::size& size, const xtd::string& name);
287 static up_down_button create(const control& parent, int32 value, int32 maximum, const drawing::point& location, const drawing::size& size, const xtd::string& name);
321 static up_down_button create(const control& parent, int32 value, int32 minimum, int32 maximum, const drawing::point& location, const drawing::size& size, const xtd::string& name);
323
325
330
335
336 protected:
337
339
341 forms::create_params create_params() const noexcept override;
343
345
351 xtd::uptr<xtd::object> clone() const override;
352
355 void on_handle_created(const event_args& e) override;
356
364 virtual void on_scroll(const event_args& e);
365
368 virtual void on_value_changed(const event_args& e);
369
373 void wnd_proc(message& message) override;
375
376 private:
377 void wm_scroll_control(message& message);
378
379 xtd::sptr<data> data_;
380 };
381 }
382}
Contains xtd::forms::button_base class.
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
button_base() noexcept
Initializes a new instance of the ButtonBase class.
Defines the base class for controls, which are components with visual representation.
Definition control.hpp:81
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 const xtd::string & name() const noexcept
Gets the name of the control.
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.
event< up_down_button, event_handler > value_changed
Occurs when the value of the value property changes.
Definition up_down_button.hpp:333
virtual int32 value() const noexcept
Gets the value assigned to the up_down_button control.
virtual forms::orientation orientation() const noexcept
Gets a value indicating the horizontal or vertical orientation of the up down button.
static up_down_button create()
A factory to create an xtd::forms::up_down_button.
void wnd_proc(message &message) override
Processes Windows messages.
virtual int32 maximum() const noexcept
Gets the maximum value for the up_down_button control.
event< up_down_button, event_handler > scroll
Occurs when either a mouse or keyboard action moves the scroll box.
Definition up_down_button.hpp:329
virtual void on_scroll(const event_args &e)
Raises the up_down_button::scroll event.
up_down_button()
Initializes a new instance of up_down_button class.
void on_handle_created(const event_args &e) override
Overrides control::on_handle_created(const event_args&)
virtual bool wrapped() const noexcept
Gets a value indicate if value can be wrapped.
xtd::string to_string() const noexcept override
Returns a string that represents the up_down_button control.
virtual void on_value_changed(const event_args &e)
Raises the up_down_button::value_changed event.
void set_range(int32 min_value, int32 max_value)
Sets the minimum and maximum values for a up_down_button.
xtd::uptr< xtd::object > clone() const override
Creates a new object that is a copy of the current instance.
virtual int32 minimum() const noexcept
Gets the minimum allowed value for the up_down_button control.
forms::create_params create_params() const noexcept override
Gets the required creation parameters when the control handle is created.
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
@ e
The E key.
Definition keys.hpp:207
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