00001 /* AbiWord 00002 * Copyright (C) 1998 AbiSource, Inc. 00003 * Copyright (C) Robert Staudinger <robsta@stereolyzer.net> 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_GOTO_H 00022 #define AP_UNIXDIALOG_GOTO_H 00023 00024 #include "ap_Dialog_Goto.h" 00025 #include "fv_View.h" 00026 00027 class XAP_UnixFrame; 00028 00029 00030 00031 class AP_UnixDialog_Goto: public AP_Dialog_Goto 00032 { 00033 public: 00034 AP_UnixDialog_Goto (XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id); 00035 virtual ~AP_UnixDialog_Goto (void); 00036 00037 static XAP_Dialog *static_constructor (XAP_DialogFactory *, 00038 XAP_Dialog_Id id); 00039 00040 virtual void runModeless (XAP_Frame *pFrame); 00041 virtual void notifyActiveFrame (XAP_Frame *pFrame); 00042 virtual void activate (void); 00043 virtual void destroy (void); 00044 00045 void onPageChanged (void); 00046 void onLineChanged (void); 00047 void onBookmarkDblClicked (void); 00048 void onXMLIDDblClicked (void); 00049 void onJumpClicked (void); 00050 void onPrevClicked (void); 00051 void onNextClicked (void); 00052 00053 void updateCache (AP_JumpTarget target); 00054 void updateDocCount (void); 00055 00056 const GtkWidget *getWindow (void) { return m_wDialog; } 00057 00058 protected: 00059 00060 void constuctWindow (XAP_Frame *pFrame); 00061 void updateWindow (void); 00062 00063 private: 00064 00065 enum { 00066 COLUMN_NAME = 0, /* currently only one column 00067 COLUMN_PAGE, 00068 COLUMN_NUMBER, */ 00069 NUM_COLUMNS 00070 }; 00071 00072 void _selectPrevBookmark (void); 00073 void _selectNextBookmark (void); 00074 std::string _getSelectedBookmarkLabel(); 00075 std::string _getSelectedXMLIDLabel(); 00076 00077 GtkWidget *m_wDialog; 00078 GtkWidget *m_lbPage; 00079 GtkWidget *m_lbLine; 00080 GtkWidget *m_lbBookmarks; 00081 GtkWidget *m_sbPage; 00082 GtkWidget *m_sbLine; 00083 GtkWidget *m_lvBookmarks; 00084 GtkWidget *m_btJump; 00085 GtkWidget *m_btPrev; 00086 GtkWidget *m_btNext; 00087 GtkWidget *m_lvXMLIDs; 00088 GtkWidget *m_btClose; 00089 00090 AP_JumpTarget m_JumpTarget; 00091 FV_DocCount m_DocCount; 00092 00093 void setupXMLIDList( GtkWidget* w ); 00094 void updateXMLIDList( GtkWidget* w ); 00095 }; 00096 00097 #endif /* AP_UNIXDIALOG_GOTO_H */ 00098 00099 00100
1.7.1