Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

NCPopupInfo.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013    File:       NCPopupInfo.h
00014 
00015    Author:     Gabriele Strattner <gs@suse.de>
00016    Maintainer: Michael Andres <ma@suse.de>
00017 
00018 /-*/
00019 #ifndef NCPopupInfo_h
00020 #define NCPopupInfo_h
00021 
00022 #include <iosfwd>
00023 
00024 #include <vector>
00025 #include <string>
00026 
00027 #include "NCPopup.h"
00028 #include "NCComboBox.h"
00029 #include "NCLabel.h"
00030 #include "NCRichText.h"
00031 #include "NCCheckBox.h"
00032 #include "NCPushButton.h"
00033 #include "PkgNames.h"
00034 
00035 class YCPValue;
00036 
00038 //
00039 //      CLASS NAME : NCPopupInfo
00040 //
00041 //      DESCRIPTION :
00042 //
00043 class NCPopupInfo : public NCPopup {
00044 
00045     NCPopupInfo & operator=( const NCPopupInfo & );
00046     NCPopupInfo            ( const NCPopupInfo & );
00047 
00048 private:
00049 
00050     NCRichText * helpText;
00051     NCPushButton * okButton;
00052     NCPushButton * cancelButton;
00053     
00054     int hDim;
00055     int vDim;
00056     bool visible;
00057     
00058 protected:
00059 
00060     virtual bool postAgain();
00061 
00062     virtual NCursesEvent wHandleInput( wint_t ch );
00063     
00064 public:
00065     
00066     NCPopupInfo( const wpos at,
00067                  const YCPString & headline,
00068                  const YCPString & text,
00069                  string okButtonLabel = PkgNames::OKLabel(),
00070                  string cancelButtonLabel = "" );
00071     
00072     virtual ~NCPopupInfo();
00073 
00074     virtual long nicesize(YUIDimension dim);
00075 
00076     void createLayout( const YCPString & headline,
00077                        const YCPString & text,
00078                        string okButtonLabel,
00079                        string cancelButtonLabel );
00080 
00081     NCursesEvent & showInfoPopup( );
00082 
00083     void popup( );
00084 
00085     void popdown( ); 
00086 
00087     bool isVisible( ) { return visible; }
00088     
00089     void setNiceSize( int horiz, int vert ) { hDim = horiz; vDim = vert; }
00090 };
00091 
00093 
00094 
00095 #endif // NCPopupInfo_h

Generated on Wed Nov 12 04:52:32 2008 for yast2-ncurses by  doxygen 1.3.9.1