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.
vertical_control_layout_style.h
Go to the documentation of this file.
1 #pragma once
5 #include <optional>
6 #include "control_layout_style.h"
7 
9 namespace xtd {
11  namespace forms {
19  public:
27  vertical_control_layout_style(int32_t height) : height_(static_cast<float>(height)) {}
49  vertical_control_layout_style(int32_t height, bool expanded) : control_layout_style(expanded), height_(static_cast<float>(height)) {}
120 
123  std::optional<float> height() const {return height_;}
126  void height(float height) {height_ = height;}
127 
130  xtd::ustring to_string() const noexcept override {return ustring::format("vertical_control_layout_style=[expanded={}, align={}, size_type={}, height={}]", expanded(), align(), size_type(), height_.value_or(-1));}
131 
133  bool operator==(const vertical_control_layout_style& value) const {return height_ == value.height_ && control_layout_style::operator==(value);}
134  bool operator!=(const vertical_control_layout_style& value) const {return !operator==(value);}
135  friend std::ostream& operator<<(std::ostream& os, const xtd::forms::vertical_control_layout_style& control_layout_style) noexcept {
136  return os << control_layout_style.to_string();
137  }
139 
140  private:
141  std::optional<float> height_;
142  };
143  }
144 }
Implements the basic functionality that represents the appearance and behavior of a control layout.
Definition: control_layout_style.h:20
control_layout_style()=default
Initialises a new instance of control layout style class.
xtd::forms::content_alignment align() const
Gets a flag indicating how a control should be align to its containing layout container.
Definition: control_layout_style.h:76
xtd::forms::size_type size_type() const
Gets a flag indicating how a control should be sized relative to its containing layout container.
Definition: control_layout_style.h:55
bool expanded() const
Gets a flag indicating if control is expanded to its containing layout container.
Definition: control_layout_style.h:65
Implements the basic functionality that represents the appearance and behavior of a control layout.
Definition: vertical_control_layout_style.h:18
vertical_control_layout_style(xtd::forms::size_type size_type)
Initialises a new instance of vertical control layout style class with specified size type.
Definition: vertical_control_layout_style.h:30
std::optional< float > height() const
Gets the height value for a control.
Definition: vertical_control_layout_style.h:123
vertical_control_layout_style(int32_t height, bool expanded)
Initialises a new instance of vertical control layout style class with specified height and expanded.
Definition: vertical_control_layout_style.h:49
vertical_control_layout_style(float height, xtd::forms::size_type size_type, bool expanded)
Initialises a new instance of vertical control layout style class with specified height,...
Definition: vertical_control_layout_style.h:69
vertical_control_layout_style(float height, bool expanded, xtd::forms::content_alignment align)
Initialises a new instance of vertical control layout style class with specified height,...
Definition: vertical_control_layout_style.h:114
vertical_control_layout_style(float height, bool expanded)
Initialises a new instance of vertical control layout style class with specified height and expanded.
Definition: vertical_control_layout_style.h:45
vertical_control_layout_style(xtd::forms::size_type size_type, xtd::forms::content_alignment align)
Initialises a new instance of vertical control layout style class with specified size type and conten...
Definition: vertical_control_layout_style.h:78
vertical_control_layout_style(int32_t height)
Initialises a new instance of vertical control layout style class with specified height.
Definition: vertical_control_layout_style.h:27
vertical_control_layout_style(float height, xtd::forms::size_type size_type)
Initialises a new instance of vertical control layout style class with specified height and size type...
Definition: vertical_control_layout_style.h:34
void height(float height)
Sets the height value for a control.
Definition: vertical_control_layout_style.h:126
vertical_control_layout_style(float height)
Initialises a new instance of vertical control layout style class with specified height.
Definition: vertical_control_layout_style.h:24
vertical_control_layout_style(int32_t height, xtd::forms::size_type size_type)
Initialises a new instance of vertical control layout style class with specified height and size type...
Definition: vertical_control_layout_style.h:38
vertical_control_layout_style(int32_t height, xtd::forms::size_type size_type, xtd::forms::content_alignment align)
Initialises a new instance of vertical control layout style class with specified height,...
Definition: vertical_control_layout_style.h:88
vertical_control_layout_style(bool expanded)
Initialises a new instance of vertical control layout style class with specified expanded.
Definition: vertical_control_layout_style.h:41
vertical_control_layout_style(float height, xtd::forms::content_alignment align)
Initialises a new instance of vertical control layout style class with specified height and content a...
Definition: vertical_control_layout_style.h:56
vertical_control_layout_style(float height, xtd::forms::size_type size_type, xtd::forms::content_alignment align)
Initialises a new instance of vertical control layout style class with specified height,...
Definition: vertical_control_layout_style.h:83
vertical_control_layout_style(xtd::forms::content_alignment align)
Initialises a new instance of vertical control layout style class with specified content alignment.
Definition: vertical_control_layout_style.h:52
xtd::ustring to_string() const noexcept override
Returns a string that represent xtd::forms::control_layout_style.
Definition: vertical_control_layout_style.h:130
vertical_control_layout_style(int32_t height, xtd::forms::content_alignment align)
Initialises a new instance of vertical control layout style class with specified height and content a...
Definition: vertical_control_layout_style.h:60
vertical_control_layout_style(float height, xtd::forms::size_type size_type, bool expanded, xtd::forms::content_alignment align)
Initialises a new instance of vertical control layout style class with specified height,...
Definition: vertical_control_layout_style.h:99
vertical_control_layout_style(xtd::forms::size_type size_type, bool expanded, xtd::forms::content_alignment align)
Initialises a new instance of vertical control layout style class with specified size type,...
Definition: vertical_control_layout_style.h:93
vertical_control_layout_style(int32_t height, xtd::forms::size_type size_type, bool expanded, xtd::forms::content_alignment align)
Initialises a new instance of vertical control layout style class with specified height,...
Definition: vertical_control_layout_style.h:105
vertical_control_layout_style(xtd::forms::size_type size_type, bool expanded)
Initialises a new instance of vertical control layout style class with specified size type and expand...
Definition: vertical_control_layout_style.h:64
vertical_control_layout_style(int32_t height, xtd::forms::size_type size_type, bool expanded)
Initialises a new instance of vertical control layout style class with specified height,...
Definition: vertical_control_layout_style.h:74
vertical_control_layout_style(bool expanded, xtd::forms::content_alignment align)
Initialises a new instance of vertical control layout style class with specified expanded and content...
Definition: vertical_control_layout_style.h:109
vertical_control_layout_style(int32_t height, bool expanded, xtd::forms::content_alignment align)
Initialises a new instance of vertical control layout style class with specified height,...
Definition: vertical_control_layout_style.h:119
vertical_control_layout_style()=default
Initialises a new instance of vertical control layout style class.
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
Contains xtd::forms::control_layout_style class.
static ustring format(const ustring &fmt, args_t &&... args)
Writes the text representation of the specified arguments list, to string using the specified format ...
Definition: ustring.h:689
size_type
Specifies how rows or columns of user interface (UI) elements should be sized relative to their conta...
Definition: size_type.h:18
content_alignment
Specifies alignment of content on the drawing surface.
Definition: content_alignment.h:17
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