#include <sizepolicy.h>
Collaboration diagram for Wt::SizePolicy:
Public Types | |
Fixed = 0 | |
Minimum = MayGrow | |
Maximum = MayShrink | |
Preferred = MayGrow | MayShrink | |
MinimumExpanding = MayGrow | ExpMask | |
Expanding = MayGrow | MayShrink | ExpMask | |
Ignored = ExpMask | |
NoDirection = 0 | |
Horizontal = Horizontally | |
Vertical = Vertically | |
BothDirections = Horizontally | Vertically | |
enum | SizeType { Fixed = 0, Minimum = MayGrow, Maximum = MayShrink, Preferred = MayGrow | MayShrink, MinimumExpanding = MayGrow | ExpMask, Expanding = MayGrow | MayShrink | ExpMask, Ignored = ExpMask } |
SizePolicy types. More... | |
enum | ExpandData { NoDirection = 0, Horizontal = Horizontally, Vertical = Vertically, BothDirections = Horizontally | Vertically } |
Public Member Functions | |
SizePolicy () | |
SizePolicy (SizeType hor, SizeType ver, bool hfw=false) | |
SizePolicy (SizeType hor, SizeType ver, unsigned char horStretch, unsigned char verStretch, bool hfw=false) | |
bool | mayShrinkHorizontally () const |
bool | mayShrinkVertically () const |
bool | mayGrowHorizontally () const |
bool | mayGrowVertically () const |
bool | expandingHorizontally () const |
bool | expandingVertically () const |
bool | operator== (const SizePolicy &other) const |
Public Attributes | |
WVar< int > | horizontallData |
WVar< int > | verticalData |
WVar< ExpandData > | expandData |
WVar< bool > | heightForWidth |
WVar< unsigned char > | horizontalStretch |
WVar< unsigned char > | verticalStretch |
Protected Types | |
MayGrow = 1 << 0 | |
MayShrink = 1 << 1 | |
ExpMask = 1 << 2 | |
Horizontally = 1 << 0 | |
Vertically = 1 << 1 | |
enum | SizePolicyFlags { MayGrow = 1 << 0, MayShrink = 1 << 1, ExpMask = 1 << 2 } |
enum | ExpandDataFlags { Horizontally = 1 << 0, Vertically = 1 << 1 } |
Definition at line 28 of file sizepolicy.h.
Definition at line 53 of file sizepolicy.h.
00053 { 00054 NoDirection = 0, 00055 Horizontal = Horizontally, 00056 Vertical = Vertically, 00057 BothDirections = Horizontally | Vertically 00058 } ExpandData;
enum Wt::SizePolicy::ExpandDataFlags [protected] |
Definition at line 36 of file sizepolicy.h.
00036 { 00037 Horizontally = 1 << 0, 00038 Vertically = 1 << 1 00039 } ExpandDataFlags;
enum Wt::SizePolicy::SizePolicyFlags [protected] |
Definition at line 30 of file sizepolicy.h.
00030 { 00031 MayGrow = 1 << 0, 00032 MayShrink = 1 << 1, 00033 ExpMask = 1 << 2 00034 } SizePolicyFlags;
SizePolicy types.
Definition at line 43 of file sizepolicy.h.
00043 { 00044 Fixed = 0, 00045 Minimum = MayGrow, 00046 Maximum = MayShrink, 00047 Preferred = MayGrow | MayShrink, 00048 MinimumExpanding = MayGrow | ExpMask, 00049 Expanding = MayGrow | MayShrink | ExpMask, 00050 Ignored = ExpMask 00051 } SizeType;
Wt::SizePolicy::SizePolicy | ( | ) | [inline] |
Definition at line 60 of file sizepolicy.h.
00060 : 00061 horizontallData(Preferred), 00062 verticalData(Preferred), 00063 expandData(BothDirections), 00064 heightForWidth(false), 00065 horizontalStretch(0), 00066 verticalStretch(0) {}
Definition at line 68 of file sizepolicy.h.
00068 : 00069 horizontallData(hor), 00070 verticalData(ver), 00071 expandData(BothDirections), 00072 heightForWidth(hfw), 00073 horizontalStretch(0), 00074 verticalStretch(0) {}
Wt::SizePolicy::SizePolicy | ( | SizeType | hor, | |
SizeType | ver, | |||
unsigned char | horStretch, | |||
unsigned char | verStretch, | |||
bool | hfw = false | |||
) | [inline] |
Definition at line 76 of file sizepolicy.h.
00077 : 00078 horizontallData(hor), 00079 verticalData(ver), 00080 expandData(BothDirections), 00081 heightForWidth(hfw), 00082 horizontalStretch(horStretch), 00083 verticalStretch(verStretch) {}
bool Wt::SizePolicy::expandingHorizontally | ( | ) | const [inline] |
Definition at line 98 of file sizepolicy.h.
References expandData, ExpMask, horizontallData, and Horizontally.
Referenced by Wt::Layout::expandingPrimally().
00098 { 00099 return (horizontallData & ExpMask) && (expandData & Horizontally); 00100 }
bool Wt::SizePolicy::expandingVertically | ( | ) | const [inline] |
Definition at line 101 of file sizepolicy.h.
References expandData, ExpMask, verticalData, and Vertically.
Referenced by Wt::Layout::expandingPrimally().
00101 { 00102 return (verticalData & ExpMask) && (expandData & Vertically); 00103 };
bool Wt::SizePolicy::mayGrowHorizontally | ( | ) | const [inline] |
Definition at line 91 of file sizepolicy.h.
References expandData, horizontallData, Horizontally, and MayGrow.
Referenced by Wt::Layout::mayGrowPrimally().
00091 { 00092 return (horizontallData & MayGrow) && (expandData & Horizontally); 00093 }
bool Wt::SizePolicy::mayGrowVertically | ( | ) | const [inline] |
Definition at line 94 of file sizepolicy.h.
References expandData, MayGrow, verticalData, and Vertically.
Referenced by Wt::Layout::mayGrowPrimally().
00094 { 00095 return (verticalData & MayGrow) && (expandData & Vertically); 00096 };
bool Wt::SizePolicy::mayShrinkHorizontally | ( | ) | const [inline] |
Definition at line 85 of file sizepolicy.h.
References expandData, horizontallData, Horizontally, and MayShrink.
Referenced by Wt::Layout::mayShrinkPrimally().
00085 { 00086 return (horizontallData & MayShrink) && (expandData & Horizontally); 00087 }
bool Wt::SizePolicy::mayShrinkVertically | ( | ) | const [inline] |
Definition at line 88 of file sizepolicy.h.
References expandData, MayShrink, verticalData, and Vertically.
Referenced by Wt::Layout::mayShrinkPrimally().
00088 { 00089 return (verticalData & MayShrink) && (expandData & Vertically); 00090 };
bool Wt::SizePolicy::operator== | ( | const SizePolicy & | other | ) | const [inline] |
Definition at line 105 of file sizepolicy.h.
References expandData, heightForWidth, horizontallData, horizontalStretch, verticalData, and verticalStretch.
00105 { 00106 return horizontallData == other.horizontallData && 00107 verticalData == other.verticalData && 00108 expandData == other.expandData && 00109 heightForWidth == other.heightForWidth && 00110 horizontalStretch == other.horizontalStretch && 00111 verticalStretch == other.verticalStretch; 00112 }
Definition at line 116 of file sizepolicy.h.
Referenced by Wt::LayoutItem::expanding(), expandingHorizontally(), expandingVertically(), Wt::Window::Frame::Frame(), mayGrowHorizontally(), mayGrowVertically(), mayShrinkHorizontally(), mayShrinkVertically(), and operator==().
Definition at line 114 of file sizepolicy.h.
Referenced by expandingHorizontally(), mayGrowHorizontally(), mayShrinkHorizontally(), and operator==().
WVar<unsigned char> Wt::SizePolicy::horizontalStretch |
Definition at line 118 of file sizepolicy.h.
Referenced by operator==(), Wt::Layout::primaryStretch(), and Wt::Box::setStretchFactor().
Definition at line 115 of file sizepolicy.h.
Referenced by expandingVertically(), mayGrowVertically(), mayShrinkVertically(), and operator==().
WVar<unsigned char> Wt::SizePolicy::verticalStretch |
Definition at line 119 of file sizepolicy.h.
Referenced by operator==(), Wt::Layout::primaryStretch(), and Wt::Box::setStretchFactor().
This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.