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

NCSelectionBox.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:       NCSelectionBox.h
00014 
00015    Author:     Michael Andres <ma@suse.de>
00016    Maintainer: Michael Andres <ma@suse.de>
00017 
00018 /-*/
00019 #ifndef NCSelectionBox_h
00020 #define NCSelectionBox_h
00021 
00022 #include <iosfwd>
00023 
00024 #include "YSelectionBox.h"
00025 #include "NCPadWidget.h"
00026 #include "NCTablePad.h"
00027 
00028 class NCSelectionBox;
00029 
00031 //
00032 //      CLASS NAME : NCSelectionBox
00033 //
00034 //      DESCRIPTION :
00035 //
00036 class NCSelectionBox : public YSelectionBox, public NCPadWidget {
00037 
00038   friend std::ostream & operator<<( std::ostream & STREAM, const NCSelectionBox & OBJ );
00039 
00040   NCSelectionBox & operator=( const NCSelectionBox & );
00041   NCSelectionBox            ( const NCSelectionBox & );
00042 
00043   protected:
00044 
00045     NCTablePad *& pad;
00046     bool          biglist;
00047     bool          immediate;
00048     
00049   protected:
00050 
00051     virtual const char * location() const { return "NCSelectionBox"; }
00052 
00053     virtual NCPad * CreatePad();
00054     virtual void    wRecoded();
00055 
00056   public:
00057 
00058     NCSelectionBox( NCWidget * parent, const YWidgetOpt & opt,
00059                     const YCPString & label );
00060     virtual ~NCSelectionBox();
00061 
00062     bool bigList() const { return biglist; }
00063     void setBigList( const bool big ) { biglist = big; }
00064 
00065     virtual void itemAdded( const YCPString& string, int index, bool selected );
00066     virtual long nicesize( YUIDimension dim );
00067     virtual void setSize( long newwidth, long newheight );
00068 
00069     virtual void setLabel( const YCPString & nlabel );
00070 
00071     virtual int getCurrentItem();
00072     virtual void setCurrentItem( int index );
00073 
00074     virtual NCursesEvent wHandleInput( wint_t key );
00075 
00076     virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
00077 
00078     virtual bool setKeyboardFocus() {
00079       if ( !grabFocus() )
00080         return YWidget::setKeyboardFocus();
00081       return true;
00082     }
00083 
00084     string getLine(const int & index );
00085     void clearTable( ) { pad->ClearTable(); };
00086 };
00087 
00089 
00090 #endif // NCSelectionBox_h

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