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

ap_Dialog_MetaData.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 2002 Dom Lachowicz
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_METADATA_H
00021 #define AP_DIALOG_METADATA_H
00022 
00023 #include "xap_Frame.h"
00024 #include "xap_Dialog.h"
00025 #include "xav_View.h"
00026 
00027 class XAP_Frame;
00028 
00029 #define DCL_PROP(name) \
00030 public: \
00031  void set##name(const std::string & val) { m_##name = val ; }   \
00032  const std::string & get##name() const { return m_##name ; }        \
00033 private: std::string m_##name ;
00034 
00035 class ABI_EXPORT AP_Dialog_MetaData : public XAP_Dialog_NonPersistent
00036 {
00037 public:
00038     AP_Dialog_MetaData(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id dlgid)
00039       : XAP_Dialog_NonPersistent ( pDlgFactory, dlgid, "interface/dialogproperties" ), m_answer ( a_CANCEL )
00040       {
00041       }
00042 
00043     virtual ~AP_Dialog_MetaData()
00044       {
00045       }
00046 
00047     virtual void    runModal(XAP_Frame * pFrame) = 0;
00048 
00049     typedef enum { a_OK, a_CANCEL } tAnswer;
00050 
00051     AP_Dialog_MetaData::tAnswer     getAnswer(void) const
00052       {
00053         return m_answer ;
00054       }
00055 
00056     DCL_PROP(Title)
00057     DCL_PROP(Subject)
00058     DCL_PROP(Author)
00059     DCL_PROP(Publisher)
00060     DCL_PROP(CoAuthor)
00061     DCL_PROP(Category)
00062     DCL_PROP(Keywords)
00063     DCL_PROP(Languages)
00064     DCL_PROP(Description)
00065     DCL_PROP(Source)
00066     DCL_PROP(Relation)
00067     DCL_PROP(Coverage)
00068     DCL_PROP(Rights)
00069 
00070  protected:
00071 
00072     void setAnswer ( AP_Dialog_MetaData::tAnswer a )
00073       {
00074         m_answer = a ;
00075       }
00076 
00077  private:
00078 
00079     AP_Dialog_MetaData::tAnswer     m_answer;
00080 };
00081 
00082 #undef DCL_PROP
00083 
00084 #endif /* AP_DIALOG_STUB_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1