00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef INPUTDIALOG_HH_
00017 #define INPUTDIALOG_HH_
00018
00019 #include "pglineedit.h"
00020
00021 #include "paragui.h"
00022 #include "pglabel.h"
00023 #include "pgwindow.h"
00024 #include "pgrichedit.h"
00025 #include "pgbutton.h"
00026
00027 class DECLSPEC InputDialog : public PG_Window
00028 {
00029 public:
00044 InputDialog(PG_Widget* parent,
00045 const PG_Rect& r, const char* windowtitle,
00046 const char* windowtext,
00047 const PG_Rect& btn1, const char* btn1text,
00048 const PG_Rect& btn2, const char* btn2text,
00049 const PG_Rect& ledit, const char* lEditText,
00050 PG_Label::TextAlign textalign = PG_Label::CENTER,
00051 const char* style="MessageBox");
00052
00053 virtual ~InputDialog();
00054
00055 void LoadThemeStyle(const char* widgettype);
00056
00061 inline int WaitForClick() {
00062 return RunModal();
00063 }
00064
00065 const char* getText();
00066
00067 protected:
00072 virtual bool handleButton(PG_Button* button);
00073
00074 PG_Button* btnok_;
00075 PG_Button* btncancel_;
00076
00077 private:
00078 PG_LineEdit* lineEdit_;
00079 PG_RichEdit* textbox_;
00080 int msgalign_;
00081
00082 void Init(const char* windowtext, int textalign, const char* style) ;
00083 };
00084
00085 #endif