libyui

/data/gitorious.org/libyui/libyui-master/src/YCheckBoxFrame.h

00001 /**************************************************************************
00002 Copyright (C) 2000 - 2010 Novell, Inc.
00003 All Rights Reserved.
00004 
00005 This program is free software; you can redistribute it and/or modify
00006 it under the terms of the GNU General Public License as published by
00007 the Free Software Foundation; either version 2 of the License, or
00008 (at your option) any later version.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License along
00016 with this program; if not, write to the Free Software Foundation, Inc.,
00017 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00018 
00019 **************************************************************************/
00020 
00021 
00022 /*---------------------------------------------------------------------\
00023 |                                                                      |
00024 |                      __   __    ____ _____ ____                      |
00025 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00026 |                       \ V / _` \___ \ | |   __) |                    |
00027 |                        | | (_| |___) || |  / __/                     |
00028 |                        |_|\__,_|____/ |_| |_____|                    |
00029 |                                                                      |
00030 |                               core system                            |
00031 |                                                        (C) SuSE GmbH |
00032 \----------------------------------------------------------------------/
00033 
00034   File:         YCheckBoxFrame.h
00035 
00036   Author:       Stefan Hundhammer <sh@suse.de>
00037 
00038 /-*/
00039 
00040 #ifndef YCheckBoxFrame_h
00041 #define YCheckBoxFrame_h
00042 
00043 #include <string>
00044 #include "YSingleChildContainerWidget.h"
00045 #include "ImplPtr.h"
00046 
00047 using std::string;
00048 class YCheckBoxFramePrivate;
00049 
00050 
00051 class YCheckBoxFrame : public YSingleChildContainerWidget
00052 {
00053 public:
00057     YCheckBoxFrame( YWidget *           parent,
00058                     const string &      label,
00059                     bool                checked );
00060 
00064     virtual ~YCheckBoxFrame();
00065 
00070     virtual const char * widgetClass() const { return "YCheckBoxFrame"; }
00071 
00075     string label() const;
00076 
00083     virtual void setLabel( const string & label );
00084 
00090     virtual void setValue( bool isChecked ) = 0;
00091 
00097     virtual bool value() = 0;
00098 
00103     bool autoEnable() const;
00104 
00111     virtual void setAutoEnable( bool autoEnable );
00112 
00117     bool invertAutoEnable() const;
00118 
00125     virtual void setInvertAutoEnable( bool invertAutoEnable );
00126     
00138     void handleChildrenEnablement( bool isChecked );
00139 
00145     virtual string shortcutString() const { return label(); }
00146 
00152     virtual void setShortcutString( const string & str )
00153         { setLabel( str ); }
00154 
00159     const char * userInputProperty() { return YUIProperty_Value; }
00160 
00174     virtual bool setProperty( const string & propertyName,
00175                               const YPropertyValue & val );
00176 
00184     virtual YPropertyValue getProperty( const string & propertyName );
00185 
00192     virtual const YPropertySet & propertySet();
00193 
00194 private:
00195 
00196     ImplPtr<YCheckBoxFramePrivate> priv;
00197 };
00198 
00199 
00200 #endif // YCheckBoxFrame_h
00201 
 All Classes Functions Variables Enumerations Friends