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
31
class
YInputFieldPrivate
;
32
33
34
46
class
YInputField
:
public
YWidget
47
{
48
protected
:
55
YInputField
(
YWidget
*
parent
,
56
const
std::string &
label
,
57
bool
passwordMode
=
false
);
58
59
public
:
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
209
private
:
210
211
ImplPtr<YInputFieldPrivate>
priv;
212
};
213
214
215
#endif
// YInputField_h
TreeItem
Definition
TreeItem.h:41
YInputField
Definition
YInputField.h:47
YInputField::shortcutString
virtual std::string shortcutString() const
Definition
YInputField.h:186
YInputField::label
std::string label() const
Definition
YInputField.cc:71
YInputField::validChars
std::string validChars()
Definition
YInputField.cc:102
YInputField::setProperty
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Definition
YInputField.cc:151
YInputField::getProperty
virtual YPropertyValue getProperty(const std::string &propertyName)
Definition
YInputField.cc:169
YInputField::propertySet
virtual const YPropertySet & propertySet()
Definition
YInputField.cc:127
YInputField::setValue
virtual void setValue(const std::string &text)=0
YInputField::setValidChars
virtual void setValidChars(const std::string &validChars)
Definition
YInputField.cc:108
YInputField::setShrinkable
virtual void setShrinkable(bool shrinkable=true)
Definition
YInputField.cc:95
YInputField::YInputField
YInputField(YWidget *parent, const std::string &label, bool passwordMode=false)
Definition
YInputField.cc:54
YInputField::saveUserInput
virtual void saveUserInput(YMacroRecorder *macroRecorder)
Definition
YInputField.cc:185
YInputField::widgetClass
virtual const char * widgetClass() const
Definition
YInputField.cc:195
YInputField::value
virtual std::string value()=0
YInputField::userInputProperty
const char * userInputProperty()
Definition
YInputField.h:200
YInputField::setInputMaxLength
virtual void setInputMaxLength(int numberOfChars)
Definition
YInputField.cc:120
YInputField::setLabel
virtual void setLabel(const std::string &label)
Definition
YInputField.cc:77
YInputField::shrinkable
bool shrinkable() const
Definition
YInputField.cc:89
YInputField::passwordMode
bool passwordMode() const
Definition
YInputField.cc:83
YInputField::inputMaxLength
int inputMaxLength() const
Definition
YInputField.cc:114
YInputField::~YInputField
virtual ~YInputField()
Definition
YInputField.cc:65
YInputField::setShortcutString
virtual void setShortcutString(const std::string &str)
Definition
YInputField.h:193
YMacroRecorder
Definition
YMacroRecorder.h:39
YPropertySet
Definition
YProperty.h:198
YPropertyValue
Definition
YProperty.h:105
YWidget
Definition
YWidget.h:55
YWidget::parent
YWidget * parent() const
Definition
YWidget.cc:277
YInputFieldPrivate
Definition
YInputField.cc:37
src
YInputField.h
Generated by
1.10.0