00001 /* AbiWord 00002 * Copyright (C) 1998 AbiSource, Inc. 00003 * Copyright (C) 2003 Marc Maurer 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00017 * 02110-1301 USA. 00018 */ 00019 00020 #ifndef AP_UNIXDIALOG_FORMATTABLE_H 00021 #define AP_UNIXDIALOG_FORMATTABLE_H 00022 00023 #include "ap_Dialog_FormatTable.h" 00024 00025 class XAP_UnixFrame; 00026 class GR_UnixCairoGraphics; 00027 00028 /*****************************************************************/ 00029 00030 class AP_UnixDialog_FormatTable: public AP_Dialog_FormatTable 00031 { 00032 public: 00033 AP_UnixDialog_FormatTable(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id); 00034 virtual ~AP_UnixDialog_FormatTable(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 virtual void event_Close(void); 00042 void event_previewExposed(void); 00043 void event_ApplyToChanged(void); 00044 void event_BorderThicknessChanged(void); 00045 virtual void setBorderThicknessInGUI(UT_UTF8String & sThick); 00046 virtual void setBackgroundColorInGUI(UT_RGBColor clr); 00047 virtual void setSensitivity(bool bsens); 00048 virtual void destroy(void); 00049 virtual void activate(void); 00050 virtual void notifyActiveFrame(XAP_Frame * pFrame); 00051 const GtkWidget * getWindow (void) const { return m_windowMain; } 00052 protected: 00053 typedef enum 00054 { 00055 BUTTON_APPLY = GTK_RESPONSE_APPLY, 00056 BUTTON_CLOSE = GTK_RESPONSE_CLOSE 00057 } ResponseId ; 00058 00059 virtual GtkWidget * _constructWindow(void); 00060 void _populateWindowData(void); 00061 void _storeWindowData(void); 00062 void _connectSignals(void); 00063 00064 GR_UnixCairoGraphics * m_pPreviewWidget; 00065 00066 // pointers to widgets we need to query/set 00067 GtkWidget * m_windowMain; 00068 GtkWidget * m_wApplyButton; 00069 GtkWidget * m_wCloseButton; 00070 00071 GtkWidget * m_wBorderColorButton; 00072 GtkWidget * m_wBackgroundColorButton; 00073 GtkWidget * m_wLineLeft; 00074 GtkWidget * m_wLineRight; 00075 GtkWidget * m_wLineTop; 00076 GtkWidget * m_wLineBottom; 00077 00078 GtkWidget * m_wPreviewArea; 00079 GtkWidget * m_wApplyToMenu; 00080 00081 GtkWidget * m_wSelectImageButton; 00082 GtkWidget * m_wNoImageButton; 00083 GtkWidget * m_wBorderThickness; 00084 guint m_iBorderThicknessConnect; 00085 }; 00086 00087 #endif /* AP_UNIXDIALOG_FORMATTABLE_H */