Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _DIALOGBOX_H
00024 #define _DIALOGBOX_H
00025
00026 #ifdef HAVE_CONFIG_H
00027 # include <config.h>
00028 #endif
00029
00030 #ifdef HAVE_NCURSES_H
00031 # include <ncurses.h>
00032 #else // HAVE_NCURSES_H
00033 # ifdef HAVE_CURSES_H
00034 # include <curses.h>
00035 # else
00036 # error "Neither curses.h nor ncurses.h available"
00037 # endif // HAVE_CURSES_H
00038 #endif // HAVE_NCURSES_H
00039 #include "curswa.h"
00040
00041 #ifdef HAVE_STRING
00042 # include <string>
00043 #endif
00044
00045 #include "messagebox.h"
00046
00047 namespace YAPET {
00048 namespace UI {
00055 enum ANSWER {
00059 ANSWER_OK,
00063 ANSWER_CANCEL
00064 };
00065
00075 class DialogBox : public MessageBox {
00076 private:
00077 Button* cancelbutton;
00078 ANSWER answer;
00079
00080 public:
00081 DialogBox (std::string t, std::string m) throw (UIException);
00082 virtual ~DialogBox();
00083
00093 virtual int run() throw (UIException) ;
00094 virtual void resize() throw (UIException);
00095 virtual void refresh() throw (UIException);
00105 ANSWER getAnswer() const {
00106 return answer;
00107 }
00108 };
00109
00110 }
00111 }
00112 #endif // _DIALOGBOX_H