libyui
 
Loading...
Searching...
No Matches
YComboBox.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: YComboBox.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25#ifndef YComboBox_h
26#define YComboBox_h
27
28#include "YSelectionWidget.h"
29
31
32
54{
55protected:
62 YComboBox( YWidget * parent, const std::string & label, bool editable );
63
64public:
68 virtual ~YComboBox();
69
74 virtual const char * widgetClass() const { return "YComboBox"; }
75
83 bool editable() const;
84
94 std::string value();
95
106 void setValue( const std::string & newText );
107
117 virtual YItem * selectedItem();
118
132
138 virtual void selectItem( YItem * item, bool selected = true );
139
146 std::string validChars();
147
157 virtual void setValidChars( const std::string & validChars );
158
165 int inputMaxLength() const;
166
176 virtual void setInputMaxLength( int numberOfChars );
177
188 virtual bool setProperty( const std::string & propertyName,
189 const YPropertyValue & val );
190
197 virtual YPropertyValue getProperty( const std::string & propertyName );
198
205 virtual const YPropertySet & propertySet();
206
211 const char * userInputProperty() { return YUIProperty_Value; }
212
213
214protected:
215
223 virtual std::string text() = 0;
224
234 virtual void setText( const std::string & newText ) = 0;
235
236
237private:
238
240};
241
242
243#endif // YComboBox_h
std::vector< YItem * > YItemCollection
Collection of pointers to YItem.
Definition YItem.h:39
Definition ImplPtr.h:43
int inputMaxLength() const
Definition YComboBox.cc:84
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Definition YComboBox.cc:202
virtual void setText(const std::string &newText)=0
std::string validChars()
Definition YComboBox.cc:72
virtual void setInputMaxLength(int numberOfChars)
Definition YComboBox.cc:90
virtual YItemCollection selectedItems()
Definition YComboBox.cc:159
virtual const char * widgetClass() const
Definition YComboBox.h:74
virtual const YPropertySet & propertySet()
Definition YComboBox.cc:174
virtual ~YComboBox()
Definition YComboBox.cc:60
virtual std::string text()=0
virtual void selectItem(YItem *item, bool selected=true)
Definition YComboBox.cc:124
bool editable() const
Definition YComboBox.cc:66
const char * userInputProperty()
Definition YComboBox.h:211
virtual void setValidChars(const std::string &validChars)
Definition YComboBox.cc:78
virtual YItem * selectedItem()
Definition YComboBox.cc:138
void setValue(const std::string &newText)
Definition YComboBox.cc:102
virtual YPropertyValue getProperty(const std::string &propertyName)
Definition YComboBox.cc:222
YComboBox(YWidget *parent, const std::string &label, bool editable)
Definition YComboBox.cc:51
std::string value()
Definition YComboBox.cc:96
Definition YItem.h:56
Definition YProperty.h:198
Definition YProperty.h:105
YSelectionWidget(YWidget *parent, const std::string &label, bool enforceSingleSelection, bool recursiveSelection=false)
Definition YSelectionWidget.cc:59
std::string label() const
Definition YSelectionWidget.cc:99
YWidget(YWidget *parent)
Definition YWidget.cc:106
YWidget * parent() const
Definition YWidget.cc:277
Definition YComboBox.cc:37