YTextEntry.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:       YTextEntry.h
00014 
00015   Author:     Mathias Kettner <kettner@suse.de>
00016   Maintainer: Stefan Hundhammer <sh@suse.de>
00017 
00018 /-*/
00019 
00020 #ifndef YTextEntry_h
00021 #define YTextEntry_h
00022 
00023 #include "YWidget.h"
00024 #include <ycp/YCPString.h>
00025 
00026 class YMacroRecorder;
00027 
00032 class YTextEntry : public YWidget
00033 {
00034 public:
00038     YTextEntry( const YWidgetOpt & opt, const YCPString & label );
00039 
00044     virtual char *widgetClass() { return "YTextEntry"; }
00045 
00046 
00051     YCPValue changeWidget( const YCPSymbol & property, const YCPValue & newvalue );
00052 
00056     YCPValue queryWidget( const YCPSymbol & property );
00057 
00061     virtual void setText( const YCPString & text ) = 0;
00062 
00066     virtual YCPString getText() = 0;
00067 
00072     virtual void setLabel( const YCPString & label );
00073 
00080     YCPString getLabel();
00081 
00088     virtual void setValidChars( const YCPString & validChars );
00089 
00095     virtual void setInputMaxLength( const YCPInteger & numberOfChars );
00096 
00100     YCPString getValidChars();
00101 
00106     const char *shortcutProperty() { return YUIProperty_Label; }
00107     
00112     const char *userInputProperty() { return YUIProperty_Value; }
00113 
00118     bool passwordMode() const { return _passwordMode; }
00119 
00120 
00121 protected:
00122 
00126     YCPString label;
00127 
00131     YCPString validChars;
00132 
00136     bool _passwordMode;
00137 
00138 
00139 private:
00140 
00146     virtual void saveUserInput( YMacroRecorder *macroRecorder );
00147 };
00148 
00149 
00150 #endif // YTextEntry_h

Generated on Fri Jun 16 18:07:45 2006 for yast2-core by  doxygen 1.4.6