xtd 0.2.0
group_box.h
Go to the documentation of this file.
1 #pragma once
5 #include "border_style.h"
6 #include "control.h"
7 #include "flat_style.h"
8 
10 namespace xtd {
12  namespace forms {
35  class forms_export_ group_box : public control {
36  struct data;
37 
38  public:
40 
43  group_box();
45 
47 
51  virtual forms::auto_size_mode auto_size_mode() const noexcept;
56 
59 
62  virtual xtd::forms::flat_style flat_style() const noexcept;
67 
69 
71  using control::create;
78  static group_box create(const xtd::ustring& text, const drawing::point& location = {-1, -1}, const drawing::size& size = {-1, -1}, const xtd::ustring& name = xtd::ustring::empty_string);
86  static group_box create(const control& parent, const xtd::ustring& text, const drawing::point& location = {-1, -1}, const drawing::size& size = {-1, -1}, const xtd::ustring& name = xtd::ustring::empty_string);
88 
89  protected:
91 
93  forms::create_params create_params() const noexcept override;
95 
97 
99  drawing::size measure_control() const noexcept override;
100  void on_font_changed(const xtd::event_args& e) override;
101  void on_resize(const xtd::event_args& e) override;
102  void on_text_changed(const xtd::event_args& e) override;
104 
105  private:
106  std::shared_ptr<data> data_;
107  };
108  }
109 }
flat_style
Specifies the appearance of a control.
Definition: flat_style.h:22
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition: point.h:54
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:31
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
auto_size_mode
Specifies how a control will behave when its auto_size property is enabled.
Definition: auto_size_mode.h:20
control_appearance
Specifies the appearance of a control.
Definition: control_appearance.h:19
Encapsulates the information needed when creating a control.
Definition: create_params.h:27
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
static control create(const drawing::point &location={-1, -1}, const drawing::size &size={-1, -1}, const xtd::ustring &name=xtd::ustring::empty_string)
A factory to create a specified control with specified location, size, and name.
Represents a Windows control that displays a frame around a group of controls with an optional captio...
Definition: group_box.h:35
virtual forms::control_appearance control_appearance() const noexcept
Gets control appearance.
Defines the base class for controls, which are components with visual representation.
Definition: control.h:78
Contains xtd::forms::flat_style enum class.
Contains xtd::forms::control control.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
static const ustring empty_string
Represents the empty string.
Definition: ustring.h:53
Specifies that both the x and y coordinates of the control are defined.
Contains xtd::forms::border_style enum class.
The xtd::forms::status_bar_panel displays text in the standard font.
size_t size
Represents a size of any object in bytes.
Definition: types.h:195