Wt::SizePolicy Class Reference

#include <sizepolicy.h>

Collaboration diagram for Wt::SizePolicy:

Collaboration graph
[legend]
List of all members.

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< inthorizontallData
WVar< intverticalData
WVar< ExpandDataexpandData
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 }

Detailed Description

Definition at line 28 of file sizepolicy.h.


Member Enumeration Documentation

enum Wt::SizePolicy::ExpandData

Enumerator:
NoDirection 
Horizontal 
Vertical 
BothDirections 

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]

Enumerator:
Horizontally 
Vertically 

Definition at line 36 of file sizepolicy.h.

00036                  {
00037         Horizontally = 1 << 0,
00038         Vertically = 1 << 1
00039     } ExpandDataFlags;

enum Wt::SizePolicy::SizePolicyFlags [protected]

Enumerator:
MayGrow 
MayShrink 
ExpMask 

Definition at line 30 of file sizepolicy.h.

00030                  {
00031         MayGrow = 1 << 0,
00032         MayShrink = 1 << 1,
00033         ExpMask = 1 << 2
00034     } SizePolicyFlags;

enum Wt::SizePolicy::SizeType

SizePolicy types.

Enumerator:
Fixed 
Minimum 
Maximum 
Preferred 
MinimumExpanding 
Expanding 
Ignored 

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;


Constructor & Destructor Documentation

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) {}

Wt::SizePolicy::SizePolicy ( SizeType  hor,
SizeType  ver,
bool  hfw = false 
) [inline]

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) {}


Member Function Documentation

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     }


Member Data Documentation

WVar<ExpandData> Wt::SizePolicy::expandData

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==().

WVar<bool> Wt::SizePolicy::heightForWidth

Definition at line 117 of file sizepolicy.h.

Referenced by operator==().

WVar<int> Wt::SizePolicy::horizontallData

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().

WVar<int> Wt::SizePolicy::verticalData

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().


The documentation for this class was generated from the following file:

Generated Fri Jul 28 19:33:06 2006.
Copyright © 1998-2003 by the respective authors.

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.