Class to represent a margin around an area.
More...
#include <margin.h>
|
| Margin () |
| Construct a margin with 0 for all measurements.
|
|
| Margin (int all) |
| Construct a margin with all measurements equal. More...
|
|
| Margin (int x, int y) |
| Construct a margin with the left = right and top = bottom. More...
|
|
| Margin (int l, int t, int r, int b) |
| Construct a margin with all measurements specified. More...
|
|
| Margin (const Margin &other) |
| Copy constructor. More...
|
|
Margin & | operator= (const Margin &other) |
| Assign this margin with the values of another. More...
|
|
bool | operator== (const Margin &other) const |
| Check if this margin contains the same values as another margin. More...
|
|
bool | operator!= (const Margin &other) const |
| Check if this margin contains differing values from another margin. More...
|
|
|
int | left |
| Left margin.
|
|
int | top |
| Top margin.
|
|
int | right |
| Right margin.
|
|
int | bottom |
| Bottom margin.
|
|
Class to represent a margin around an area.
tbx::Margin::Margin |
( |
int |
all | ) |
|
|
inline |
Construct a margin with all measurements equal.
- Parameters
-
all | value for all measurements |
tbx::Margin::Margin |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
inline |
Construct a margin with the left = right and top = bottom.
- Parameters
-
x | size for left and right margins |
y | size for top and bottom margins |
tbx::Margin::Margin |
( |
int |
l, |
|
|
int |
t, |
|
|
int |
r, |
|
|
int |
b |
|
) |
| |
|
inline |
Construct a margin with all measurements specified.
- Parameters
-
l | left margin |
t | top margin |
r | right margin |
b | bottom margin |
tbx::Margin::Margin |
( |
const Margin & |
other | ) |
|
|
inline |
Copy constructor.
- Parameters
-
bool tbx::Margin::operator!= |
( |
const Margin & |
other | ) |
const |
|
inline |
Check if this margin contains differing values from another margin.
- Parameters
-
other | margin to compare with |
- Returns
- true if one or more measurements are not equal
Assign this margin with the values of another.
- Parameters
-
bool tbx::Margin::operator== |
( |
const Margin & |
other | ) |
const |
|
inline |
Check if this margin contains the same values as another margin.
- Parameters
-
other | margin to compare with |
- Returns
- true if all measurements are equal
The documentation for this class was generated from the following file: