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.
horizontal_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:
24  horizontal_control_layout_style(float width) : width_(width) {}
27  horizontal_control_layout_style(int32_t width) : width_(static_cast<float>(width)) {}
38  horizontal_control_layout_style(int32_t width, xtd::forms::size_type size_type) : control_layout_style(size_type), width_(static_cast<float>(width)) {}
45  horizontal_control_layout_style(float width, bool expanded) : control_layout_style(expanded), width_(width) {}
49  horizontal_control_layout_style(int32_t width, bool expanded) : control_layout_style(expanded), width_(static_cast<float>(width)) {}
60  horizontal_control_layout_style(int32_t width, xtd::forms::content_alignment align) : control_layout_style(align), width_(static_cast<float>(width)) {}
74  horizontal_control_layout_style(int32_t width, xtd::forms::size_type size_type, bool expanded) : control_layout_style(size_type, expanded), width_(static_cast<float>(width)) {}
105  horizontal_control_layout_style(int32_t width, xtd::forms::size_type size_type, bool expanded, xtd::forms::content_alignment align) : control_layout_style(size_type, expanded, align), width_(static_cast<float>(width)) {}
119  horizontal_control_layout_style(int32_t width, bool expanded, xtd::forms::content_alignment align) : control_layout_style(expanded, align), width_(static_cast<float>(width)) {}
120 
123  std::optional<float> width() const {return width_;}
126  void width(float width) {width_ = width;}
127 
130  xtd::ustring to_string() const noexcept override {return ustring::format("horizontal_control_layout_style=[expanded={}, align={}, size_type={}, width={}]", expanded(), align(), size_type(), width_.value_or(-1));}
131 
133  bool operator==(const horizontal_control_layout_style& value) const {return width_ == value.width_ && control_layout_style::operator==(value);}
134  bool operator!=(const horizontal_control_layout_style& value) const {return !operator==(value);}
135  friend std::ostream& operator<<(std::ostream& os, const xtd::forms::horizontal_control_layout_style& control_layout_style) noexcept {
136  return os << control_layout_style.to_string();
137  }
139 
140  private:
141  std::optional<float> width_;
142  };
143  }
144 }
horizontal_control_layout_style(bool expanded)
Initialises a new instance of horizontal control layout style class with specified expanded...
Definition: horizontal_control_layout_style.h:41
Implements the basic functionality that represents the appearance and behavior of a control layout...
Definition: control_layout_style.h:20
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
horizontal_control_layout_style(float width, xtd::forms::content_alignment align)
Initialises a new instance of horizontal control layout style class with specified width and content ...
Definition: horizontal_control_layout_style.h:56
horizontal_control_layout_style(float width, xtd::forms::size_type size_type, xtd::forms::content_alignment align)
Initialises a new instance of horizontal control layout style class with specified width...
Definition: horizontal_control_layout_style.h:83
horizontal_control_layout_style(float width, bool expanded)
Initialises a new instance of horizontal control layout style class with specified width and expanded...
Definition: horizontal_control_layout_style.h:45
horizontal_control_layout_style(bool expanded, xtd::forms::content_alignment align)
Initialises a new instance of horizontal control layout style class with specified expanded and conte...
Definition: horizontal_control_layout_style.h:109
horizontal_control_layout_style()=default
Initialises a new instance of horizontal control layout style class.
std::optional< float > width() const
Gets the width value for a control.
Definition: horizontal_control_layout_style.h:123
horizontal_control_layout_style(int32_t width, bool expanded, xtd::forms::content_alignment align)
Initialises a new instance of horizontal control layout style class with specified expanded and conte...
Definition: horizontal_control_layout_style.h:119
horizontal_control_layout_style(int32_t width, xtd::forms::content_alignment align)
Initialises a new instance of horizontal control layout style class with specified width and content ...
Definition: horizontal_control_layout_style.h:60
horizontal_control_layout_style(xtd::forms::size_type size_type, bool expanded)
Initialises a new instance of horizontal control layout style class with specified size type and expa...
Definition: horizontal_control_layout_style.h:64
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
size_type
Specifies how rows or columns of user interface (UI) elements should be sized relative to their conta...
Definition: size_type.h:18
horizontal_control_layout_style(float width, xtd::forms::size_type size_type, bool expanded)
Initialises a new instance of horizontal control layout style class with specified width...
Definition: horizontal_control_layout_style.h:69
horizontal_control_layout_style(float width, bool expanded, xtd::forms::content_alignment align)
Initialises a new instance of horizontal control layout style class with specified expanded and conte...
Definition: horizontal_control_layout_style.h:114
horizontal_control_layout_style(float width)
Initialises a new instance of horizontal control layout style class with specified width...
Definition: horizontal_control_layout_style.h:24
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
horizontal_control_layout_style(int32_t width, bool expanded)
Initialises a new instance of horizontal control layout style class with specified width and expanded...
Definition: horizontal_control_layout_style.h:49
horizontal_control_layout_style(int32_t width)
Initialises a new instance of horizontal control layout style class with specified width...
Definition: horizontal_control_layout_style.h:27
horizontal_control_layout_style(xtd::forms::size_type size_type, xtd::forms::content_alignment align)
Initialises a new instance of horizontal control layout style class with specified size type and cont...
Definition: horizontal_control_layout_style.h:78
horizontal_control_layout_style(xtd::forms::content_alignment align)
Initialises a new instance of horizontal control layout style class with specified content alignment...
Definition: horizontal_control_layout_style.h:52
bool expanded() const
Gets a flag indicating if control is expanded to its containing layout container. ...
Definition: control_layout_style.h:65
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
content_alignment
Specifies alignment of content on the drawing surface.
Definition: content_alignment.h:17
horizontal_control_layout_style(xtd::forms::size_type size_type, bool expanded, xtd::forms::content_alignment align)
Initialises a new instance of horizontal control layout style class with specified size type...
Definition: horizontal_control_layout_style.h:93
horizontal_control_layout_style(int32_t width, xtd::forms::size_type size_type)
Initialises a new instance of horizontal control layout style class with specified width and size typ...
Definition: horizontal_control_layout_style.h:38
xtd::ustring to_string() const noexcept override
Returns a string that represent xtd::forms::control_layout_style.
Definition: horizontal_control_layout_style.h:130
void width(float width)
Sets the width value for a control.
Definition: horizontal_control_layout_style.h:126
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:700
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
horizontal_control_layout_style(int32_t width, xtd::forms::size_type size_type, bool expanded, xtd::forms::content_alignment align)
Initialises a new instance of horizontal control layout style class with specified width...
Definition: horizontal_control_layout_style.h:105
horizontal_control_layout_style(float width, xtd::forms::size_type size_type, bool expanded, xtd::forms::content_alignment align)
Initialises a new instance of horizontal control layout style class with specified width...
Definition: horizontal_control_layout_style.h:99
Contains xtd::forms::control_layout_style class.
horizontal_control_layout_style(float width, xtd::forms::size_type size_type)
Initialises a new instance of horizontal control layout style class with specified width and size typ...
Definition: horizontal_control_layout_style.h:34
Implements the basic functionality that represents the appearance and behavior of a control layout...
Definition: horizontal_control_layout_style.h:18
horizontal_control_layout_style(int32_t width, xtd::forms::size_type size_type, xtd::forms::content_alignment align)
Initialises a new instance of horizontal control layout style class with specified width...
Definition: horizontal_control_layout_style.h:88
horizontal_control_layout_style(xtd::forms::size_type size_type)
Initialises a new instance of horizontal control layout style class with specified size type...
Definition: horizontal_control_layout_style.h:30
horizontal_control_layout_style(int32_t width, xtd::forms::size_type size_type, bool expanded)
Initialises a new instance of horizontal control layout style class with specified width...
Definition: horizontal_control_layout_style.h:74