00001 00018 #ifndef INC_MGUI_FORMBOOK_H 00019 #define INC_MGUI_FORMBOOK_H 00020 00021 #ifndef INC_MGUI_FORM_H 00022 #include <mgui/form.h> 00023 #endif 00024 00025 namespace MGUI { 00026 00027 //===================================================================================================================== 00028 00031 class FORM_BOOK : public FORM_COMPOSITE { 00032 public: 00033 00035 enum PAGESTYLE { 00036 PAGESTYLE_Default = 0, 00037 PAGESTYLE_IgnoreNonVisible = 0x01, 00038 }; 00039 00041 FORM_BOOK (); 00042 00044 virtual ~FORM_BOOK (); 00045 00048 int AddPage ( 00049 MGUI::LAYOUT_ORIENTATION orientation = MGUI::LAYOUT_ORIENTATION_Vertical, 00050 PAGESTYLE pagestyle = PAGESTYLE_Default, 00051 int ChildSpacing = 4, 00052 int ExtraBorder = 0 00053 ); 00054 00056 void Create ( 00057 MGUI::LAYOUT_PANE_BASE& PaneParent, 00058 LAYOUT_SIZEALIGN sizealign = LAYOUT_SIZEALIGN_FixedSize, 00059 int ExtraBorder = 0 00060 ); 00061 00064 int GetActivePage () const 00065 { return (m_ActivePage); } 00066 00068 MGUI::ID GetPageID ( 00069 int pageindex 00070 ) const { return (m_PageIds.IsEmpty() ? 0 : m_PageIds[pageindex]); } 00071 00074 LAYOUT_PANE& GetPagePane ( 00075 int pageindex 00076 ) { return (*m_PagePanePtrs[pageindex]); } 00077 00079 int GetNumPages () const 00080 { return (m_PagePanePtrs.GetNumItems()); } 00081 00083 void SetActivePage ( 00084 int pageindex 00085 ); 00086 00088 void SetActivePageID ( 00089 MGUI::ID id 00090 ); 00091 00093 void SetPageID ( 00094 int pageindex, 00095 MGUI::ID id 00096 ); 00097 00098 private: 00099 #ifndef GENERATING_DOXYGEN_OUTPUT 00100 SIMPLE_ARRAY<LAYOUT_PANE*> m_PagePanePtrs; 00101 SIMPLE_ARRAY<MGUI::ID> m_PageIds; 00102 int m_ActivePage; 00103 00104 FORM_BOOK (const FORM_BOOK&); 00105 FORM_BOOK& operator= (const FORM_BOOK&); 00106 #endif 00107 }; 00108 00109 #ifndef GENERATING_DOXYGEN_OUTPUT 00110 DEFINE_ENUM_OP_BITWISE(FORM_BOOK::PAGESTYLE) 00111 #endif 00112 00113 //===================================================================================================================== 00114 } // End namespace MGUI 00115 00116 #endif // INC_MGUI_FORMBOOK_H
1.6.1