libyui

/data/gitorious.org/libyui/libyui-master/src/YSimpleInputField.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:         YSimpleInputField.h
00035 
00036   Author:       Stefan Hundhammer <sh@suse.de>
00037 
00038 /-*/
00039 
00040 #ifndef YSimpleInputField_h
00041 #define YSimpleInputField_h
00042 
00043 #include "YWidget.h"
00044 
00045 class YSimpleInputFieldPrivate;
00046 
00047 
00052 class YSimpleInputField : public YWidget
00053 {
00054 protected:
00058     YSimpleInputField( YWidget * parent, const string & label );
00059 
00060 public:
00064     virtual ~YSimpleInputField();
00065     
00072     virtual string value() = 0;
00073 
00080     virtual void setValue( const string & text ) = 0;
00081 
00085     string label() const;
00086 
00093     virtual void setLabel( const string & label );
00094 
00105     virtual bool setProperty( const string & propertyName,
00106                               const YPropertyValue & val );
00107 
00114     virtual YPropertyValue getProperty( const string & propertyName );
00115 
00122     virtual const YPropertySet & propertySet();
00123 
00129     virtual string shortcutString() const { return label(); }
00130 
00136     virtual void setShortcutString( const string & str )
00137         { setLabel( str ); }
00138 
00143     const char * userInputProperty() { return YUIProperty_Value; }
00144 
00145 
00146 private:
00147     
00148     ImplPtr<YSimpleInputFieldPrivate> priv;
00149 };
00150 
00151 
00152 #endif // YSimpleInputField_h
 All Classes Functions Variables Enumerations Friends