#include <CInput.h>
Public Member Functions | |
CInput_ (const char *label=0, int layoutSize=20, CLayoutAlign layoutAlign=CLayoutAlign::TOP) | |
int | handle (int event) override |
uchar | textSize () const |
void | textSize (uchar sz) |
Fl_Font | textFont () const |
void | textFont (Fl_Font fnt) |
int | maxLength () const |
void | maxLength (int ml) |
bool | preferredSize (int &w, int &h) override |
void | mask (const char *maskString) |
Public Member Functions inherited from sptk::CLayoutClient | |
CLayoutClient (Fl_Widget *widget, int layoutSize, CLayoutAlign ca) | |
virtual | ~CLayoutClient () |
CLayoutAlign | layoutAlign () const |
void | layoutAlign (CLayoutAlign al) |
int | layoutSize () const |
void | layoutSize (int ls) |
virtual void | label (const String &l) |
virtual const String & | label () const |
void | name (const char *aname) |
void | name (const String &aname) |
const String & | name () const |
virtual bool | preferredSize (int &w, int &h) |
virtual bool | computeSize (int &w, int &h) |
virtual String | className () const |
Fl_Widget * | widget () const |
virtual void | load (const xdoc::SNode &node, CLayoutXMLmode xmlMode) |
virtual void | load (const std::shared_ptr< xdoc::Node > &node) |
virtual void | save (const std::shared_ptr< xdoc::Node > &node, CLayoutXMLmode xmlMode) const |
Protected Member Functions | |
void | maskValue () |
Protected Member Functions inherited from sptk::CLayoutClient | |
int | lastPreferredH () const |
int | lastPreferredW () const |
void | lastPreferredH (int height) |
void | lastPreferredW (int width) |
Additional Inherited Members | |
Protected Attributes inherited from sptk::CLayoutClient | |
Fl_Widget * | m_widget |
String | m_name |
String | m_label |
CLayoutAlign | m_layoutAlign |
Base input widget
Extends the standard Fl_Input with the extra input types for the date, time, and phone input masks. It also supports the optional maximum input length. In is used mainly as the internal widget in different CControl-derived widgets.
sptk::CInput_::CInput_ | ( | const char * | label = 0 , |
int | layoutSize = 20 , |
||
CLayoutAlign | layoutAlign = CLayoutAlign::TOP |
||
) |
Constructor in SPTK style
label | const char *, label |
layoutSize | int, widget align in layout |
layoutAlign | CLayoutAlign, widget align in layout |
|
override |
CInput_-specific version of FLTK handle() function
event | int, FLTK event |
void sptk::CInput_::mask | ( | const char * | maskString | ) |
Sets the optional mask to the input widget. Passing an empty string as the maskString clears the mask.
maskString | const char *, the mask string. |
|
protected |
Conversion of the outside input value into internal masked value using mask (if defined)
|
inline |
Returns the maximum length for the input text
|
inline |
Sets the maximum length for the input text
|
overridevirtual |
Computes the optimal widgets 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.
|
inline |
Returns the font type for the input text
|
inline |
Sets the font type for the input text
|
inline |
Returns the font size for the input text
|
inline |
Sets the font size for the input text