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: Mathias Kettner <kettner@suse.de> 00016 Maintainer: Stefan Hundhammer <sh@suse.de> 00017 00018 /-*/ 00019 00020 #ifndef YSelectionBox_h 00021 #define YSelectionBox_h 00022 00023 #include "YSelectionWidget.h" 00024 #include <ycp/YCPString.h> 00025 #include <ycp/YCPList.h> 00026 00027 class YMacroRecorder; 00028 00032 class YSelectionBox : public YSelectionWidget 00033 { 00034 public: 00035 00041 YSelectionBox( const YWidgetOpt & opt, YCPString label ); 00042 00047 virtual char *widgetClass() { return "YSelectionBox"; } 00048 00052 YCPValue changeWidget( const YCPSymbol & property, const YCPValue & newvalue ); 00053 00057 YCPValue queryWidget( const YCPSymbol & property ); 00058 00063 const char *userInputProperty() { return YUIProperty_CurrentItem; } 00064 00065 00066 protected: 00071 virtual int getCurrentItem() = 0; 00072 00076 virtual void setCurrentItem( int index ) = 0; 00077 00078 00079 private: 00085 virtual void saveUserInput( YMacroRecorder *macroRecorder ); 00086 }; 00087 00088 00089 #endif // YSelectionBox_h