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

ap_Dialog_Goto.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 1998 AbiSource, Inc.
00003  * Copyright (C) 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA
00018  * 02110-1301 USA.
00019  */
00020 
00021 #ifndef AP_DIALOG_GOTO_H
00022 #define AP_DIALOG_GOTO_H
00023 
00024 #include <string>
00025 
00026 #include "xap_Dialog.h"
00027 #include "fv_View.h"
00028 #include "pd_DocumentRDF.h"
00029 
00030 class XAP_Frame;
00031 
00032 class ABI_EXPORT AP_Dialog_Goto : public XAP_Dialog_Modeless
00033 {
00034 public:
00035     AP_Dialog_Goto(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
00036     virtual ~AP_Dialog_Goto();
00037 
00038     // these are kinda screwy now, but we never return anything but on
00039     // "cancel" or "close"
00040     typedef enum {
00041         a_CLOSE
00042     } tAnswer;
00043 
00044     AP_Dialog_Goto::tAnswer     getAnswer() const;
00045     void                        ConstructWindowName();
00046     // These are called from edit methods or from dialogs
00047     // to set or read the variables in the current
00048     // instance of the dialog.  These do not read the persistent
00049     // values.
00050     bool                        setView(FV_View * view);
00051     FV_View *                   getView() const;
00052     void                        setActiveFrame(XAP_Frame *pFrame);
00053     static const char **        getJumpTargets();
00054     PD_DocumentRDFHandle        getRDF();
00055 
00056     UT_sint32                   getExistingBookmarksCount() const;
00057     const std::string &         getNthExistingBookmark(UT_sint32 n) const;
00062     void                        performGoto(AP_JumpTarget target, const char *value) const;
00063     std::string                 performGotoNext(AP_JumpTarget target, UT_sint32 idx) const;
00064     std::string                 performGotoPrev(AP_JumpTarget target, UT_sint32 idx) const;
00065 protected:
00066     // These are the "current use" dialog data items,
00067     // which are liberally read and set by the
00068     // accessor methods above.
00069     FV_View *                   m_pView;
00070     static const char *               s_pJumpTargets[];
00071 
00072     // is this used in a modeless dialog like this?
00073     tAnswer                     m_answer;
00074     char                        m_WindowName[100];
00075     void                        _setupJumpTargets();
00076 };
00077 
00078 #endif /* AP_DIALOG_GOTO_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1