xtd 1.0.0
Loading...
Searching...
No Matches
panel.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "border_sides.hpp"
6#include "border_style.hpp"
8#include <xtd/optional>
9
11namespace xtd {
13 namespace forms {
33 struct data;
34
35 public:
37
42
44
48 [[nodiscard]] virtual auto auto_size_mode() const noexcept -> xtd::forms::auto_size_mode;
52 virtual auto auto_size_mode(xtd::forms::auto_size_mode value) -> panel&;
53
56 [[nodiscard]] virtual auto border_sides() const noexcept -> xtd::forms::border_sides;
59 virtual auto border_sides(xtd::forms::border_sides value) -> panel&;
60
64 [[nodiscard]] virtual auto border_style() const noexcept -> xtd::forms::border_style;
69 virtual auto border_style(xtd::forms::border_style value) -> panel&;
74 virtual auto border_style(xtd::null_ptr) -> panel&;
76
78
82 [[nodiscard]] static auto create() -> panel;
86 [[nodiscard]] static auto create(const xtd::drawing::point& location) -> panel;
91 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size) -> panel;
97 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> panel;
101 [[nodiscard]] static auto create(const xtd::forms::control& parent) -> panel;
106 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location) -> panel;
112 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size) -> panel;
119 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> panel;
121
122 protected:
124
126 [[nodiscard]] auto create_params() const noexcept -> xtd::forms::create_params override;
128
130
132 [[nodiscard]] auto measure_control() const noexcept -> xtd::drawing::size override;
133 auto on_layout(const xtd::event_args& e) -> void override;
134 auto on_paint(xtd::forms::paint_event_args& e) -> void override;
136
137 private:
138 xtd::sptr<data> data_;
139 };
140 }
141}
Contains xtd::forms::border_sides enum class.
Contains xtd::forms::border_style 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
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.
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...
Provides data for the xtd::forms::control::paint event.
Definition paint_event_args.hpp:26
auto measure_control() const noexcept -> xtd::drawing::size override
Measure this control.
panel()
Initialises a new instance of panel class.
virtual auto border_style() const noexcept -> xtd::forms::border_style
Gets the border style for the control.
auto on_layout(const xtd::event_args &e) -> void override
Raises the xtd::forms::control::layout event.
virtual auto auto_size_mode() const noexcept -> xtd::forms::auto_size_mode
Gets the mode by which the panel automatically resizes itself.
static auto create() -> panel
A factory to create an xtd::forms::panel.
auto on_paint(xtd::forms::paint_event_args &e) -> void override
Raises the xtd::forms::control::paint event.
auto create_params() const noexcept -> xtd::forms::create_params override
Gets the required creation parameters when the control handle is created.
virtual auto border_sides() const noexcept -> xtd::forms::border_sides
Gets the border sides for the control.
Defines a base class for controls that support auto-scrolling behavior.
Definition scrollable_control.hpp:22
#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::nullptr_t null_ptr
Represents the null_opt alias on std::nullptr_t.
Definition null_ptr.hpp:19
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::scrollable_control control.