xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
panel.h
Go to the documentation of this file.
1 #pragma once
5 #include <optional>
6 #include "scrollable_control.h"
7 #include "border_sides.h"
8 #include "border_style.h"
9 
11 namespace xtd {
13  namespace forms {
23  class forms_export_ panel : public scrollable_control {
24  public:
26 
29  panel();
31 
33 
37  virtual forms::auto_size_mode auto_size_mode() const {return get_auto_size_mode();}
42 
45  virtual forms::border_sides border_sides() const {return border_sides_;}
49 
53  virtual forms::border_style border_style() const {return border_style_.value_or(forms::border_style::none);}
63  virtual panel& border_style(std::nullptr_t border_style);
65 
66  protected:
68 
70  forms::create_params create_params() const override;
71  drawing::size measure_control() const override;
72  void on_layout(const event_args& e) override;
73  void on_paint(paint_event_args& e) override;
75 
78  std::optional<forms::border_style> border_style_;
80  };
81  }
82 }
virtual forms::border_sides border_sides() const
Gets the border sides for the control.
Definition: panel.h:45
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:30
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:23
auto_size_mode
Specifies how a control will behave when its auto_size property is enabled.
Definition: auto_size_mode.h:18
Contains xtd::forms::scrollable_control control.
xtd::forms::style_sheets::control panel
The panel data allows you to specify the box of a panel control.
Definition: panel.h:21
Provides data for the paint event.
Definition: paint_event_args.h:27
Defines a base class for controls that support auto-scrolling behavior.
Definition: scrollable_control.h:18
virtual forms::auto_size_mode auto_size_mode() const
Gets the mode by which the panel automatically resizes itself.
Definition: panel.h:37
border_sides
Specifies how a control anchors to the edges of its container.
Definition: border_sides.h:19
border_style
Specifies the border style for a control.
Definition: border_style.h:18
Contains xtd::forms::border_sides enum class.
All flags except none.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
Contains xtd::forms::border_style enum class.
virtual forms::border_style border_style() const
Gets the border style for the control.
Definition: panel.h:53