xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
user_control.h
Go to the documentation of this file.
1 #pragma once
5 #include "container_control.h"
6 #include "border_style.h"
7 
9 namespace xtd {
11  namespace forms {
22  public:
25 
28  virtual forms::auto_size_mode auto_size_mode() const {return auto_size_mode_;}
33 
37  virtual forms::border_style border_style() const {return border_style_;}
43 
44  drawing::size default_size() const override {return {150, 150};}
45 
46  protected:
47  forms::create_params create_params() const override;
48 
49  void on_handle_created(const event_args& e) override;
50 
51  void on_layout(const event_args& e) override;
52 
56  };
57  }
58 }
Contains xtd::forms::border_style enum class.
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:25
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:21
Represents a standard Windows user control.
Definition: user_control.h:21
void on_layout(const event_args &e) override
Raises the control::layout event.
virtual user_control & border_style(forms::border_style border_style)
Sets the border style for the control.
drawing::size default_size() const override
Gets the default size of the control.
Definition: user_control.h:44
user_control()
Initialises a new instance of user_control class.
forms::create_params create_params() const override
Gets the required creation parameters when the control handle is created.
virtual forms::border_style border_style() const
Gets the border style for the control.
Definition: user_control.h:37
void on_handle_created(const event_args &e) override
Raises the control::handle_created event.
virtual user_control & auto_size_mode(forms::auto_size_mode value)
Sets the mode by which the panel automatically resizes itself.
virtual forms::auto_size_mode auto_size_mode() const
Gets the mode by which the user_control automatically resizes itself.
Definition: user_control.h:28
Contains xtd::forms::container_control class.
#define forms_export_
Define shared library export.
Definition: forms_export.h:13
border_style
Specifies the border style for a control.
Definition: border_style.h:18
auto_size_mode
Specifies how a control will behave when its auto_size property is enabled.
Definition: auto_size_mode.h:18
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17