xtd 1.0.0
Loading...
Searching...
No Matches
user_control.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 {
28 struct data;
29
30 public:
32
37
39
43 [[nodiscard]] virtual auto auto_size_mode() const noexcept -> xtd::forms::auto_size_mode;
48
51 [[nodiscard]] virtual auto border_sides() const noexcept -> xtd::forms::border_sides;
54 virtual auto border_sides(xtd::forms::border_sides value) -> user_control&;
55
59 [[nodiscard]] virtual auto border_style() const noexcept -> xtd::forms::border_style;
64 virtual auto border_style(xtd::forms::border_style value) -> user_control&;
71
73
77 [[nodiscard]] static auto create() -> user_control;
81 [[nodiscard]] static auto create(const xtd::drawing::point& location) -> user_control;
86 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size) -> user_control;
92 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> user_control;
96 [[nodiscard]] static auto create(const xtd::forms::control& parent) -> user_control;
101 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location) -> user_control;
107 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size) -> user_control;
114 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> user_control;
116
117 protected:
119
121 [[nodiscard]] auto create_params() const noexcept -> xtd::forms::create_params override;
123
125
127 auto on_layout(const xtd::event_args& e) -> void override;
128 auto on_paint(xtd::forms::paint_event_args& e) -> void override;
130
131 private:
132 xtd::sptr<data> data_;
133 };
134 }
135}
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
Provides focus-management functionality for controls that can function as a container for other contr...
Definition container_control.hpp:25
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 on_layout(const xtd::event_args &e) -> void override
Raises the xtd::forms::control::layout event.
user_control()
Initialises a new instance of user_control class.
virtual auto border_sides() const noexcept -> xtd::forms::border_sides
Gets the border sides for the control.
auto on_paint(xtd::forms::paint_event_args &e) -> void override
Raises the xtd::forms::control::paint event.
virtual auto border_style() const noexcept -> xtd::forms::border_style
Gets the border style for the control.
auto create_params() const noexcept -> xtd::forms::create_params override
Gets the required creation parameters when the control handle is created.
static auto create() -> user_control
A factory to create an xtd::forms::user_control.
virtual auto auto_size_mode() const noexcept -> xtd::forms::auto_size_mode
Gets the mode by which the user_control automatically resizes itself.
Contains xtd::forms::container_control class.
#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