33 TEXTFIELD_PASSWD = 0x00080000,
34 TEXTFIELD_INTEGER = 0x00100000,
35 TEXTFIELD_REAL = 0x00200000,
36 TEXTFIELD_READONLY = 0x00400000,
37 TEXTFIELD_ENTER_ONLY = 0x00800000,
38 TEXTFIELD_LIMITED = 0x01000000,
39 TEXTFIELD_OVERSTRIKE = 0x02000000,
40 TEXTFIELD_AUTOGRAY = 0x04000000,
41 TEXTFIELD_AUTOHIDE = 0x08000000,
42 TEXTFIELD_NORMAL = FRAME_SUNKEN|FRAME_THICK
68 const FXchar *delimiters;
83 FXint index(FXint x)
const;
84 FXint coord(FXint i)
const;
85 FXint leftWord(FXint pos)
const;
86 FXint rightWord(FXint pos)
const;
87 FXint wordStart(FXint pos)
const;
88 FXint wordEnd(FXint pos)
const;
89 void drawCursor(FXuint state);
92 void drawTextRange(
FXDCWindow& dc,FXint fm,FXint to)
const;
93 void drawTextFragment(
FXDCWindow& dc,FXint x,FXint y,FXint fm,FXint to)
const;
94 void drawPWDTextFragment(
FXDCWindow& dc,FXint x,FXint y,FXint fm,FXint to)
const;
95 void enterText(
const FXString& text,FXbool notify);
96 FXbool deletePendingSelection(FXbool notify);
101 long onPaint(
FXObject*,FXSelector,
void*);
102 long onUpdate(
FXObject*,FXSelector,
void*);
103 long onBlink(
FXObject*,FXSelector,
void*);
104 long onFocusIn(
FXObject*,FXSelector,
void*);
105 long onFocusOut(
FXObject*,FXSelector,
void*);
106 long onFocusSelf(
FXObject*,FXSelector,
void*);
107 long onMotion(
FXObject*,FXSelector,
void*);
108 long onAutoScroll(
FXObject*,FXSelector,
void*);
109 long onLeftBtnPress(
FXObject*,FXSelector,
void*);
110 long onLeftBtnRelease(
FXObject*,FXSelector,
void*);
111 long onMiddleBtnPress(
FXObject*,FXSelector,
void*);
112 long onMiddleBtnRelease(
FXObject*,FXSelector,
void*);
113 long onKeyPress(
FXObject*,FXSelector,
void*);
114 long onKeyRelease(
FXObject*,FXSelector,
void*);
115 long onVerify(
FXObject*,FXSelector,
void*);
116 long onSelectionLost(
FXObject*,FXSelector,
void*);
117 long onSelectionGained(
FXObject*,FXSelector,
void*);
118 long onSelectionRequest(
FXObject*,FXSelector,
void* ptr);
119 long onClipboardLost(
FXObject*,FXSelector,
void*);
120 long onClipboardGained(
FXObject*,FXSelector,
void*);
121 long onClipboardRequest(
FXObject*,FXSelector,
void*);
122 long onCmdSetTip(
FXObject*,FXSelector,
void*);
123 long onCmdGetTip(
FXObject*,FXSelector,
void*);
124 long onCmdSetHelp(
FXObject*,FXSelector,
void*);
125 long onCmdGetHelp(
FXObject*,FXSelector,
void*);
126 long onQueryTip(
FXObject*,FXSelector,
void*);
127 long onQueryHelp(
FXObject*,FXSelector,
void*);
128 long onUpdIsEditable(
FXObject*,FXSelector,
void*);
129 long onUpdHaveSelection(
FXObject*,FXSelector,
void*);
130 long onUpdHaveEditableSelection(
FXObject*,FXSelector,
void*);
133 long onCmdSetValue(
FXObject*,FXSelector,
void*);
134 long onCmdSetIntValue(
FXObject*,FXSelector,
void*);
135 long onCmdSetLongValue(
FXObject*,FXSelector,
void*);
136 long onCmdSetRealValue(
FXObject*,FXSelector,
void*);
137 long onCmdSetStringValue(
FXObject*,FXSelector,
void*);
138 long onCmdGetIntValue(
FXObject*,FXSelector,
void*);
139 long onCmdGetLongValue(
FXObject*,FXSelector,
void*);
140 long onCmdGetRealValue(
FXObject*,FXSelector,
void*);
141 long onCmdGetStringValue(
FXObject*,FXSelector,
void*);
144 long onCmdCursorHome(
FXObject*,FXSelector,
void*);
145 long onCmdCursorEnd(
FXObject*,FXSelector,
void*);
146 long onCmdCursorRight(
FXObject*,FXSelector,
void*);
147 long onCmdCursorLeft(
FXObject*,FXSelector,
void*);
148 long onCmdCursorWordLeft(
FXObject*,FXSelector,
void*);
149 long onCmdCursorWordRight(
FXObject*,FXSelector,
void*);
152 long onCmdCursorShiftHome(
FXObject*,FXSelector,
void*);
153 long onCmdCursorShiftEnd(
FXObject*,FXSelector,
void*);
154 long onCmdCursorShiftRight(
FXObject*,FXSelector,
void*);
155 long onCmdCursorShiftLeft(
FXObject*,FXSelector,
void*);
156 long onCmdCursorShiftWordLeft(
FXObject*,FXSelector,
void*);
157 long onCmdCursorShiftWordRight(
FXObject*,FXSelector,
void*);
160 long onCmdInsertString(
FXObject*,FXSelector,
void*);
161 long onIMEStart(
FXObject*,FXSelector,
void*);
164 long onCmdCutSel(
FXObject*,FXSelector,
void*);
165 long onCmdCopySel(
FXObject*,FXSelector,
void*);
166 long onCmdPasteSel(
FXObject*,FXSelector,
void*);
167 long onCmdDeleteSel(
FXObject*,FXSelector,
void*);
168 long onCmdPasteMiddle(
FXObject*,FXSelector,
void*);
169 long onCmdSelectAll(
FXObject*,FXSelector,
void*);
170 long onCmdDeselectAll(
FXObject*,FXSelector,
void*);
173 long onCmdBackspace(
FXObject*,FXSelector,
void*);
174 long onCmdBackspaceWord(
FXObject*,FXSelector,
void*);
175 long onCmdBackspaceBol(
FXObject*,FXSelector,
void*);
176 long onCmdDeleteChar(
FXObject*,FXSelector,
void*);
177 long onCmdDeleteWord(
FXObject*,FXSelector,
void*);
178 long onCmdDeleteEol(
FXObject*,FXSelector,
void*);
179 long onCmdDeleteAll(
FXObject*,FXSelector,
void*);
182 long onCmdToggleEditable(
FXObject*,FXSelector,
void*);
183 long onUpdToggleEditable(
FXObject*,FXSelector,
void*);
184 long onCmdToggleOverstrike(
FXObject*,FXSelector,
void*);
185 long onUpdToggleOverstrike(
FXObject*,FXSelector,
void*);
189 static const FXchar textDelimiters[];
193 ID_CURSOR_HOME=FXFrame::ID_LAST,
198 ID_CURSOR_WORD_RIGHT,
199 ID_CURSOR_SHIFT_HOME,
201 ID_CURSOR_SHIFT_LEFT,
202 ID_CURSOR_SHIFT_RIGHT,
203 ID_CURSOR_SHIFT_WORD_LEFT,
204 ID_CURSOR_SHIFT_WORD_RIGHT,
221 ID_TOGGLE_OVERSTRIKE,
229 FXTextField(
FXComposite* p,FXint ncols,
FXObject* tgt=
nullptr,FXSelector sel=0,FXuint opts=TEXTFIELD_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_PAD,FXint pr=DEFAULT_PAD,FXint pt=DEFAULT_PAD,FXint pb=DEFAULT_PAD);
232 virtual void create();
235 virtual void layout();
238 virtual void enable();
241 virtual void disable();
244 virtual FXint getDefaultWidth();
247 virtual FXint getDefaultHeight();
250 virtual FXbool canFocus()
const;
253 virtual void setFocus();
256 virtual void killFocus();
259 void setEditable(FXbool edit=
true);
262 FXbool isEditable()
const;
265 void setOverstrike(FXbool over=
true);
268 FXbool isOverstrike()
const;
271 void setText(
const FXString& text,FXbool notify=
false);
274 void replaceText(FXint pos,FXint m,
const FXString& text,FXbool notify=
false);
277 void appendText(
const FXString& text,FXbool notify=
false);
280 void insertText(FXint pos,
const FXString& text,FXbool notify=
false);
283 void removeText(FXint pos,FXint m,FXbool notify=
false);
286 void clearText(FXbool notify=
false);
295 FXbool setSelection(FXint pos,FXint len);
298 FXbool extendSelection(FXint pos);
301 FXbool killSelection();
307 FXbool copySelection();
310 FXbool cutSelection(FXbool notify=
false);
313 FXbool deleteSelection(FXbool notify=
false);
316 FXbool pasteSelection(FXbool notify=
false);
319 FXbool pasteClipboard(FXbool notify=
false);
322 FXbool isPosSelected(FXint pos)
const;
325 FXbool isPosVisible(FXint pos)
const;
328 void makePositionVisible(FXint pos);
331 void setCursorPos(FXint pos);
337 void moveCursor(FXint pos);
340 void moveCursorAndSelect(FXint pos);
343 void setAnchorPos(FXint pos);
349 void setTextStyle(FXuint style);
352 FXuint getTextStyle()
const;
355 void setFont(
FXFont* fnt);
361 void setNumColumns(FXint cols);
367 void setDelimiters(
const FXchar* delims=textDelimiters){ delimiters=delims; }
379 void setJustify(FXuint mode);
382 FXuint getJustify()
const;
385 void setTextColor(FXColor clr);
391 void setSelBackColor(FXColor clr);
397 void setSelTextColor(FXColor clr);
403 void setCursorColor(FXColor clr);
421 virtual void save(
FXStream& store)
const;
const FXString & getTipText() const
Get the tool tip message for this text field.
Definition: FXTextField.h:418
FXColor getTextColor() const
Return text color.
Definition: FXTextField.h:388
FXint getAnchorPos() const
Return anchor position.
Definition: FXTextField.h:346
FXColor getSelBackColor() const
Return selected background color.
Definition: FXTextField.h:394
The Frame widget provides borders around some contents.
Definition: FXFrame.h:58
const FXString & getHelpText() const
Get the status line help text for this label.
Definition: FXTextField.h:412
void setDelimiters(const FXchar *delims=textDelimiters)
Change word delimiters.
Definition: FXTextField.h:367
Base composite.
Definition: FXComposite.h:32
FXint getCursorPos() const
Return cursor position.
Definition: FXTextField.h:334
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
FXFont * getFont() const
Get the text font.
Definition: FXTextField.h:358
FXColor getSelTextColor() const
Return selected text color.
Definition: FXTextField.h:400
const FXchar * getDelimiters() const
Return word delimiters.
Definition: FXTextField.h:370
FXString getText() const
Get entire text.
Definition: FXTextField.h:289
Definition: FX4Splitter.h:28
FXint getNumColumns() const
Return number of visible columns.
Definition: FXTextField.h:364
void setTipText(const FXString &text)
Set the tool tip message for this text field.
Definition: FXTextField.h:415
void setHelpText(const FXString &text)
Set the status line help text for this label.
Definition: FXTextField.h:409
A text field is a single-line text entry widget.
Definition: FXTextField.h:63
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:134
Window Device Context.
Definition: FXDCWindow.h:48
Font class.
Definition: FXFont.h:137
FXColor getCursorColor() const
Return the cursor color.
Definition: FXTextField.h:406
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42