37 FXSize(FXshort ww,FXshort hh):w(ww),h(hh){ }
43 const FXshort&
operator[](FXint i)
const {
return (&w)[i];}
46 FXbool
empty()
const {
return w<=0 || h<=0; }
49 FXSize& grow(FXshort margin);
50 FXSize& grow(FXshort hormargin,FXshort vermargin);
51 FXSize& grow(FXshort leftmargin,FXshort rightmargin,FXshort topmargin,FXshort bottommargin);
54 FXSize& shrink(FXshort margin);
55 FXSize& shrink(FXshort hormargin,FXshort vermargin);
56 FXSize& shrink(FXshort leftmargin,FXshort rightmargin,FXshort topmargin,FXshort bottommargin);
65 FXSize&
set(FXshort ww,FXshort hh){ w=ww; h=hh;
return *
this; }
69 FXSize& operator/=(FXshort c){ w/=c; h/=c;
return *
this; }
70 FXSize& operator+=(
const FXSize& s){ w+=s.w; h+=s.h;
return *
this; }
71 FXSize& operator-=(
const FXSize& s){ w-=s.w; h-=s.h;
return *
this; }
83 inline FXSize operator*(
const FXSize& s,FXshort c){
return FXSize(s.w*c,s.h*c); }
84 inline FXSize operator*(FXshort c,
const FXSize& s){
return FXSize(c*s.w,c*s.h); }
85 inline FXSize operator/(
const FXSize& s,FXshort c){
return FXSize(s.w/c,s.h/c); }
86 inline FXSize operator/(FXshort c,
const FXSize& s){
return FXSize(c/s.w,c/s.h); }
89 inline FXSize operator+(
const FXSize& a,
const FXSize& b){
return FXSize(a.w+b.w,a.h+b.h); }
90 inline FXSize operator-(
const FXSize& a,
const FXSize& b){
return FXSize(a.w-b.w,a.h-b.h); }
93 inline FXbool operator==(
const FXSize& a,FXshort n){
return a.w==n && a.h==n; }
94 inline FXbool operator!=(
const FXSize& a,FXshort n){
return a.w!=n || a.h!=n; }
95 inline FXbool operator==(FXshort n,
const FXSize& a){
return n==a.w && n==a.h; }
96 inline FXbool operator!=(FXshort n,
const FXSize& a){
return n!=a.w || n!=a.h; }
99 inline FXbool operator==(
const FXSize& a,
const FXSize& b){
return a.w==b.w && a.h==b.h; }
100 inline FXbool operator!=(
const FXSize& a,
const FXSize& b){
return a.w!=b.w || a.h!=b.h; }
103 inline FXbool operator<(
const FXSize& a,FXshort n){
return a.w<n && a.h<n; }
104 inline FXbool operator<=(
const FXSize& a,FXshort n){
return a.w<=n && a.h<=n; }
105 inline FXbool operator>(
const FXSize& a,FXshort n){
return a.w>n && a.h>n; }
106 inline FXbool operator>=(
const FXSize& a,FXshort n){
return a.w>=n && a.h>=n; }
109 inline FXbool operator<(FXshort n,
const FXSize& a){
return n<a.w && n<a.h; }
110 inline FXbool operator<=(FXshort n,
const FXSize& a){
return n<=a.w && n<=a.h; }
111 inline FXbool operator>(FXshort n,
const FXSize& a){
return n>a.w && n>a.h; }
112 inline FXbool operator>=(FXshort n,
const FXSize& a){
return n>=a.w && n>=a.h; }
115 inline FXbool operator<(
const FXSize& a,
const FXSize& b){
return a.w<b.w && a.h<b.h; }
116 inline FXbool operator<=(
const FXSize& a,
const FXSize& b){
return a.w<=b.w && a.h<=b.h; }
117 inline FXbool operator>(
const FXSize& a,
const FXSize& b){
return a.w>b.w && a.h>b.h; }
118 inline FXbool operator>=(
const FXSize& a,
const FXSize& b){
return a.w>=b.w && a.h>=b.h; }
121 inline FXSize lo(
const FXSize& a,
const FXSize& b){
return FXSize(Math::imin(a.w,b.w),Math::imin(a.h,b.h)); }
122 inline FXSize hi(
const FXSize& a,
const FXSize& b){
return FXSize(Math::imax(a.w,b.w),Math::imax(a.h,b.h)); }
125 extern FXAPI FXStream& operator<<(FXStream& store,
const FXSize& s);
128 extern FXAPI FXStream& operator>>(FXStream& store,FXSize& s);
Size.
Definition: FXSize.h:28
FXSize & operator*=(FXshort c)
Assignment operators.
Definition: FXSize.h:68
FXshort & operator[](FXint i)
Return a non-const reference to the ith element.
Definition: FXSize.h:40
Definition: FX4Splitter.h:28
FXbool operator!() const
Test if zero.
Definition: FXSize.h:74
FXSize()
Constructors.
Definition: FXSize.h:35
FXbool empty() const
Test if empty.
Definition: FXSize.h:46
FXSize operator+() const
Unary.
Definition: FXSize.h:77
const FXshort & operator[](FXint i) const
Return a const reference to the ith element.
Definition: FXSize.h:43
FXSize & operator=(const FXSize &s)
Assignment.
Definition: FXSize.h:59