1 /* 2 ** Copyright 2003, Double Precision Inc. 3 ** 4 ** See COPYING for distribution information. 5 */ 6 7 #ifndef outputdialog_h 8 #define outputdialog_h 9 10 #include "config.h" 11 #include "curses/cursescontainer.H" 12 #include "curses/cursesbutton.H" 13 #include "curses/cursesmainscreen.H" 14 15 ////////////////////////////////////////////////////////////////////////// 16 // 17 // A dialog box that shows captured output of a subprocess. Currently 18 // used to provide play-by-play of gpg --gen-key 19 // 20 21 class OutputDialog : public CursesContainer { 22 23 std::vector<std::string> buf; 24 25 CursesButtonRedirect<OutputDialog> okButton; 26 27 void close(); 28 void draw(); 29 30 public: 31 OutputDialog(CursesMainScreen *parent); 32 ~OutputDialog(); 33 34 int getWidth() const; 35 int getHeight() const; 36 bool isDialog() const; 37 bool processKeyInFocus(const Key &key); 38 39 void output(std::string); 40 private: 41 bool partialLine; 42 43 void outputLine(std::string); 44 public: 45 void outputDone(); 46 }; 47 48 #endif 49