Defines how a Layout should resize a Widget in one length Dimension.
More...
#include <size_policy.hpp>
|
| Size_policy (int hint=0, int min=0, int max=maximum_max, double stretch=1., bool can_ignore_min=true) |
|
| Size_policy (Size_policy const &x) |
| Does not copy the Signal, so no slots are connected on copy init.
|
|
| Size_policy (Size_policy &&x) |
| Does not move the Signal, so no slots are connected on move init.
|
|
auto | operator= (Size_policy const &x) -> Size_policy & |
| Specifically does not copy the Signal, so Widget is still notified.
|
|
auto | operator= (Size_policy &&x) -> Size_policy & |
| Specifically does not copy the Signal, so Widget is still notified.
|
|
void | hint (int value) |
| Set the size hint, used as the initial value in calculations.
|
|
auto | hint () const -> int |
| Return the size hint currently being used.
|
|
void | min (int value) |
| Set the minimum length that the owning Widget should be.
|
|
auto | min () const -> int |
| Return the minimum length currently set.
|
|
void | max (int value) |
| Set the maximum length/height that the owning Widget can be.
|
|
auto | max () const -> int |
| Return the maximum length currently set.
|
|
void | stretch (double value) |
| Set the stretch value, used to divide up space between sibling Widgets. More...
|
|
auto | stretch () const -> double |
| Return the stretch value currently being used.
|
|
void | can_ignore_min (bool enable) |
| Set if min can be ignored for the last displayed widget in a layout.
|
|
auto | can_ignore_min () const -> bool |
| Return if min can be ignored for the last displayed widget in a layout.
|
|
Defines how a Layout should resize a Widget in one length Dimension.
◆ stretch()
void ox::Size_policy::stretch |
( |
double |
value | ) |
|
Set the stretch value, used to divide up space between sibling Widgets.
A ratio of stretch over siblings' stretch sum is used to give space.
◆ maximum_max
constexpr auto ox::Size_policy::maximum_max |
|
staticconstexpr |
Initial value:=
std::numeric_limits<decltype(data_.max)>
::max()
auto max() const -> int
Return the maximum length currently set.
Definition: size_policy.cpp:38
Largest possible value for max().
The documentation for this class was generated from the following files:
- /github/workspace/include/termox/widget/size_policy.hpp
- /github/workspace/src/widget/size_policy.cpp