xtd 0.2.0
splitter.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "control.hpp"
6#include "splitter_style.hpp"
7#include <xtd/argument_exception>
8
10namespace xtd {
12 namespace forms {
27 struct data;
28
29 public:
31
36
38
51
54 virtual int32 min_size() const noexcept;
59
62 virtual xtd::forms::splitter_style splitter_style() const noexcept;
68
70
74 static splitter create();
78 static splitter create(const drawing::point& location);
83 static splitter create(const drawing::point& location, const drawing::size& size);
89 static splitter create(const drawing::point& location, const drawing::size& size, const xtd::string& name);
93 static splitter create(const control& parent);
98 static splitter create(const control& parent, const drawing::point& location);
104 static splitter create(const control& parent, const drawing::point& location, const drawing::size& size);
111 static splitter create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::string& name);
113
114 protected:
116
118 forms::cursor default_cursor() const noexcept override;
119 drawing::size default_size() const noexcept override;
121
123
129 xtd::uptr<xtd::object> clone() const override;
130
131 void on_handle_created(const event_args& e) override;
132 void on_mouse_down(const mouse_event_args& e) override;
133 void on_mouse_move(const mouse_event_args& e) override;
134 void on_mouse_up(const mouse_event_args& e) override;
136
137 private:
138 xtd::sptr<data> data_;
139 };
140 }
141}
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.hpp:18
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 forms::cursor cursor() const noexcept
Gets the cursor that is displayed when the mouse pointer is over 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 dock_style dock() const noexcept
Gets which control borders are docked to its parent control and determines how a control is resized w...
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.
Provides data for the xtd::forms::control::mouse_up, xtd::forms::control::mouse_down,...
Definition mouse_event_args.hpp:34
splitter()
Initializes a new instance of the splitter class.
void on_mouse_move(const mouse_event_args &e) override
Raises the xtd::forms::control::mouse_move event.
static splitter create()
A factory to create an xtd::forms::splitter.
virtual int32 min_size() const noexcept
Gets the minimum distance that must remain between the splitter control and the container edge that t...
drawing::size default_size() const noexcept override
Gets the default size of the control.
void on_mouse_down(const mouse_event_args &e) override
Raises the xtd::forms::control::mouse_down event.
xtd::uptr< xtd::object > clone() const override
Creates a new object that is a copy of the current instance.
void on_handle_created(const event_args &e) override
Raises the xtd::forms::control::handle_created event.
void on_mouse_up(const mouse_event_args &e) override
Raises the xtd::forms::control::mouse_up event.
virtual xtd::forms::splitter_style splitter_style() const noexcept
Gets the style of the splitter.
control & dock(dock_style dock) override
Sets or sets which control borders are docked to its parent control and determines how a control is r...
forms::cursor default_cursor() const noexcept override
Gets the default cursor for the control.
Contains xtd::forms::control control.
#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
dock_style
Specifies the position and manner in which a control is docked.
Definition dock_style.hpp:23
@ 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::splitter_style enum class.