00001
00026 #ifndef INC_MGUI_BASE_H
00027 #define INC_MGUI_BASE_H
00028
00029 #ifndef INC_MI32_DELEGATE_H
00030 #include <mi32/delegate.h>
00031 #endif
00032
00033 namespace MGUI {
00034
00035
00036 #ifndef GENERATING_DOXYGEN_OUTPUT
00037
00038 class FORM;
00039 class CTRL;
00040 class CTRL_TOOLTIP;
00041 class MENU;
00042 class LAYOUT_PANE_BASE;
00043 #endif
00044
00045
00050 class POINT {
00051 public:
00052
00053 INT16 m_x;
00054 INT16 m_y;
00055
00057 POINT (
00058 ): m_x(-32768), m_y(-32768) { }
00059
00060 POINT (
00061 const POINT& rhs
00062 ): m_x(rhs.m_x), m_y(rhs.m_y) { }
00063
00065 POINT (
00066 INT16 x,
00067 INT16 y
00068 ): m_x(x), m_y(y) { }
00069
00070 POINT& operator= (
00071 const POINT& rhs
00072 ) { if (this != &rhs) { m_x = rhs.m_x; m_y = rhs.m_y; } return (*this); }
00073
00075 INT16 GetX () const
00076 { return (m_x); }
00077
00079 INT16 GetY () const
00080 { return (m_y); }
00081
00083 void Set (
00084 INT16 x,
00085 INT16 y
00086 ) { m_x = x; m_y = y; }
00087
00089 void SetX (
00090 INT16 x
00091 ) { m_x = x; }
00092
00094 void SetY (
00095 INT16 y
00096 ) { m_y = y; }
00097 };
00098
00099 inline bool operator== (
00100 const MGUI::POINT& lhs,
00101 const MGUI::POINT& rhs
00102 ) { return (lhs.m_x == rhs.m_x && lhs.m_y == rhs.m_y); }
00103
00104 inline bool operator!= (
00105 const MGUI::POINT& lhs,
00106 const MGUI::POINT& rhs
00107 ) { return (lhs.m_x != rhs.m_x || lhs.m_y != rhs.m_y); }
00108
00109
00110
00111
00112 enum LAYOUT_ORIENTATION {
00113 LAYOUT_ORIENTATION_Horizontal = 0,
00114 LAYOUT_ORIENTATION_Vertical = 1,
00115 LAYOUT_ORIENTATION_HorizontalLtoR = 2,
00116 LAYOUT_ORIENTATION_HorizontalRtoL = 3,
00117 };
00118
00119 enum LAYOUT_SIZEALIGN {
00120 LAYOUT_SIZEALIGN_Expand = 0x0000,
00121 LAYOUT_SIZEALIGN_FixedWidth = 0x0001,
00122 LAYOUT_SIZEALIGN_RelativeWidth = 0x0002,
00123 LAYOUT_SIZEALIGN_FixedHeight = 0x0004,
00124 LAYOUT_SIZEALIGN_RelativeHeight = 0x0008,
00125 LAYOUT_SIZEALIGN_FixedSize = 0x0005,
00126 LAYOUT_SIZEALIGN_AlignLeft = 0x0010,
00127 LAYOUT_SIZEALIGN_AlignRight = 0x0020,
00128 LAYOUT_SIZEALIGN_AlignTop = 0x0040,
00129 LAYOUT_SIZEALIGN_AlignBottom = 0x0080,
00130 LAYOUT_SIZEALIGN_CenterHorz = 0x0030,
00131 LAYOUT_SIZEALIGN_CenterVert = 0x00C0,
00132 LAYOUT_SIZEALIGN_Center = 0x00F0,
00133 LAYOUT_SIZEALIGN_ExcludeFromLayout = 0x0100,
00134 LAYOUT_SIZEALIGN_NoResizeAfterCreate = 0x2000,
00135 LAYOUT_SIZEALIGN_IgnoreNonVisible = 0x4000,
00136 LAYOUT_SIZEALIGN_InitiallyHidden = 0x8000,
00137 };
00138 #ifndef GENERATING_DOXYGEN_OUTPUT
00139 DEFINE_ENUM_OP_BITWISE(LAYOUT_SIZEALIGN);
00140 #endif
00141
00142
00143
00145 void Beep ();
00146
00147
00148
00150 typedef fastdelegate::FastDelegate<void(MGUI::ID)> DELEGATE_VOID_ID;
00151
00153 typedef fastdelegate::FastDelegate<void(MGUI::LAYOUT_PANE_BASE&)> DELEGATE_CREATECUSTOMCONTROLS;
00154
00158 typedef fastdelegate::FastDelegate<bool(CTRL_TOOLTIP&, int, int)> DELEGATE_ONTOOLTIPREQUEST;
00159
00160
00161 }
00162
00163 #endif // INC_MGUI_BASE_H