00001
00015 #ifndef INC_MGUI_FORMTABBED_H
00016 #define INC_MGUI_FORMTABBED_H
00017
00018 #ifndef INC_MGUI_FORM_H
00019 #include <mgui/form.h>
00020 #endif
00021
00022 namespace MGUI {
00023
00024 #ifndef GENERATING_DOXYGEN_OUTPUT
00025 class ICON;
00026 #endif
00027
00028
00029
00031 class FORM_TABBED : public FORM_COMPOSITE {
00032 public:
00033
00035 enum FORMSTYLE {
00036 FORMSTYLE_TabTopLeft = 0x00,
00037 FORMSTYLE_TabTopRight = 0x01,
00038 FORMSTYLE_TabBottomLeft = 0x02,
00039 FORMSTYLE_TabBottomRight = 0x03,
00040 FORMSTYLE_TabLeftTop = 0x04,
00041 FORMSTYLE_TabLeftBottom = 0x05,
00042 FORMSTYLE_TabRightTop = 0x06,
00043 FORMSTYLE_TabRightBottom = 0x07,
00044 FORMSTYLE_UseIcons = 0x08,
00045 #ifndef GENERATING_DOXYGEN_OUTPUT
00046 FORMSTYLE_TabMask = 0x07,
00047 #endif
00048 };
00049
00051 enum PAGESTYLE {
00052 PAGESTYLE_Default = 0,
00053 PAGESTYLE_IgnoreNonVisible = 0x01,
00054 PAGESTYLE_Disabled = 0x02,
00055 PAGESTYLE_ShowTextWithIcon = 0x04,
00056 };
00057
00059 FORM_TABBED ();
00060
00062 virtual ~FORM_TABBED ();
00063
00066 int AddPage (
00067 const MISTRING& label,
00068 MGUI::LAYOUT_ORIENTATION orientation = MGUI::LAYOUT_ORIENTATION_Vertical,
00069 PAGESTYLE pagestyle = PAGESTYLE_Default,
00070 int ChildSpacing = 4,
00071 int ExtraBorder = 4
00072 );
00073
00076 int AddPage (
00077 const MGUI::ICON& icon,
00078 const MISTRING& tooltip,
00079 MGUI::LAYOUT_ORIENTATION orientation = MGUI::LAYOUT_ORIENTATION_Vertical,
00080 PAGESTYLE pagestyle = PAGESTYLE_Default,
00081 int ChildSpacing = 4,
00082 int ExtraBorder = 4
00083 );
00084
00086 void Create (
00087 MGUI::LAYOUT_PANE_BASE& PaneParent,
00088 FORMSTYLE formstyle = FORMSTYLE_TabTopLeft,
00089 LAYOUT_SIZEALIGN sizealign = LAYOUT_SIZEALIGN_FixedSize
00090 );
00091
00094 int GetActivePage (
00095 ) const;
00096
00098 LAYOUT_PANE_BASE& GetPagePane (
00099 int pageindex
00100 );
00101
00103 int GetNumPages (
00104 ) const;
00105
00107 void SetActivePage (
00108 int pageindex
00109 );
00110
00114 void SetDelegateOnPageActivate (
00115 DELEGATE_VOID_NOPARMS delegate,
00116 int pageindex = -1
00117 );
00118
00122 void SetDelegateOnPageDeactivate (
00123 DELEGATE_BOOL_NOPARMS delegate,
00124 int pageindex = -1
00125 );
00126
00128 void SetPageEnabled (
00129 int pageindex,
00130 bool enabled = true
00131 );
00132
00133 private:
00134 #ifndef GENERATING_DOXYGEN_OUTPUT
00135 class PRIV;
00136 PRIV *m_pPriv;
00137
00138 FORM_TABBED (const FORM_TABBED&);
00139 FORM_TABBED& operator= (const FORM_TABBED&);
00140 #endif
00141 };
00142
00143 #ifndef GENERATING_DOXYGEN_OUTPUT
00144 DEFINE_ENUM_OP_BITWISE(FORM_TABBED::PAGESTYLE)
00145 #endif
00146
00147
00148 }
00149
00150 #endif // INC_MGUI_FORMTABBED_H