YMultiSelectionBox.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:       YSelectionBox.h
00014 
00015   Author:     Stefan Hundhammer <sh@suse.de>
00016 
00017 /-*/
00018 
00019 #ifndef YMultiSelectionBox_h
00020 #define YMultiSelectionBox_h
00021 
00022 #include "YSelectionWidget.h"
00023 #include <ycp/YCPString.h>
00024 #include <ycp/YCPList.h>
00025 #include <ycp/YCPVoid.h>
00026 
00027 class YMacroRecorder;
00028 
00032 class YMultiSelectionBox : public YSelectionWidget
00033 {
00034 public:
00035 
00041     YMultiSelectionBox( const YWidgetOpt & opt, YCPString label );
00042 
00047     virtual char *widgetClass() { return "YMultiSelectionBox"; }
00048 
00052     YCPValue changeWidget( const YCPSymbol & property, const YCPValue & newvalue );
00053 
00057     YCPValue queryWidget( const YCPSymbol & property );
00058 
00063     const char *userInputProperty() { return YUIProperty_SelectedItems; }
00064     
00065     
00066 protected:
00072     virtual bool itemIsSelected( int index ) = 0;
00073 
00079     virtual void selectItem( int index ) = 0;
00080 
00086     virtual void deselectAllItems() = 0;
00087 
00093     virtual int getCurrentItem() = 0;
00094 
00100     virtual void setCurrentItem( int index ) = 0;
00101 
00102 private:
00108     virtual void saveUserInput( YMacroRecorder *macroRecorder );
00109 };
00110 
00111 
00112 #endif // YMultiSelectionBox_h

Generated on Fri Jun 16 18:07:45 2006 for yast2-core by  doxygen 1.4.6