• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ap_UnixDialog_Replace.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 1998 AbiSource, Inc.
00003  *
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_REPLACE_H
00021 #define AP_UNIXDIALOG_REPLACE_H
00022 
00023 #include "ap_Dialog_Replace.h"
00024 
00025 class XAP_UnixFrame;
00026 
00027 /*****************************************************************/
00028 
00029 class AP_UnixDialog_Replace: public AP_Dialog_Replace
00030 {
00031 public:
00032     AP_UnixDialog_Replace(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
00033     virtual ~AP_UnixDialog_Replace(void);
00034 
00035 
00036     virtual void            runModal(XAP_Frame * /*pFrame*/){};
00037     virtual void            runModeless(XAP_Frame * pFrame);
00038     virtual void            notifyActiveFrame(XAP_Frame *pFrame);
00039     virtual void            notifyCloseFrame(XAP_Frame * /*pFrame*/){};
00040     virtual void            destroy(void);
00041     virtual void            activate(void);
00042 
00043     static XAP_Dialog *     static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id);
00044 
00045     // callbacks can fire these events
00046     void            event_Find(void);
00047     void            event_FindEntryChange(void);
00048     void            event_Replace(void);
00049     void            event_ReplaceAll(void);
00050     void            event_MatchCaseToggled(void);
00051     void            event_WholeWordToggled(void);
00052     void            event_ReverseFindToggled(void);
00053     void            event_Cancel(void);
00054 
00055     enum
00056       {
00057         BUTTON_CANCEL = GTK_RESPONSE_CANCEL,
00058         // enum GtkResponseType seems to only use negative integers, so we'll use positive ones to
00059         // prevent potential conflicts (the cause of Bug 11583)
00060         BUTTON_FIND = 0,
00061         BUTTON_REPLACE = 1,
00062         BUTTON_REPLACE_ALL = 2
00063       } ResponseId;
00064 
00065 protected:
00066 
00067     virtual void            _updateLists();
00068 
00069 private:
00070 
00071     // private construction functions
00072     GtkWidget * _constructWindow(void);
00073     void        _populateWindowData(void);
00074     void        _storeWindowData(void);
00075 
00076     static void s_response_triggered(GtkWidget * widget, gint resp, AP_UnixDialog_Replace * dlg);
00077 
00078     void            _updateList(GtkWidget* combo, UT_GenericVector<UT_UCS4Char*>* list);
00079 
00080     // pointers to widgets we need to query/set
00081     GtkWidget * m_windowMain;
00082 
00083     GtkWidget * m_buttonFind;
00084     GtkWidget * m_buttonFindReplace;
00085     GtkWidget * m_buttonReplaceAll;
00086 
00087     GtkWidget * m_comboFind;
00088     GtkWidget * m_comboReplace;
00089 
00090     GtkWidget * m_checkbuttonMatchCase;
00091     GtkWidget * m_checkbuttonWholeWord;
00092     GtkWidget * m_checkbuttonReverseFind;
00093 };
00094 
00095 #endif /* AP_UNIXDIALOG_REPLACE_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1