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

ap_Dialog_GenericInput.h

Go to the documentation of this file.
00001 /* Copyright (C) 2008 AbiSource Corporation B.V.
00002  *
00003  * This program is free software; you can redistribute it and/or
00004  * modify it under the terms of the GNU General Public License
00005  * as published by the Free Software Foundation; either version 2
00006  * of the License, or (at your option) any later version.
00007  *
00008  * This program is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011  * GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program; if not, write to the Free Software
00015  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00016  * 02110-1301 USA.
00017  */
00018 
00019 #ifndef AP_DIALOG_GENERICINPUT_H
00020 #define AP_DIALOG_GENERICINPUT_H
00021 
00022 #include "ut_types.h"
00023 #include "xap_Dialog.h"
00024 
00025 extern pt2Constructor ap_Dialog_GenericInput_Constructor;
00026 
00027 class AP_Dialog_GenericInput : public XAP_Dialog_NonPersistent
00028 {
00029 public:
00030     AP_Dialog_GenericInput(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
00031     virtual ~AP_Dialog_GenericInput(void);
00032 
00033     virtual void                    runModal(XAP_Frame * pFrame) = 0;
00034 
00035     // functions related to password style input
00036     bool                            isPassword()
00037         { return m_bIsPassword; }
00038     void                            setPassword(bool bIsPassword)
00039         { m_bIsPassword = bIsPassword; }
00040 
00041     // messages to display
00042     void                            setTitle(const UT_UTF8String& sTitle)
00043         { m_sTitle = sTitle; }
00044 
00045     const UT_UTF8String&            getTitle()
00046         { return m_sTitle; }
00047 
00048     void                            setQuestion(const UT_UTF8String& sQuestion)
00049         { m_sQuestion = sQuestion; }
00050 
00051     const UT_UTF8String&            getQuestion()
00052         { return m_sQuestion; }
00053 
00054     void                            setLabel(const UT_UTF8String& sLabel)
00055         { m_sLabel = sLabel; }
00056 
00057     const UT_UTF8String&            getLabel()
00058         { return m_sLabel; }
00059 
00060     void                            setMinLenght(UT_uint32 iMinLength)
00061         { m_iMinLength = iMinLength; }
00062 
00063     UT_uint32                       getMinLenght()
00064         { return m_iMinLength; }
00065 
00066     typedef enum { a_OK, a_CANCEL } tAnswer;
00067 
00068     AP_Dialog_GenericInput::tAnswer getAnswer(void) const
00069         { return m_answer; }
00070 
00071     void                            setInput(const UT_UTF8String& sInput)
00072         { m_input = sInput; }
00073 
00074     const UT_UTF8String&            getInput() const
00075         { return m_input; }
00076 
00077 protected:
00078 
00079     AP_Dialog_GenericInput::tAnswer m_answer;
00080 
00081 private:
00082     UT_UTF8String       m_sTitle;
00083     UT_UTF8String       m_sQuestion;
00084     UT_UTF8String       m_sLabel;
00085     UT_uint32           m_iMinLength;
00086     bool                m_bIsPassword;
00087     UT_UTF8String       m_input;
00088 };
00089 
00090 #endif /* AP_DIALOG_GENERICINPUT_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1