xtd 0.2.0
Loading...
Searching...
No Matches
collapsible_panel.h
Go to the documentation of this file.
1
4#pragma once
5#include "control.h"
6#include "border_sides.h"
7#include "border_style.h"
8
10namespace xtd {
12 namespace forms {
25 struct data;
26
27 public:
29
34
36
38 virtual bool auto_size() const noexcept override;
39
42 virtual forms::border_sides border_sides() const noexcept;
46
50 virtual forms::border_style border_style() const noexcept;
59 virtual collapsible_panel& border_style(std::nullptr_t);
60
63 bool expanded() const noexcept;
66 collapsible_panel& expanded(bool expanded);
67
69 const xtd::drawing::size& client_size() const noexcept override;
70 xtd::drawing::size size() const noexcept override;
73
75
79 void collapse();
80
83 void expand();
85
87
91 static collapsible_panel create();
95 static collapsible_panel create(const drawing::point& location);
100 static collapsible_panel create(const drawing::point& location, const drawing::size& size);
106 static collapsible_panel create(const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
110 static collapsible_panel create(const xtd::ustring& text);
115 static collapsible_panel create(const xtd::ustring& text, const drawing::point& location);
121 static collapsible_panel create(const xtd::ustring& text, const drawing::point& location, const drawing::size& size);
128 static collapsible_panel create(const xtd::ustring& text, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
133 static collapsible_panel create(const xtd::ustring& text, bool expanded);
139 static collapsible_panel create(const xtd::ustring& text, bool expanded, const drawing::point& location);
146 static collapsible_panel create(const xtd::ustring& text, bool expanded, const drawing::point& location, const drawing::size& size);
154 static collapsible_panel create(const xtd::ustring& text, bool expanded, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
158 static collapsible_panel create(const control& parent);
163 static collapsible_panel create(const control& parent, const drawing::point& location);
169 static collapsible_panel create(const control& parent, const drawing::point& location, const drawing::size& size);
176 static collapsible_panel create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
181 static collapsible_panel create(const control& parent, const xtd::ustring& text);
187 static collapsible_panel create(const control& parent, const xtd::ustring& text, const drawing::point& location);
194 static collapsible_panel create(const control& parent, const xtd::ustring& text, const drawing::point& location, const drawing::size& size);
202 static collapsible_panel create(const control& parent, const xtd::ustring& text, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
208 static collapsible_panel create(const control& parent, const xtd::ustring& text, bool expanded);
215 static collapsible_panel create(const control& parent, const xtd::ustring& text, bool expanded, const drawing::point& location);
223 static collapsible_panel create(const control& parent, const xtd::ustring& text, bool expanded, const drawing::point& location, const drawing::size& size);
232 static collapsible_panel create(const control& parent, const xtd::ustring& text, bool expanded, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
234
236
242
243 protected:
245
247 forms::create_params create_params() const noexcept override;
249
251
257 std::unique_ptr<xtd::object> clone() const override;
258
259 drawing::size measure_control() const noexcept override;
260
261 void on_control_added(const control_event_args& e) override;
262 void on_control_removed(const control_event_args& e) override;
263
265 virtual void on_expanded_changed(const xtd::event_args& e);
266
267 void on_handle_created(const event_args& e) override;
268
269 void wnd_proc(message& message) override;
271
272 private:
273 control& auto_size(bool auto_size) override;
274 control& client_size(const xtd::drawing::size& client_size) override;
275 control& size(const xtd::drawing::size& size) override;
276 void wm_command_control(message& message);
277
278 std::shared_ptr<data> data_;
279 };
280 }
281}
Contains xtd::forms::border_sides enum class.
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.h:18
Represents an event.
Definition event.h:21
Used to group collections of controls in a collapsible panel.
Definition collapsible_panel.h:24
virtual bool auto_size() const noexcept override
Gets a value that indicates whether the control resizes based on its contents.
collapsible_panel()
Initializes a new instance of the collapsible_panel class.
Provides data for the xtd::forms::control::control_added and xtd::forms::control::control_removed eve...
Definition control_event_args.h:25
Defines the base class for controls, which are components with visual representation.
Definition control.h:79
Encapsulates the information needed when creating a control.
Definition create_params.h:27
Implements a Windows message.
Definition message.h:26
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
generic_event_handler<> event_handler
Represents the method that will handle an event that has no event data.
Definition event_handler.h:32
#define forms_export_
Define shared library export.
Definition forms_export.h:13
size_t size
Represents a size of any object in bytes.
Definition types.h:197
border_sides
Specifies how a control anchors to the edges of its container.
Definition border_sides.h:21
border_style
Specifies the border style for a control.
Definition border_style.h:20
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::forms::style_sheets::border_style class.
Contains xtd::forms::style_sheets::control class.