00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | __ __ ____ _____ ____ | 00004 | \ \ / /_ _/ ___|_ _|___ \ | 00005 | \ V / _` \___ \ | | __) | | 00006 | | | (_| |___) || | / __/ | 00007 | |_|\__,_|____/ |_| |_____| | 00008 | | 00009 | core system | 00010 | (C) SuSE GmbH | 00011 \----------------------------------------------------------------------/ 00012 00013 File: YCheckBoxFrame.h 00014 00015 Author: Stefan Hundhammer <sh@suse.de> 00016 Maintainer: Stefan Hundhammer <sh@suse.de> 00017 00018 /-*/ 00019 00020 #ifndef YCheckBoxFrame_h 00021 #define YCheckBoxFrame_h 00022 00023 #include <ycp/YCPString.h> 00024 #include "YContainerWidget.h" 00025 00029 class YCheckBoxFrame : public YContainerWidget 00030 { 00031 public: 00035 YCheckBoxFrame( const YWidgetOpt & opt, const YCPString & label ); 00036 00041 virtual char *widgetClass() { return "YCheckBoxFrame"; } 00042 00046 YCPValue changeWidget( const YCPSymbol & property, const YCPValue & newvalue ); 00047 00051 YCPValue queryWidget( const YCPSymbol & property ); 00052 00057 virtual void setLabel( const YCPString & label ); 00058 00062 YCPString getLabel(); 00063 00067 virtual void setValue( bool checked ) = 0; 00068 00072 virtual bool getValue() = 0; 00073 00078 const char *shortcutProperty() { return YUIProperty_Label; } 00079 00084 const char *userInputProperty() { return YUIProperty_Value; } 00085 00091 bool autoEnable() const { return _autoEnable; } 00092 00098 bool invertAutoEnable() const { return _invertAutoEnable; } 00099 00111 void handleChildrenEnablement( bool isChecked ); 00112 00113 00114 private: 00115 00121 virtual void saveUserInput( YMacroRecorder *macroRecorder ); 00122 00123 // 00124 // Data members 00125 // 00126 00127 YCPString _label; 00128 bool _value; 00129 bool _autoEnable; 00130 bool _invertAutoEnable; 00131 }; 00132 00133 00134 #endif // YCheckBoxFrame_h 00135
1.5.3