25 #ifndef NCInputField_h
26 #define NCInputField_h
30 #include <yui/YInputField.h>
37 friend std::ostream & operator<<( std::ostream & STREAM,
const NCInputField & OBJ );
59 unsigned maxFldLength;
60 unsigned maxInputLength;
69 bool returnOnReturn_b;
74 bool bufferFull()
const;
75 unsigned maxCursor()
const;
82 virtual const char * location()
const {
return "NCInputField"; }
84 virtual void wCreate(
const wrect & newrect );
85 virtual void wDelete();
87 virtual void wRedraw();
89 bool validKey( wint_t key )
const;
94 const std::string & label,
95 bool passwordMode =
false,
96 unsigned maxInput = 0,
101 void setFldtype( FTYPE t ) { fldtype = t; }
103 void setReturnOnReturn(
bool on_br ) { returnOnReturn_b = on_br; }
105 virtual int preferredWidth();
106 virtual int preferredHeight();
108 virtual void setSize(
int newWidth,
int newHeight );
110 virtual void setLabel(
const std::string & nlabel );
112 virtual void setValue(
const std::string & ntext );
113 virtual std::string value();
115 virtual void setValidChars(
const std::string & validchars );
121 virtual bool setKeyboardFocus()
124 return YWidget::setKeyboardFocus();
131 void setInputMaxLength(
int numberOfChars );
133 void setCurPos(
unsigned pos ) { curpos = pos; }
137 #endif // NCInputField_h