xtd 0.2.0
Loading...
Searching...
No Matches
collapsible_panel.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "control.hpp"
6#include "border_sides.hpp"
7#include "border_style.hpp"
8
10namespace xtd {
12 namespace forms {
27 struct data;
28
29 public:
31
36
38
40 virtual bool auto_size() const noexcept override;
41
44 virtual forms::border_sides border_sides() const noexcept;
48
52 virtual forms::border_style border_style() const noexcept;
61 virtual collapsible_panel& border_style(std::nullptr_t);
62
65 bool expanded() const noexcept;
68 collapsible_panel& expanded(bool expanded);
69
71 const xtd::drawing::size& client_size() const noexcept override;
72 xtd::drawing::size size() const noexcept override;
75
77
81 void collapse();
82
85 void expand();
87
89
93 static collapsible_panel create();
97 static collapsible_panel create(const drawing::point& location);
102 static collapsible_panel create(const drawing::point& location, const drawing::size& size);
108 static collapsible_panel create(const drawing::point& location, const drawing::size& size, const xtd::string& name);
112 static collapsible_panel create(const xtd::string& text);
117 static collapsible_panel create(const xtd::string& text, const drawing::point& location);
123 static collapsible_panel create(const xtd::string& text, const drawing::point& location, const drawing::size& size);
130 static collapsible_panel create(const xtd::string& text, const drawing::point& location, const drawing::size& size, const xtd::string& name);
135 static collapsible_panel create(const xtd::string& text, bool expanded);
141 static collapsible_panel create(const xtd::string& text, bool expanded, const drawing::point& location);
148 static collapsible_panel create(const xtd::string& text, bool expanded, const drawing::point& location, const drawing::size& size);
156 static collapsible_panel create(const xtd::string& text, bool expanded, const drawing::point& location, const drawing::size& size, const xtd::string& name);
160 static collapsible_panel create(const control& parent);
165 static collapsible_panel create(const control& parent, const drawing::point& location);
171 static collapsible_panel create(const control& parent, const drawing::point& location, const drawing::size& size);
178 static collapsible_panel create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::string& name);
183 static collapsible_panel create(const control& parent, const xtd::string& text);
189 static collapsible_panel create(const control& parent, const xtd::string& text, const drawing::point& location);
196 static collapsible_panel create(const control& parent, const xtd::string& text, const drawing::point& location, const drawing::size& size);
204 static collapsible_panel create(const control& parent, const xtd::string& text, const drawing::point& location, const drawing::size& size, const xtd::string& name);
210 static collapsible_panel create(const control& parent, const xtd::string& text, bool expanded);
217 static collapsible_panel create(const control& parent, const xtd::string& text, bool expanded, const drawing::point& location);
225 static collapsible_panel create(const control& parent, const xtd::string& text, bool expanded, const drawing::point& location, const drawing::size& size);
234 static collapsible_panel create(const control& parent, const xtd::string& text, bool expanded, const drawing::point& location, const drawing::size& size, const xtd::string& name);
236
238
244
245 protected:
247
249 forms::create_params create_params() const noexcept override;
251
253
259 xtd::uptr<xtd::object> clone() const override;
260
261 drawing::size measure_control() const noexcept override;
262
263 void on_control_added(const control_event_args& e) override;
264 void on_control_removed(const control_event_args& e) override;
265
267 virtual void on_expanded_changed(const xtd::event_args& e);
268
269 void on_handle_created(const event_args& e) override;
270
271 void wnd_proc(message& message) override;
273
274 private:
275 control& auto_size(bool auto_size) override;
276 control& client_size(const xtd::drawing::size& client_size) override;
277 control& size(const xtd::drawing::size& size) override;
278 void wm_command_control(message& message);
279
280 xtd::sptr<data> data_;
281 };
282 }
283}
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.hpp:18
Represents an event.
Definition event.hpp:21
Used to group collections of controls in a collapsible panel.
Definition collapsible_panel.hpp:26
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.hpp:27
Defines the base class for controls, which are components with visual representation.
Definition control.hpp:81
Encapsulates the information needed when creating a control.
Definition create_params.hpp:29
Implements a Windows message.
Definition message.hpp:28
generic_event_handler<> event_handler
Represents the method that will handle an event that has no event data.
Definition event_handler.hpp:32
#define forms_export_
Define shared library export.
Definition forms_export.hpp:13
std::unique_ptr< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.hpp:25
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
border_sides
Specifies how a control anchors to the edges of its container.
Definition border_sides.hpp:23
border_style
Specifies the border style for a control.
Definition border_style.hpp:22
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.hpp:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Contains xtd::forms::style_sheets::border_style class.
Contains xtd::forms::style_sheets::control class.