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

ap_Dialog_InsertBookmark.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (c) 2001,2002 Tomas Frydrych
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_DIALOG_INSERTBOOKMARK_H
00021 #define AP_DIALOG_INSERTBOOKMARK_H
00022 
00023 #include "ap_Dialog_Modal.h"
00024 #include "pd_Document.h"
00025 #include "ut_xml.h"
00026 #include "ut_string.h"
00027 #include "ut_string_class.h"
00028 
00029 #define BOOKMARK_SIZE_LIMIT 30
00030 class XAP_Frame;
00031 
00032 class ABI_EXPORT AP_Dialog_InsertBookmark : public AP_Dialog_Modal
00033 {
00034 public:
00035     AP_Dialog_InsertBookmark( XAP_DialogFactory * pDlgFactory,
00036                               XAP_Dialog_Id id );
00037     virtual ~AP_Dialog_InsertBookmark(void);
00038 
00039     virtual void         runModal(XAP_Frame * pFrame) = 0;
00040 
00041     typedef enum { a_OK=0, a_CANCEL=1, a_DELETE=2 } tAnswer;
00042 
00043     tAnswer             getAnswer(void) const;
00044     void                setAnswer(tAnswer a);
00045     UT_sint32           getExistingBookmarksCount() const;
00046     const std::string & getNthExistingBookmark(UT_uint32 n) const;
00047     const gchar *   getBookmark() const;
00048     void                setBookmark(const gchar * mark);
00049     void                setDoc(FV_View * pView);
00050 
00051     void setSuggestedBM(const UT_UCS4Char * str)
00052       {
00053         if (str)
00054           m_suggested = str;
00055         else
00056           m_suggested.clear ();
00057       }
00058 
00059     UT_UCS4String getSuggestedBM () const
00060       {
00061         return m_suggested;
00062       }
00063 
00064 private:
00065     PD_Document *       m_pDoc;
00066 
00067     UT_UCS4String m_suggested;
00068 
00069     AP_Dialog_InsertBookmark::tAnswer   m_answer;
00070     gchar           m_pBookmark[BOOKMARK_SIZE_LIMIT + 1];
00071 };
00072 
00073 #endif /* AP_DIALOG_TOGGLECASE_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1