libyui
YMultiLineEdit.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: YMultiLineEdit.h
20 
21  Author: Stefan Hundhammer <shundhammer@suse.de>
22 
23 /-*/
24 
25 #ifndef YMultiLineEdit_h
26 #define YMultiLineEdit_h
27 
28 #include "YWidget.h"
29 
31 
35 class YMultiLineEdit : public YWidget
36 {
37 protected:
41  YMultiLineEdit( YWidget * parent, const std::string & label );
42 
43 public:
47  virtual ~YMultiLineEdit();
48 
53  virtual const char * widgetClass() const { return "YMultiLineEdit"; }
54 
61  virtual std::string value() = 0;
62 
69  virtual void setValue( const std::string & text ) = 0;
70 
74  std::string label() const;
75 
82  virtual void setLabel( const std::string & label );
83 
88  int inputMaxLength() const;
89 
97  virtual void setInputMaxLength( int numberOfChars );
98 
106  int defaultVisibleLines() const;
107 
125  virtual void setDefaultVisibleLines( int newVisibleLines );
126 
137  virtual bool setProperty( const std::string & propertyName,
138  const YPropertyValue & val );
139 
146  virtual YPropertyValue getProperty( const std::string & propertyName );
147 
154  virtual const YPropertySet & propertySet();
155 
161  virtual std::string shortcutString() const { return label(); }
162 
168  virtual void setShortcutString( const std::string & str )
169  { setLabel( str ); }
170 
175  const char * userInputProperty() { return YUIProperty_Value; }
176 
177 
178 private:
179 
181 };
182 
183 
184 #endif // YMultiLineEdit_h
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Definition: YMultiLineEdit.cc:130
virtual const char * widgetClass() const
Definition: YMultiLineEdit.h:53
Definition: YProperty.h:104
virtual void setValue(const std::string &text)=0
Definition: YProperty.h:197
virtual YPropertyValue getProperty(const std::string &propertyName)
Definition: YMultiLineEdit.cc:147
YWidget * parent() const
Definition: YWidget.cc:271
virtual void setShortcutString(const std::string &str)
Definition: YMultiLineEdit.h:168
std::string label() const
Definition: YMultiLineEdit.cc:71
virtual void setLabel(const std::string &label)
Definition: YMultiLineEdit.cc:77
virtual std::string value()=0
int inputMaxLength() const
Definition: YMultiLineEdit.cc:83
Definition: YMultiLineEdit.h:35
const char * userInputProperty()
Definition: YMultiLineEdit.h:175
virtual std::string shortcutString() const
Definition: YMultiLineEdit.h:161
int defaultVisibleLines() const
Definition: YMultiLineEdit.cc:95
virtual void setDefaultVisibleLines(int newVisibleLines)
Definition: YMultiLineEdit.cc:101
virtual const YPropertySet & propertySet()
Definition: YMultiLineEdit.cc:108
Definition: YMultiLineEdit.cc:38
YMultiLineEdit(YWidget *parent, const std::string &label)
Definition: YMultiLineEdit.cc:54
Definition: YWidget.h:54
virtual void setInputMaxLength(int numberOfChars)
Definition: YMultiLineEdit.cc:89
virtual ~YMultiLineEdit()
Definition: YMultiLineEdit.cc:65