libyui
 
Loading...
Searching...
No Matches
YInputField.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YInputField.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25#ifndef YInputField_h
26#define YInputField_h
27
28#include <string>
29#include "YWidget.h"
30
32
33
34
46class YInputField : public YWidget
47{
48protected:
56 const std::string & label,
57 bool passwordMode = false );
58
59public:
63 virtual ~YInputField();
64
69 virtual const char * widgetClass() const;
70
77 virtual std::string value() = 0;
78
85 virtual void setValue( const std::string & text ) = 0;
86
90 std::string label() const;
91
98 virtual void setLabel( const std::string & label );
99
106 bool passwordMode() const;
107
112 std::string validChars();
113
121 virtual void setValidChars( const std::string & validChars );
122
127 int inputMaxLength() const;
128
136 virtual void setInputMaxLength( int numberOfChars );
137
141 bool shrinkable() const;
142
150 virtual void setShrinkable( bool shrinkable = true );
151
162 virtual bool setProperty( const std::string & propertyName,
163 const YPropertyValue & val );
164
171 virtual YPropertyValue getProperty( const std::string & propertyName );
172
179 virtual const YPropertySet & propertySet();
180
186 virtual std::string shortcutString() const { return label(); }
187
193 virtual void setShortcutString( const std::string & str )
194 { setLabel( str ); }
195
200 const char * userInputProperty() { return YUIProperty_Value; }
201
207 virtual void saveUserInput( YMacroRecorder *macroRecorder );
208
209private:
210
212};
213
214
215#endif // YInputField_h
Definition ImplPtr.h:43
virtual std::string shortcutString() const
Definition YInputField.h:186
std::string label() const
Definition YInputField.cc:71
std::string validChars()
Definition YInputField.cc:102
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Definition YInputField.cc:151
virtual YPropertyValue getProperty(const std::string &propertyName)
Definition YInputField.cc:169
virtual const YPropertySet & propertySet()
Definition YInputField.cc:127
virtual void setValue(const std::string &text)=0
virtual void setValidChars(const std::string &validChars)
Definition YInputField.cc:108
virtual void setShrinkable(bool shrinkable=true)
Definition YInputField.cc:95
YInputField(YWidget *parent, const std::string &label, bool passwordMode=false)
Definition YInputField.cc:54
virtual void saveUserInput(YMacroRecorder *macroRecorder)
Definition YInputField.cc:185
virtual const char * widgetClass() const
Definition YInputField.cc:195
virtual std::string value()=0
const char * userInputProperty()
Definition YInputField.h:200
virtual void setInputMaxLength(int numberOfChars)
Definition YInputField.cc:120
virtual void setLabel(const std::string &label)
Definition YInputField.cc:77
bool shrinkable() const
Definition YInputField.cc:89
bool passwordMode() const
Definition YInputField.cc:83
int inputMaxLength() const
Definition YInputField.cc:114
virtual ~YInputField()
Definition YInputField.cc:65
virtual void setShortcutString(const std::string &str)
Definition YInputField.h:193
Definition YMacroRecorder.h:39
Definition YProperty.h:198
Definition YProperty.h:105
YWidget(YWidget *parent)
Definition YWidget.cc:106
YWidget * parent() const
Definition YWidget.cc:277
Definition YInputField.cc:37