00001 /* AbiWord 00002 * Copyright (C) 2000 AbiSource, Inc. 00003 * Copyright (C) 2005 Hubert Figuiere 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., 59 Temple Place - Suite 330, Boston, MA 00018 * 02111-1307, USA. 00019 */ 00020 00021 #ifndef AP_UNIXDIALOG_WORDCOUNT_H 00022 #define AP_UNIXDIALOG_WORDCOUNT_H 00023 00024 #include "ap_Dialog_WordCount.h" 00025 #include "ut_timer.h" 00026 00027 class XAP_UnixFrame; 00028 00029 /*****************************************************************/ 00030 00031 class AP_UnixDialog_WordCount: public AP_Dialog_WordCount 00032 { 00033 public: 00034 AP_UnixDialog_WordCount(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id); 00035 virtual ~AP_UnixDialog_WordCount(void); 00036 00037 virtual void runModeless(XAP_Frame * pFrame); 00038 virtual void destroy(void); 00039 virtual void activate(void); 00040 virtual void notifyActiveFrame(XAP_Frame *pFrame); 00041 00042 static XAP_Dialog * static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id); 00043 00044 // callbacks can fire these events 00045 00046 void event_OK(void); 00047 void event_WindowDelete(void); 00048 00049 protected: 00050 virtual XAP_Widget *getWidget(xap_widget_id wid); 00051 virtual void constructDialog(void); 00052 00053 static void s_response(GtkWidget * wid, gint id, AP_UnixDialog_WordCount * me ) ; 00054 00055 // private construction functions 00056 // GtkWidget * _constructWindow(void); 00057 00058 static void autoupdateWC(UT_Worker * pTimer); 00059 00060 // pointers to widgets we need to query/set 00061 GtkWidget * m_windowMain; 00062 00063 // Labels for the Word Count data 00064 GtkWidget * m_labelWCount; 00065 GtkWidget * m_labelWNoFootnotesCount; 00066 GtkWidget * m_labelPCount; 00067 GtkWidget * m_labelCCount; 00068 GtkWidget * m_labelCNCount; 00069 GtkWidget * m_labelLCount; 00070 GtkWidget * m_labelPgCount; 00071 GtkWidget * m_labelLabelWCount; 00072 GtkWidget * m_labelWNFCount; 00073 GtkWidget * m_labelLabelPCount; 00074 GtkWidget * m_labelLabelCCount; 00075 GtkWidget * m_labelLabelCNCount; 00076 GtkWidget * m_labelLabelLCount; 00077 GtkWidget * m_labelLabelPgCount; 00078 GtkWidget * m_labelTitle; 00079 00080 UT_Timer * m_pAutoUpdateWC; 00081 00082 // Handshake variables 00083 bool m_bDestroy_says_stopupdating; 00084 bool m_bAutoUpdate_happening_now; 00085 }; 00086 00087 #endif /* AP_UNIXDIALOG_WORDCOUNT_H */ 00088 00089 00090 00091 00092 00093 00094 00095
1.7.1