libyui

/data/gitorious.org/libyui/libyui-master/src/YMultiLineEdit.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 |                       \ V / _` \___ \ | |   __) |                    |
00026 |                        | | (_| |___) || |  / __/                     |
00027 |                        |_|\__,_|____/ |_| |_____|                    |
00028 |                                                                      |
00029 |                               core system                            |
00030 |                                                        (C) SuSE GmbH |
00031 \----------------------------------------------------------------------/
00032 
00033   File:         YMultiLineEdit.h
00034 
00035   Author:       Stefan Hundhammer <sh@suse.de>
00036 
00037 /-*/
00038 
00039 #ifndef YMultiLineEdit_h
00040 #define YMultiLineEdit_h
00041 
00042 #include "YWidget.h"
00043 
00044 class YMultiLineEditPrivate;
00045 
00046 
00047 class YMultiLineEdit : public YWidget
00048 {
00049 protected:
00053     YMultiLineEdit( YWidget * parent, const string & label );
00054 
00055 public:
00059     virtual ~YMultiLineEdit();
00060 
00065     virtual const char * widgetClass() const { return "YMultiLineEdit"; }
00066 
00073     virtual string value() = 0;
00074 
00081     virtual void setValue( const string & text ) = 0;
00082 
00086     string label() const;
00087 
00094     virtual void setLabel( const string & label );
00095 
00100     int inputMaxLength() const;
00101 
00109     virtual void setInputMaxLength( int numberOfChars );
00110 
00118     int defaultVisibleLines() const;
00119 
00137     virtual void setDefaultVisibleLines( int newVisibleLines );
00138 
00149     virtual bool setProperty( const string & propertyName,
00150                               const YPropertyValue & val );
00151 
00158     virtual YPropertyValue getProperty( const string & propertyName );
00159 
00166     virtual const YPropertySet & propertySet();
00167 
00173     virtual string shortcutString() const { return label(); }
00174 
00180     virtual void setShortcutString( const string & str )
00181         { setLabel( str ); }
00182 
00187     const char * userInputProperty() { return YUIProperty_Value; }
00188 
00189 
00190 private:
00191 
00192     ImplPtr<YMultiLineEditPrivate> priv;
00193 };
00194 
00195 
00196 #endif // YMultiLineEdit_h
 All Classes Functions Variables Enumerations Friends