xtd 1.0.0
Loading...
Searching...
No Matches
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 [[nodiscard]] virtual auto min_size() const noexcept -> xtd::int32;
58 virtual auto min_size(xtd::int32 value) -> splitter&;
59
62 [[nodiscard]] virtual auto splitter_style() const noexcept -> xtd::forms::splitter_style;
66 virtual auto splitter_style(xtd::forms::splitter_style value) -> splitter&;
68
70
74 [[nodiscard]] static auto create() -> splitter;
78 [[nodiscard]] static auto create(const xtd::drawing::point& location) -> splitter;
83 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size) -> splitter;
89 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> splitter;
93 [[nodiscard]] static auto create(const xtd::forms::control& parent) -> splitter;
98 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location) -> splitter;
104 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size) -> splitter;
111 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> splitter;
113
114 protected:
116
118 [[nodiscard]] auto default_cursor() const noexcept -> xtd::forms::cursor override;
119 [[nodiscard]] auto default_size() const noexcept -> xtd::drawing::size override;
121
123
125 auto on_handle_created(const xtd::event_args& e) -> void override;
126 auto on_mouse_down(const xtd::forms::mouse_event_args& e) -> void override;
127 auto on_mouse_move(const xtd::forms::mouse_event_args& e) -> void override;
128 auto on_mouse_up(const xtd::forms::mouse_event_args& e) -> void override;
130
131 private:
132 xtd::sptr<data> data_;
133 };
134 }
135}
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 auto size() const noexcept -> xtd::drawing::size
Gets the height and width of the control.
virtual auto parent() const noexcept -> std::optional< xtd::forms::control_ref >
Gets the parent container of the control.
virtual auto name() const noexcept -> const xtd::string &
Gets the name of the control.
control()
Initializes a new instance of the xtd::forms::control class with default settings.
virtual auto cursor() const noexcept -> xtd::forms::cursor
Gets the cursor that is displayed when the mouse pointer is over the control.
virtual auto location() const noexcept -> xtd::drawing::point
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its...
virtual auto dock() const noexcept -> xtd::forms::dock_style
Gets which control borders are docked to its parent control and determines how a control is resized w...
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.
virtual auto splitter_style() const noexcept -> xtd::forms::splitter_style
Gets the style of the splitter.
auto default_size() const noexcept -> xtd::drawing::size override
Gets the default size of the control.
auto default_cursor() const noexcept -> xtd::forms::cursor override
Gets the default cursor for the control.
auto on_mouse_move(const xtd::forms::mouse_event_args &e) -> void override
Raises the xtd::forms::control::mouse_move event.
auto on_mouse_up(const xtd::forms::mouse_event_args &e) -> void override
Raises the xtd::forms::control::mouse_up event.
static auto create() -> splitter
A factory to create an xtd::forms::splitter.
auto dock(xtd::forms::dock_style value) -> xtd::forms::control &override
Sets or sets which control borders are docked to its parent control and determines how a control is r...
auto on_mouse_down(const xtd::forms::mouse_event_args &e) -> void override
Raises the xtd::forms::control::mouse_down event.
virtual auto min_size() const noexcept -> xtd::int32
Gets the minimum distance that must remain between the splitter control and the container edge that t...
auto on_handle_created(const xtd::event_args &e) -> void override
Raises the xtd::forms::control::handle_created event.
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
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
dock_style
Specifies the position and manner in which a control is docked.
Definition dock_style.hpp:23
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 auto data() const noexcept -> const_pointer
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:197
Contains xtd::forms::splitter_style enum class.