00001 /* AbiWord 00002 * Copyright (C) 2003 Dom Lachowicz 00003 * Copyright (C) 2004 Martin Sevior 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00018 * 02110-1301 USA. 00019 */ 00020 00021 #ifndef AP_UNIXDIALOG_FORMATTOC_H 00022 #define AP_UNIXDIALOG_FORMATTOC_H 00023 00024 #include "ap_Dialog_FormatTOC.h" 00025 00026 class XAP_UnixFrame; 00027 00028 /*****************************************************************/ 00029 00030 class AP_UnixDialog_FormatTOC: public AP_Dialog_FormatTOC 00031 { 00032 public: 00033 AP_UnixDialog_FormatTOC(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id); 00034 virtual ~AP_UnixDialog_FormatTOC(void); 00035 00036 virtual void runModeless(XAP_Frame * pFrame); 00037 00038 static XAP_Dialog * static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id); 00039 00040 // callbacks can fire these events 00041 void event_Close(void); 00042 void event_Apply(void); 00043 void setStyle(GtkWidget * wid); 00044 virtual void destroy(void); 00045 virtual void activate(void); 00046 virtual void setSensitivity(bool bSensitive); 00047 virtual void notifyActiveFrame(XAP_Frame * pFrame); 00048 virtual void setTOCPropsInGUI(void); 00049 void setMainLevel(UT_sint32 iLevel); 00050 void setDetailsLevel(UT_sint32 iLevel); 00051 void event_IndentChanged(GtkWidget * wSpin); 00052 void event_StartAtChanged(GtkWidget * wSpin); 00053 void event_HasHeadingChanged(GtkWidget * wid); 00054 void event_HasLabelChanged(GtkWidget * wid); 00055 private: 00056 GtkWidget * _constructWindow(void); 00057 void _populateWindowData(void); 00058 void _connectSignals(void); 00059 void _fillGUI(void); 00060 void _createLabelTypeItems(void); 00061 void _createTABTypeItems(void); 00062 void _createLevelItems(void); 00063 GtkWidget * _getWidget(const char * szNameBase, UT_sint32 level=0); 00064 00065 void _setHasHeadingSensitivity(bool bSensitive); 00066 00067 GtkWidget * m_windowMain; 00068 GtkWidget * m_wApply; 00069 GtkWidget * m_wClose; 00070 GtkWidget * m_wLabelChoose; 00071 GtkWidget * m_wPageNumberingChoose; 00072 GtkBuilder * m_pBuilder; 00073 UT_Vector m_vecChangeStyleBtns; 00074 UT_Vector m_vecStyleEntries; 00075 UT_Vector m_vecTextTypes; 00076 UT_sint32 m_iIndentValue; 00077 UT_sint32 m_iStartValue; 00078 static void s_NumType_changed(GtkWidget * wid, AP_UnixDialog_FormatTOC * me ); 00079 00080 }; 00081 00082 #endif /* AP_UNIXDIALOG_FORMATOC_H */