libyui
YCheckBoxFrame.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: YCheckBoxFrame.h
20 
21  Author: Stefan Hundhammer <shundhammer@suse.de>
22 
23 /-*/
24 
25 #ifndef YCheckBoxFrame_h
26 #define YCheckBoxFrame_h
27 
28 #include <string>
29 #include "YSingleChildContainerWidget.h"
30 #include "ImplPtr.h"
31 
33 
34 
40 {
41 public:
46  const std::string & label,
47  bool checked );
48 
52  virtual ~YCheckBoxFrame();
53 
58  virtual const char * widgetClass() const { return "YCheckBoxFrame"; }
59 
63  std::string label() const;
64 
71  virtual void setLabel( const std::string & label );
72 
78  virtual void setValue( bool isChecked ) = 0;
79 
85  virtual bool value() = 0;
86 
91  bool autoEnable() const;
92 
99  virtual void setAutoEnable( bool autoEnable );
100 
105  bool invertAutoEnable() const;
106 
113  virtual void setInvertAutoEnable( bool invertAutoEnable );
114 
126  void handleChildrenEnablement( bool isChecked );
127 
133  virtual std::string shortcutString() const { return label(); }
134 
140  virtual void setShortcutString( const std::string & str )
141  { setLabel( str ); }
142 
147  const char * userInputProperty() { return YUIProperty_Value; }
148 
162  virtual bool setProperty( const std::string & propertyName,
163  const YPropertyValue & val );
164 
172  virtual YPropertyValue getProperty( const std::string & propertyName );
173 
180  virtual const YPropertySet & propertySet();
181 
182 private:
183 
185 };
186 
187 
188 #endif // YCheckBoxFrame_h
Definition: YCheckBoxFrame.cc:35
virtual bool value()=0
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Definition: YCheckBoxFrame.cc:140
YCheckBoxFrame(YWidget *parent, const std::string &label, bool checked)
Definition: YCheckBoxFrame.cc:51
Definition: YProperty.h:104
bool invertAutoEnable() const
Definition: YCheckBoxFrame.cc:92
std::string label() const
Definition: YCheckBoxFrame.cc:67
Definition: YProperty.h:197
virtual void setAutoEnable(bool autoEnable)
Definition: YCheckBoxFrame.cc:85
YWidget * parent() const
Definition: YWidget.cc:271
const char * userInputProperty()
Definition: YCheckBoxFrame.h:147
Definition: YSingleChildContainerWidget.h:34
virtual YPropertyValue getProperty(const std::string &propertyName)
Definition: YCheckBoxFrame.cc:156
Definition: YCheckBoxFrame.h:39
void handleChildrenEnablement(bool isChecked)
Definition: YCheckBoxFrame.cc:105
bool autoEnable() const
Definition: YCheckBoxFrame.cc:79
virtual const char * widgetClass() const
Definition: YCheckBoxFrame.h:58
virtual std::string shortcutString() const
Definition: YCheckBoxFrame.h:133
virtual const YPropertySet & propertySet()
Definition: YCheckBoxFrame.cc:119
virtual void setInvertAutoEnable(bool invertAutoEnable)
Definition: YCheckBoxFrame.cc:98
virtual void setLabel(const std::string &label)
Definition: YCheckBoxFrame.cc:73
virtual void setShortcutString(const std::string &str)
Definition: YCheckBoxFrame.h:140
Definition: YWidget.h:54
virtual ~YCheckBoxFrame()
Definition: YCheckBoxFrame.cc:61
virtual void setValue(bool isChecked)=0