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

NCRadioButton.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:       NCRadioButton.h
00014 
00015    Author:     Michael Andres <ma@suse.de>
00016    Maintainer: Michael Andres <ma@suse.de>
00017 
00018 /-*/
00019 #ifndef NCRadioButton_h
00020 #define NCRadioButton_h
00021 
00022 #include <iosfwd>
00023 
00024 #include "YRadioButton.h"
00025 #include "NCWidget.h"
00026 
00027 class NCRadioButton;
00028 
00030 //
00031 //      CLASS NAME : NCRadioButton
00032 //
00033 //      DESCRIPTION :
00034 //
00035 class NCRadioButton : public YRadioButton, public NCWidget {
00036 
00037   friend std::ostream & operator<<( std::ostream & STREAM, const NCRadioButton & OBJ );
00038 
00039   NCRadioButton & operator=( const NCRadioButton & );
00040   NCRadioButton            ( const NCRadioButton & );
00041 
00042   private:
00043 
00044     bool     checked;
00045     NClabel  label;
00046 
00047   protected:
00048 
00049     virtual const char * location() const { return "NCRadioButton"; }
00050 
00051     virtual void setValue( const bool & checked );
00052 
00053     virtual void wRedraw();
00054 
00055   public:
00056 
00057     NCRadioButton( NCWidget * parent, const YWidgetOpt & opt,
00058                    YRadioButtonGroup * rbg,
00059                    const YCPString & label,
00060                    bool checked );
00061     virtual ~NCRadioButton();
00062 
00063     virtual long nicesize( YUIDimension dim );
00064     virtual void setSize( long newwidth, long newheight );
00065 
00066     virtual void setLabel( const YCPString & nlabel );
00067     virtual void setValue( const YCPBoolean & newval );
00068 
00069     virtual YCPBoolean getValue();
00070 
00071     virtual NCursesEvent wHandleInput( wint_t key );
00072 
00073     virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
00074 
00075     virtual bool setKeyboardFocus() {
00076       if ( !grabFocus() )
00077         return YWidget::setKeyboardFocus();
00078       return true;
00079     }
00080 };
00081 
00083 
00084 #endif // NCRadioButton_h

Generated on Wed Sep 5 17:18:55 2007 for yast2-ncurses by doxygen 1.3.6