InputDialog.hh

00001 /*
00002 ** TowBowlTactics, an adaptation of the tabletop game Blood Bowl.
00003 ** 
00004 ** Copyright (C) 2006 The TBT Team.
00005 ** 
00006 ** This program is free software; you can redistribute it and/or
00007 ** modify it under the terms of the GNU General Public License
00008 ** as published by the Free Software Foundation; either version 2
00009 ** of the License, or (at your option) any later version.
00010 ** 
00011 ** The complete GNU General Public Licence Notice can be found as the
00012 ** `NOTICE' file in the root directory.
00013 ** 
00014 ** The TBT Team consists of people listed in the `AUTHORS' file.
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 /*INPUTDIALOG_HH_*/

Generated on Sat Jun 23 16:07:23 2007 for Stechec/TBT by  doxygen 1.4.7