|
#include <CInput.h>

Public Member Functions | |
| CInput (const char *label=0, int layoutSize=10, CLayoutAlign layoutAlign=SP_ALIGN_TOP) | |
| Constructor in SPTK style. | |
| virtual | ~CInput () |
| Destructor. | |
| int | controlType () const |
| Returns input widget input type. | |
| void | controlType (int type) |
| Sets input widget input type. | |
| virtual CVariant | data () const |
| Universal data connection, returns data from control. | |
| virtual void | data (const CVariant v) |
| Universal data connection, sets data from control. | |
| virtual CControlKind | kind () const |
| Returns the control kind, SPTK-style RTTI. | |
| virtual std::string | className () const |
| Returns the control class name, SPTK-style RTTI. | |
| virtual Fl_Font | textFont () const |
| Returns the input text font type. | |
| virtual void | textFont (Fl_Font f) |
| Sets the input text font type. | |
| virtual uchar | textSize () const |
| Returns the input text font size. | |
| virtual void | textSize (uchar s) |
| Sets the input text font size. | |
| virtual int | maxLength () const |
| Returns the input text maximum length, 0 - unlimited. | |
| virtual void | maxLength (int) |
| Sets the input text maximum length, 0 - unlimited. | |
| virtual void | preferredWidth (int &w) const |
| Computes the optimal widget width. | |
| virtual void | preferredHeight (int &h) const |
| Computes the optimal widget height. | |
| virtual bool | preferredSize (int &w, int &h) |
| Computes the optimal widget size. | |
Static Public Member Functions | |
| static CLayoutClient * | creator (CXmlNode *node) |
| Creates a widget based on the XML node information. | |
Protected Member Functions | |
| virtual void | load (CQuery *) |
| Loads data from query. | |
| virtual void | save (CQuery *) |
| Saves data to query. | |
| virtual void | load (const CXmlNode *node, CLayoutXMLmode xmlMode) |
| Loads control data from XML. | |
| virtual void | save (CXmlNode *node, CLayoutXMLmode xmlMode) const |
| Saves control data to XML. | |
| virtual bool | valid () const |
| Returns true if the input data is valid. | |
| CInput (const char *label, int layoutSize, CLayoutAlign layoutAlign, bool autoCreate) | |
| Special internal constructor for derived classes. | |
Implements the simple single-line input box. While it can be used by itself, it's also a base class for several other SPTK widgets. As CControl descendant it's a layout client.
| sptk::CInput::CInput | ( | const char * | label, | |
| int | layoutSize, | |||
| CLayoutAlign | layoutAlign, | |||
| bool | autoCreate | |||
| ) | [protected] |
| sptk::CInput::CInput | ( | const char * | label = 0, |
|
| int | layoutSize = 10, |
|||
| CLayoutAlign | layoutAlign = SP_ALIGN_TOP | |||
| ) |
Constructor in SPTK style.
| label | const char *, label | |
| layoutSize | int, widget align in layout | |
| layoutAlign | CLayoutAlign, widget align in layout |
| virtual CControlKind sptk::CInput::kind | ( | ) | const [inline, virtual] |
Returns the control kind, SPTK-style RTTI.
Implements sptk::CControl.
Reimplemented in sptk::CBox, sptk::CDateIntervalInput, sptk::CDateInput, sptk::CTimeInput, sptk::CDateTimeInput, sptk::CFloatInput, sptk::CHtmlBox, sptk::CIntegerInput, sptk::CMemoInput, and sptk::CPhoneNumberInput.
References sptk::DCV_STRING.
| virtual void sptk::CInput::load | ( | const CXmlNode * | node, | |
| CLayoutXMLmode | xmlMode | |||
| ) | [inline, protected, virtual] |
Loads control data from XML.
Layout information may also include widget size and position, as well as visible() and active() states
| node | CXmlNode*, the XML node | |
| xmlMode | CLayoutXMLmode, the mode defining how the layout and/or data should be stored |
Reimplemented from sptk::CControl.
Reimplemented in sptk::CDateTimeBaseInput.
References sptk::CControl::load().
| virtual void sptk::CInput::preferredHeight | ( | int & | h | ) | const [virtual] |
Computes the optimal widget height.
| h | int&, input - height offered by the program, output - height required by widget |
Reimplemented in sptk::CDateInput.
| virtual bool sptk::CInput::preferredSize | ( | int & | w, | |
| int & | h | |||
| ) | [virtual] |
Computes the optimal widget size.
| w | int&, input - width offered by the program, output - width required by widget | |
| h | int&, input - height offered by the program, output - height required by widget |
Reimplemented from sptk::CLayoutClient.
Reimplemented in sptk::CBox, sptk::CHtmlBox, sptk::CMemoInput, and sptk::CProgressBar.
| virtual void sptk::CInput::preferredWidth | ( | int & | w | ) | const [virtual] |
Computes the optimal widget width.
| w | int&, input - width offered by the program, output - width required by widget |
Reimplemented in sptk::CTimeInput, and sptk::CPhoneNumberInput.
| virtual void sptk::CInput::save | ( | CXmlNode * | node, | |
| CLayoutXMLmode | xmlMode | |||
| ) | const [inline, protected, virtual] |
Saves control data to XML.
Layout information may also include widget size and position, as well as visible() and active() states
| node | CXmlNode*, the XML node | |
| xmlMode | CLayoutXMLmode, the mode defining how the layout and/or data should be stored |
Reimplemented from sptk::CControl.
Reimplemented in sptk::CDateTimeBaseInput.
References sptk::CControl::save().