8#include "../forms_export.h" 
   28      padding(
int all) : all_(true), left_(all), top_(all), right_(all), bottom_(all) {}
 
   36      padding(
int left, 
int top, 
int right, 
int bottom) : all_(left == 
top && left == right && left == 
bottom), left_(left), top_(
top), right_(right), bottom_(
bottom) {}
 
   41      bool operator==(
const padding& value) {
return all_ == value.all_ && left_ == value.left_ && top_ == value.top_ && right_ == value.right_ && bottom_ == value.bottom_;}
 
   42      bool operator!=(
const padding& value) {
return !operator==(value);}
 
   48      int all()
 const {
return all_ ? top_ : -1;}
 
   53        if (!all_ || left_ != all) {
 
   55          left_ = top_ = right_ = bottom_ = all;
 
   67        if (all_ || bottom_ != 
bottom) {
 
   80      int left()
 const {
return left_;}
 
   85        if (all_ || left_ != left) {
 
   94      int right()
 const {
return right_;}
 
   99        if (all_ || right_ != right) {
 
  108      int top()
 const {
return top_;}
 
  113        if (all_ || top_ != 
top) {
 
  128        if (p1.all_ && p2.all_) 
return {p1.left_ + p2.left_};
 
  129        return {p1.left_ + p2.left_, p1.top_ + p2.top_, p1.right_ + p2.right_, p1.bottom_ + p2.bottom_};
 
  137        if (p1.all_ && p2.all_) 
return {p1.left_ - p2.left_};
 
  138        return {p1.left_ - p2.left_, p1.top_ - p2.top_, p1.right_ - p2.right_, p1.bottom_ - p2.bottom_};
 
  147      bool operator==(
const padding& p)
 const {
return all_ == 
p.all_ && left_ == 
p.left_ && top_ == 
p.top_ && right_ == 
p.right_ && bottom_ == 
p.bottom_;}
 
  148      friend std::ostream& operator<<(std::ostream& os, 
const xtd::forms::padding& padding) 
noexcept {
return os << padding.to_string();}
 
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
 
#define forms_export_
Define shared library export.
Definition: forms_export.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::ustring class.