xtd - Reference Guide  0.1.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
control_layout_style.h
Go to the documentation of this file.
1
4#pragma once
5#include <xtd/object.h>
6#include <xtd/ustring.h>
7#include "content_alignment.h"
8#include "size_type.h"
9
11namespace xtd {
13 namespace forms {
21 protected:
51
52 public:
55 xtd::forms::size_type size_type() const {return size_type_;}
59 size_type_ = size_type;
60 return *this;
61 }
62
65 bool expanded() const {return expanded_;}
69 expanded_ = expanded;
70 return *this;
71 }
72
76 xtd::forms::content_alignment align() const {return align_;}
81 align_ = align;
82 return *this;
83 }
84
87 xtd::ustring to_string() const noexcept override {return ustring::format("control_layout_style=[expanded={}, align={}, size_type={}]", expanded_, align_, size_type_);}
88
90 bool operator==(const control_layout_style& value) const {return size_type_ == value.size_type_ && expanded_ == value.expanded_;}
91 bool operator!=(const control_layout_style& value) const {return !operator==(value);}
92 friend std::ostream& operator<<(std::ostream& os, const xtd::forms::control_layout_style& control_layout_style) noexcept {
93 return os << control_layout_style.to_string();
94 }
96
97 private:
99 bool expanded_ = false;
101 };
102 }
103}
Implements the basic functionality that represents the appearance and behavior of a control layout.
Definition: control_layout_style.h:20
control_layout_style & expanded(bool expanded)
Sets a flag indicating if control is expanded to its containing layout container.
Definition: control_layout_style.h:68
control_layout_style(xtd::forms::content_alignment align)
Initialises a new instance of control layout style class with specified content alignment.
Definition: control_layout_style.h:33
control_layout_style()=default
Initialises a new instance of control layout style class.
control_layout_style & align(xtd::forms::content_alignment align)
Sets a flag indicating how a control should be align to its containing layout container.
Definition: control_layout_style.h:80
control_layout_style(xtd::forms::size_type size_type, xtd::forms::content_alignment align)
Initialises a new instance of control layout style class with specified size type and content alignme...
Definition: control_layout_style.h:41
control_layout_style(xtd::forms::size_type size_type, bool expanded)
Initialises a new instance of control layout style class with specified size type and expanded.
Definition: control_layout_style.h:37
control_layout_style(xtd::forms::size_type size_type, bool expanded, xtd::forms::content_alignment align)
Initialises a new instance of control layout style class with specified size type,...
Definition: control_layout_style.h:46
control_layout_style(bool expanded, xtd::forms::content_alignment align)
Initialises a new instance of control layout style class with specified expanded and content alignmen...
Definition: control_layout_style.h:50
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::ustring to_string() const noexcept override
Returns a string that represent xtd::forms::control_layout_style.
Definition: control_layout_style.h:87
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
control_layout_style(bool expanded)
Initialises a new instance of control layout style class with specified expanded.
Definition: control_layout_style.h:29
control_layout_style(xtd::forms::size_type size_type)
Initialises a new instance of control layout style class with specified size type.
Definition: control_layout_style.h:26
control_layout_style & size_type(xtd::forms::size_type size_type)
Sets a flag indicating how a control should be sized relative to its containing layout container.
Definition: control_layout_style.h:58
bool expanded() const
Gets a flag indicating if control is expanded to its containing layout container.
Definition: control_layout_style.h:65
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition: object.h:26
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:48
Contains xtd::forms::content_alignment enum 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
@ absolute
The control should be sized to an exact number of pixels.
@ top_left
Content is vertically aligned at the top, and horizontally aligned on the left.
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
Contains xtd::object class.
Contains xtd::forms::size_type enum class.
Contains xtd::ustring class.