xtd 0.2.0
split_container.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "orientation.hpp"
7#include "splitter.hpp"
8#include "splitter_panel.hpp"
9
11namespace xtd {
13 namespace forms {
28 struct data;
29
30 public:
32
37
39
43 virtual xtd::forms::orientation orientation() const noexcept;
48
51 virtual const splitter_panel& panel1() const noexcept;
54 virtual splitter_panel& panel1() noexcept;
55
58 virtual const splitter_panel& panel2() const noexcept;
61 virtual splitter_panel& panel2() noexcept;
62
65 virtual int32 splitter_distance() const noexcept;
70
73 virtual xtd::forms::splitter_style splitter_style() const noexcept;
78
82 virtual int32 splitter_width() const noexcept;
89
91
99 static split_container create(const drawing::point& location);
104 static split_container create(const drawing::point& location, const drawing::size& size);
110 static split_container create(const drawing::point& location, const drawing::size& size, const xtd::string& name);
119 static split_container create(const control& parent, const drawing::point& location);
125 static split_container create(const control& parent, const drawing::point& location, const drawing::size& size);
132 static split_container create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::string& name);
134
135 protected:
137
139 drawing::size default_size() const noexcept override;
141
143
149 xtd::uptr<xtd::object> clone() const override;
150
151 void on_resize(const event_args& e) override;
153
154 private:
155 void arrange_children();
156
157 xtd::sptr<data> data_;
158 };
159 }
160}
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 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.
Defines a base class for controls that support auto-scrolling behavior.
Definition scrollable_control.hpp:22
split_container()
Initializes a new instance of the split_container class.
virtual const splitter_panel & panel1() const noexcept
Gets the left or top panel of the splitter_panel, depending on orientation.
virtual const splitter_panel & panel2() const noexcept
Gets the right or bottom panel of the splitter_panel, depending on orientation.
virtual xtd::forms::splitter_style splitter_style() const noexcept
Gets the style of the splitter.
xtd::uptr< xtd::object > clone() const override
Creates a new object that is a copy of the current instance.
drawing::size default_size() const noexcept override
Gets the default size of the control.
static split_container create()
A factory to create an xtd::forms::split_container.
virtual xtd::forms::orientation orientation() const noexcept
Gets a value indicating the horizontal or vertical orientation of the split_container panels.
virtual int32 splitter_width() const noexcept
Gets or sets the width of the splitter in pixels.
virtual int32 splitter_distance() const noexcept
Gets the location of the splitter, in pixels, from the left or top edge of the split_container.
void on_resize(const event_args &e) override
Raises the xtd::forms::control::region event.
Creates a panel that is associated with a split_container.
Definition splitter_panel.hpp:27
#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
orientation
Specifies the orientation of controls or elements of controls.
Definition orientation.hpp:22
@ 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.
Contains xtd::forms::scrollable_control control.
Contains xtd::forms::splitter control.
Contains xtd::forms::splitter_panel container.