#include <Pt/Forms/Spacing.h>
Stores four-sided inset values. More...
Public Member Functions | |
| Spacing (double all) | |
| Creates equal spacing of all on every side. | |
| Spacing (double horizontal, double vertical) | |
| Creates spacing of horizontal and vertical. | |
| Spacing (double left, double top, double right, double bottom) | |
| Creates spacing from left, top, right, and bottom. | |
| Spacing () | |
| Creates zero spacing on every side. | |
| void | set (double value) |
| Sets every side to value. | |
| void | set (double horizontal, double vertical) |
| Sets left and right to horizontal, top and bottom to vertical. | |
| void | set (double left, double top, double right, double bottom) |
| Sets left, top, right, and bottom. | |
| double | left () const |
| Returns the left inset. | |
| void | setLeft (double left) |
| Sets the left inset to left. | |
| double | topBottom () const |
| Returns the sum of the top and bottom insets. | |
| double | leftRight () const |
| Returns the sum of the left and right insets. | |
| double | top () const |
| Returns the top inset. | |
| void | setTop (double top) |
| Sets the top inset to top. | |
| double | right () const |
| Returns the right inset. | |
| void | setRight (double right) |
| Sets the right inset to right. | |
| double | bottom () const |
| Returns the bottom inset. | |
| void | setBottom (double bottom) |
| Sets the bottom inset to bottom. | |
| bool | operator== (const Spacing &s) const |
| Returns true when both values compare equal. | |
A control uses Spacing as margin or padding. Construct it with one value for every side, a horizontal and vertical pair, or four sides.