xtd 0.2.0
Loading...
Searching...
No Matches
user_control.h
Go to the documentation of this file.
1
4#pragma once
5#include "border_sides.h"
6#include "border_style.h"
7#include "container_control.h"
8#include <xtd/optional>
9
11namespace xtd {
13 namespace forms {
28 struct data;
29
30 public:
32
37
39
43 virtual forms::auto_size_mode auto_size_mode() const noexcept;
48
51 virtual forms::border_sides border_sides() const noexcept;
55
59 virtual xtd::forms::border_style border_style() const noexcept;
69 virtual user_control& border_style(std::nullptr_t border_style);
71
73
77 static user_control create();
81 static user_control create(const drawing::point& location);
86 static user_control create(const drawing::point& location, const drawing::size& size);
92 static user_control create(const drawing::point& location, const drawing::size& size, const xtd::string& name);
96 static user_control create(const control& parent);
101 static user_control create(const control& parent, const drawing::point& location);
107 static user_control create(const control& parent, const drawing::point& location, const drawing::size& size);
114 static user_control create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::string& name);
116
117 protected:
119
121 forms::create_params create_params() const noexcept override;
123
125
131 xtd::uptr<xtd::object> clone() const override;
132
133 void on_layout(const event_args& e) override;
134 void on_paint(paint_event_args& e) override;
136
137 private:
138 xtd::sptr<data> data_;
139 };
140 }
141}
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
Provides focus-management functionality for controls that can function as a container for other contr...
Definition container_control.h:25
Defines the base class for controls, which are components with visual representation.
Definition control.h:81
Encapsulates the information needed when creating a control.
Definition create_params.h:29
Provides data for the xtd::forms::control::paint event.
Definition paint_event_args.h:30
Represents a standard Windows user control.
Definition user_control.h:27
user_control()
Initialises a new instance of user_control class.
virtual forms::auto_size_mode auto_size_mode() const noexcept
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.h:13
std::unique_ptr< type_t > uptr
The xtd::uptr object is a unique pointer.
Definition uptr.h:25
size_t size
Represents a size of any object in bytes.
Definition size.h:23
std::shared_ptr< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.h:25
border_sides
Specifies how a control anchors to the edges of its container.
Definition border_sides.h:23
border_style
Specifies the border style for a control.
Definition border_style.h:22
auto_size_mode
Specifies how a control will behave when its auto_size property is enabled.
Definition auto_size_mode.h:22
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.