xtd 0.2.0
panel.h
Go to the documentation of this file.
1 #pragma once
5 #include "border_sides.h"
6 #include "border_style.h"
7 #include "scrollable_control.h"
8 #include <xtd/optional>
9 
11 namespace xtd {
13  namespace forms {
30  class forms_export_ panel : public scrollable_control {
31  struct data;
32 
33  public:
35 
38  panel();
40 
42 
46  virtual forms::auto_size_mode auto_size_mode() const noexcept;
51 
54  virtual forms::border_sides border_sides() const noexcept;
58 
62  virtual forms::border_style border_style() const noexcept;
72  virtual panel& border_style(std::nullptr_t border_style);
74 
76 
78  //using control::create;
84  static panel create(const drawing::point& location = {-1, -1}, const drawing::size& size = {-1, -1}, const xtd::ustring& name = xtd::ustring::empty_string);
91  static panel create(const control& parent, const drawing::point& location = {-1, -1}, const drawing::size& size = {-1, -1}, const xtd::ustring& name = xtd::ustring::empty_string);
93 
94  protected:
96 
98  forms::create_params create_params() const noexcept override;
100 
102 
104  drawing::size measure_control() const noexcept override;
105  void on_layout(const event_args& e) override;
106  void on_paint(paint_event_args& e) override;
108 
109  private:
110  std::shared_ptr<data> data_;
111  };
112  }
113 }
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
Used to group collections of controls.
Definition: panel.h:30
auto_size_mode
Specifies how a control will behave when its auto_size property is enabled.
Definition: auto_size_mode.h:20
Encapsulates the information needed when creating a control.
Definition: create_params.h:27
Contains xtd::forms::scrollable_control control.
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
xtd::forms::style_sheets::control panel
The panel data allows you to specify the box of a panel control.
Definition: panel.h:23
Provides data for the xtd::forms::control::paint event.
Definition: paint_event_args.h:28
Defines a base class for controls that support auto-scrolling behavior.
Definition: scrollable_control.h:20
border_sides
Specifies how a control anchors to the edges of its container.
Definition: border_sides.h:21
border_style
Specifies the border style for a control.
Definition: border_style.h:20
Contains xtd::forms::border_sides enum class.
Defines the base class for controls, which are components with visual representation.
Definition: control.h:78
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.
size_t size
Represents a size of any object in bytes.
Definition: types.h:195