faithcore/faith/sizepolicy.h

Go to the documentation of this file.
00001 #ifndef FAITH__SIZEPOLICY_H
00002 #define FAITH__SIZEPOLICY_H
00003 
00004 namespace Faith
00005 {
00006 
00007 class SizePolicy
00008 {
00009 public:
00024         enum Policy
00025         {
00026                 Minimum,
00027                 Maximum,
00028                 Expanding,
00029                 Fixed,
00030                 
00031                 _Any
00032         };
00033 
00037         SizePolicy(Policy horizontal, Policy vertical)
00038                 : mHorizontal(horizontal), mVertical(vertical) { }
00039         
00043         SizePolicy() : mHorizontal(Expanding), mVertical(Expanding) { }
00044 
00045         Policy horizontal() const { return mHorizontal; }
00046         Policy vertical() const { return mVertical; }
00047 
00048         void setHorizontal(Policy p) { mHorizontal = p; }
00049         void setVertical(Policy p) { mVertical = p; }
00050 
00051 private:
00052         Policy mHorizontal, mVertical;
00053 };
00054 
00055 }
00056 
00057 
00058 #endif

Generated on Fri Sep 1 00:23:07 2006 for Faith by  doxygen 1.4.7