1 /* AbiWord 2 * Copyright (C) 2004 Jordi Mas i Hern�ndez <jmas@softcatala.org> 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 * 02110-1301 USA. 18 */ 19 20 #ifndef AP_WIN32DIALOG_FORMATTOC_H 21 #define AP_WIN32DIALOG_FORMATTOC_H 22 23 #include "ap_Dialog_FormatTOC.h" 24 #include "xap_Win32PropertySheet.h" 25 #include "xap_Win32DialogBase.h" 26 27 class XAP_Win32Frame; 28 class AP_Win32Dialog_FormatTOC_General; 29 class AP_Win32Dialog_FormatTOC_Sheet; 30 class AP_Win32Dialog_FormatTOC_Layout; 31 32 class ABI_EXPORT AP_Win32Dialog_FormatTOC: public AP_Dialog_FormatTOC, XAP_Win32DialogBase 33 { 34 public: 35 AP_Win32Dialog_FormatTOC(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id); 36 virtual ~AP_Win32Dialog_FormatTOC(void); 37 virtual void runModeless(XAP_Frame * pFrame); 38 39 static XAP_Dialog * static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id); 40 virtual void notifyActiveFrame(XAP_Frame * pFrame); 41 virtual void setTOCPropsInGUI(void); 42 virtual void setSensitivity(bool bSensitive); 43 virtual void destroy(void); 44 virtual void activate(void); 45 void setStyle(HWND hWnd, int nCtrlID); 46 void setMainLevel(UT_sint32 iLevel); 47 void setDetailsLevel(UT_sint32 iLevel); 48 UT_sint32 m_iStartValue; 49 50 private: 51 52 AP_Win32Dialog_FormatTOC_Sheet* m_pSheet; 53 AP_Win32Dialog_FormatTOC_General* m_pGeneral; 54 AP_Win32Dialog_FormatTOC_Layout* m_pLayout; 55 56 57 }; 58 59 class ABI_EXPORT AP_Win32Dialog_FormatTOC_Sheet : public XAP_Win32PropertySheet 60 { 61 62 public: 63 64 AP_Win32Dialog_FormatTOC_Sheet(); 65 setContainer(AP_Win32Dialog_FormatTOC * pData)66 void setContainer(AP_Win32Dialog_FormatTOC* pData){m_pData=pData;}; getContainer()67 AP_Win32Dialog_FormatTOC* getContainer(){return m_pData;}; 68 static int CALLBACK s_sheetInit(HWND hwnd, UINT uMsg, LPARAM lParam); 69 void _onInitDialog(HWND hwnd); 70 virtual void cleanup(void); 71 virtual void _onOK(); 72 73 private: 74 75 AP_Win32Dialog_FormatTOC* m_pData; 76 77 }; 78 79 class ABI_EXPORT AP_Win32Dialog_FormatTOC_General: public XAP_Win32PropertyPage 80 { 81 public: 82 83 AP_Win32Dialog_FormatTOC_General(); 84 ~AP_Win32Dialog_FormatTOC_General(); 85 setContainer(AP_Win32Dialog_FormatTOC * pData)86 void setContainer(AP_Win32Dialog_FormatTOC* pData){m_pData=pData;}; getContainer()87 AP_Win32Dialog_FormatTOC* getContainer(){return m_pData;}; 88 void _fillGUI(void); 89 virtual BOOL _onCommand(HWND hWnd, WPARAM wParam, LPARAM lParam); 90 private: 91 92 virtual void _onInitDialog(); 93 virtual void _onApply(); 94 virtual void _onOK(); 95 96 AP_Win32Dialog_FormatTOC* m_pData; 97 98 }; 99 100 class ABI_EXPORT AP_Win32Dialog_FormatTOC_Layout: public XAP_Win32PropertyPage 101 { 102 public: 103 104 AP_Win32Dialog_FormatTOC_Layout(); 105 ~AP_Win32Dialog_FormatTOC_Layout(); 106 setContainer(AP_Win32Dialog_FormatTOC * pData)107 void setContainer(AP_Win32Dialog_FormatTOC* pData){m_pData=pData;}; getContainer()108 AP_Win32Dialog_FormatTOC* getContainer(){return m_pData;}; 109 void _fillGUI(void); 110 virtual BOOL _onCommand(HWND hWnd, WPARAM wParam, LPARAM lParam); 111 virtual void _onNotify(LPNMHDR hdr, int iCtrlID); 112 void saveCtrlsValuesForDetailsLevel (); 113 void loadCtrlsValuesForDetailsLevel (); 114 115 private: 116 117 virtual void _onInitDialog(); 118 virtual void _onApply(); 119 virtual void _onOK(); 120 void getCtrlsValues (); 121 122 AP_Win32Dialog_FormatTOC* m_pData; 123 124 }; 125 126 127 128 129 130 #endif /* AP_WIN32DIALOG_FORMATOC_H */ 131