Represents a display device or multiple display devices on a single system.
- Header
#include <xtd/forms/padding>
- Namespace
- xtd::forms
- Library
- xtd.forms
- Examples
- change_parent.cpp, emoticons.cpp, form_show.cpp, horizontal_layout_panel.cpp, list_box.cpp, system_sound.cpp, and vertical_layout_panel.cpp.
|
static const padding | empty |
| Provides a Padding object with no padding.
|
|
|
int32 | all () const noexcept |
| Gets the padding value for all the edges.
|
|
void | all (int32 all) |
| Sets the padding value for all the edges.
|
|
int32 | bottom () const noexcept |
| Gets the padding value for the bottom edge.
|
|
void | bottom (int32 bottom) |
| Sets the padding value for the bottom edge.
|
|
int32 | horizontal () const noexcept |
| Gets the combined padding for the right and left edges.
|
|
int32 | left () const noexcept |
| Gets the padding value for the left edge.
|
|
void | left (int32 left) |
| Sets the padding value for the left edge.
|
|
int32 | right () const noexcept |
| Gets the padding value for the right edge.
|
|
void | right (int32 right) |
| Sets the padding value for the right edge.
|
|
int32 | top () const noexcept |
| Gets the padding value for the top edge.
|
|
void | top (int32 top) |
| Sets the padding value for the top edge.
|
|
int32 | vertical () const noexcept |
| Gets the combined padding for the bottom and top edges.
|
|
|
bool | equals (const padding &value) const noexcept override |
|
xtd::string | to_string () const noexcept override |
| Returns a string that represents the current padding.
|
|
virtual bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object.
|
|
template<typename object_a_t , typename object_b_t > |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are considered equal.
|
|
|
| object ()=default |
| Create a new instance of the ultimate base class object.
|
|
virtual size_t | get_hash_code () const noexcept |
| Serves as a hash function for a particular type.
|
|
virtual type_object | get_type () const noexcept |
| Gets the type of the current instance.
|
|
template<typename object_t > |
xtd::uptr< object_t > | memberwise_clone () const |
| Creates a shallow copy of the current object.
|
|
virtual bool | equals (const padding &) const noexcept=0 |
| Indicates whether the current object is equal to another object of the same type.
|
|
template<typename object_a_t , typename object_b_t > |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are considered equal.
|
|
template<typename object_a_t , typename object_b_t > |
static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are the same instance.
|
|
◆ padding() [1/3]
xtd::forms::padding::padding |
( |
| ) |
|
|
default |
Initializes a new instance of the padding class.
◆ padding() [2/3]
xtd::forms::padding::padding |
( |
int32 |
all | ) |
|
Initializes a new instance of the padding class using the supplied padding size for all edges.
- Parameters
-
all | The number of pixels to be used for padding for all edges. |
◆ padding() [3/3]
Initializes a new instance of the padding class using a separate padding size for each edge.
- Parameters
-
left | The padding size, in pixels, for the left edge. |
top | The padding size, in pixels, for the top edge. |
right | The padding size, in pixels, for the right edge. |
bottom | The padding size, in pixels, for the bottom edge. |
◆ all() [1/2]
int32 xtd::forms::padding::all |
( |
| ) |
const |
|
noexcept |
Gets the padding value for all the edges.
- Returns
- The padding, in pixels, for all edges if the same; otherwise, -1.
◆ all() [2/2]
void xtd::forms::padding::all |
( |
int32 |
all | ) |
|
Sets the padding value for all the edges.
- Parameters
-
all | The padding, in pixels, for all edges if the same; otherwise, -1. |
◆ bottom() [1/2]
int32 xtd::forms::padding::bottom |
( |
| ) |
const |
|
noexcept |
Gets the padding value for the bottom edge.
- Returns
- The padding, in pixels, for the bottom edge.
◆ bottom() [2/2]
void xtd::forms::padding::bottom |
( |
int32 |
bottom | ) |
|
Sets the padding value for the bottom edge.
- Parameters
-
bottom | The padding, in pixels, for the bottom edge. |
◆ horizontal()
int32 xtd::forms::padding::horizontal |
( |
| ) |
const |
|
noexcept |
Gets the combined padding for the right and left edges.
- Returns
- Gets the sum, in pixels, of the left and right padding values.
◆ left() [1/2]
int32 xtd::forms::padding::left |
( |
| ) |
const |
|
noexcept |
Gets the padding value for the left edge.
- Returns
- The padding, in pixels, for the left edge.
◆ left() [2/2]
void xtd::forms::padding::left |
( |
int32 |
left | ) |
|
Sets the padding value for the left edge.
- Parameters
-
left | The padding, in pixels, for the left edge. |
◆ right() [1/2]
int32 xtd::forms::padding::right |
( |
| ) |
const |
|
noexcept |
Gets the padding value for the right edge.
- Returns
- The padding, in pixels, for the right edge.
◆ right() [2/2]
void xtd::forms::padding::right |
( |
int32 |
right | ) |
|
Sets the padding value for the right edge.
- Parameters
-
right | The padding, in pixels, for the right edge. |
◆ top() [1/2]
int32 xtd::forms::padding::top |
( |
| ) |
const |
|
noexcept |
Gets the padding value for the top edge.
- Returns
- The padding, in pixels, for the top edge.
◆ top() [2/2]
void xtd::forms::padding::top |
( |
int32 |
top | ) |
|
Sets the padding value for the top edge.
- Parameters
-
top | The padding, in pixels, for the top edge. |
◆ vertical()
int32 xtd::forms::padding::vertical |
( |
| ) |
const |
|
noexcept |
Gets the combined padding for the bottom and top edges.
- Parameters
-
p1 | A padding. |
p2 | A padding. |
- Returns
- Gets the sum, in pixels, of the top and bottom padding values.
◆ to_string()
Returns a string that represents the current padding.
- Returns
- A string that represents the current padding.
Reimplemented from xtd::object.
◆ add()
Computes the sum of the two specified padding values.
- Returns
- A padding that contains the sum of the two specified padding values.
◆ subtract()
Subtracts one specified Padding value from another.
- Parameters
-
p1 | A padding. |
p2 | A padding. |
- Returns
- A padding that contains the result of the subtraction of one specified padding value from another.
◆ equals() [1/2]
virtual bool xtd::object::equals |
( |
const object & |
obj | ) |
const |
|
virtualnoexcept |
Determines whether the specified object is equal to the current object.
- Parameters
-
obj | The object to compare with the current object. |
- Returns
- true if the specified object is equal to the current object. otherwise, false.
- Examples
- The following code example compares the current instance with another object.
#include <xtd/console>
auto main() -> int {
auto object1 = new_ptr<object>();
auto object2 = new_ptr<object>();
auto object3 = object2;
object3 = object1;
}
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Reimplemented from xtd::object.
◆ equals() [2/2]
template<typename object_a_t , typename object_b_t >
static bool xtd::object::equals |
( |
const object_a_t & |
object_a, |
|
|
const object_b_t & |
object_b |
|
) |
| |
|
inlinestaticnoexcept |
Determines whether the specified object instances are considered equal.
- Parameters
-
object_a | The first object to compare. |
object_b | The second object to compare. |
- Returns
- true if object_a is the same instance as object_b or if both are null references or if object_a(object_b) returns true. otherwise, false.
- Examples
- The following code example compares different objects.
#include <xtd/console>
auto main() -> int {
string s1 = "Tom";
string s2 = "Carol";
s1 = "Tom";
s2 = "Tom";
s1 = "";
s2 = "Tom";
s1 = "Carol";
s2 = "";
s1 = "";
s2 = "";
}
virtual bool equals(const object &obj) const noexcept
Determines whether the specified object is equal to the current object.
◆ empty
const padding xtd::forms::padding::empty |
|
static |
Provides a Padding object with no padding.
The documentation for this class was generated from the following file: