Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXTextField Class Reference

A text field is a single-line text entry widget. More...

#include <FXTextField.h>

Inheritance diagram for FX::FXTextField:
FX::FXFrame FX::FXWindow FX::FXDrawable FX::FXId FX::FXObject

List of all members.

Public Types

enum  {
  ID_CURSOR_HOME = FXFrame::ID_LAST, ID_CURSOR_END, ID_CURSOR_RIGHT, ID_CURSOR_LEFT,
  ID_CURSOR_WORD_LEFT, ID_CURSOR_WORD_RIGHT, ID_CURSOR_SHIFT_HOME, ID_CURSOR_SHIFT_END,
  ID_CURSOR_SHIFT_LEFT, ID_CURSOR_SHIFT_RIGHT, ID_CURSOR_SHIFT_WORD_LEFT, ID_CURSOR_SHIFT_WORD_RIGHT,
  ID_SELECT_ALL, ID_DESELECT_ALL, ID_CUT_SEL, ID_COPY_SEL,
  ID_DELETE_SEL, ID_REPLACE_SEL, ID_PASTE_SEL, ID_PASTE_MIDDLE,
  ID_INSERT_STRING, ID_BACKSPACE, ID_BACKSPACE_WORD, ID_BACKSPACE_BOL,
  ID_DELETE_CHAR, ID_DELETE_WORD, ID_DELETE_EOL, ID_DELETE_ALL,
  ID_TOGGLE_EDITABLE, ID_TOGGLE_OVERSTRIKE, ID_BLINK, ID_AUTOSCROLL,
  ID_LAST
}

Public Member Functions

long onPaint (FXObject *, FXSelector, void *)
long onUpdate (FXObject *, FXSelector, void *)
long onBlink (FXObject *, FXSelector, void *)
long onFocusIn (FXObject *, FXSelector, void *)
long onFocusOut (FXObject *, FXSelector, void *)
long onFocusSelf (FXObject *, FXSelector, void *)
long onMotion (FXObject *, FXSelector, void *)
long onAutoScroll (FXObject *, FXSelector, void *)
long onLeftBtnPress (FXObject *, FXSelector, void *)
long onLeftBtnRelease (FXObject *, FXSelector, void *)
long onMiddleBtnPress (FXObject *, FXSelector, void *)
long onMiddleBtnRelease (FXObject *, FXSelector, void *)
long onKeyPress (FXObject *, FXSelector, void *)
long onKeyRelease (FXObject *, FXSelector, void *)
long onVerify (FXObject *, FXSelector, void *)
long onSelectionLost (FXObject *, FXSelector, void *)
long onSelectionGained (FXObject *, FXSelector, void *)
long onSelectionRequest (FXObject *, FXSelector, void *ptr)
long onClipboardLost (FXObject *, FXSelector, void *)
long onClipboardGained (FXObject *, FXSelector, void *)
long onClipboardRequest (FXObject *, FXSelector, void *)
long onCmdSetTip (FXObject *, FXSelector, void *)
long onCmdGetTip (FXObject *, FXSelector, void *)
long onCmdSetHelp (FXObject *, FXSelector, void *)
long onCmdGetHelp (FXObject *, FXSelector, void *)
long onQueryTip (FXObject *, FXSelector, void *)
long onQueryHelp (FXObject *, FXSelector, void *)
long onUpdIsEditable (FXObject *, FXSelector, void *)
long onUpdHaveSelection (FXObject *, FXSelector, void *)
long onUpdHaveEditableSelection (FXObject *, FXSelector, void *)
long onCmdSetValue (FXObject *, FXSelector, void *)
long onCmdSetIntValue (FXObject *, FXSelector, void *)
long onCmdSetLongValue (FXObject *, FXSelector, void *)
long onCmdSetRealValue (FXObject *, FXSelector, void *)
long onCmdSetStringValue (FXObject *, FXSelector, void *)
long onCmdGetIntValue (FXObject *, FXSelector, void *)
long onCmdGetLongValue (FXObject *, FXSelector, void *)
long onCmdGetRealValue (FXObject *, FXSelector, void *)
long onCmdGetStringValue (FXObject *, FXSelector, void *)
long onCmdCursorHome (FXObject *, FXSelector, void *)
long onCmdCursorEnd (FXObject *, FXSelector, void *)
long onCmdCursorRight (FXObject *, FXSelector, void *)
long onCmdCursorLeft (FXObject *, FXSelector, void *)
long onCmdCursorWordLeft (FXObject *, FXSelector, void *)
long onCmdCursorWordRight (FXObject *, FXSelector, void *)
long onCmdCursorShiftHome (FXObject *, FXSelector, void *)
long onCmdCursorShiftEnd (FXObject *, FXSelector, void *)
long onCmdCursorShiftRight (FXObject *, FXSelector, void *)
long onCmdCursorShiftLeft (FXObject *, FXSelector, void *)
long onCmdCursorShiftWordLeft (FXObject *, FXSelector, void *)
long onCmdCursorShiftWordRight (FXObject *, FXSelector, void *)
long onCmdInsertString (FXObject *, FXSelector, void *)
long onIMEStart (FXObject *, FXSelector, void *)
long onCmdCutSel (FXObject *, FXSelector, void *)
long onCmdCopySel (FXObject *, FXSelector, void *)
long onCmdPasteSel (FXObject *, FXSelector, void *)
long onCmdDeleteSel (FXObject *, FXSelector, void *)
long onCmdReplaceSel (FXObject *, FXSelector, void *)
long onCmdPasteMiddle (FXObject *, FXSelector, void *)
long onCmdSelectAll (FXObject *, FXSelector, void *)
long onCmdDeselectAll (FXObject *, FXSelector, void *)
long onCmdBackspace (FXObject *, FXSelector, void *)
long onCmdBackspaceWord (FXObject *, FXSelector, void *)
long onCmdBackspaceBol (FXObject *, FXSelector, void *)
long onCmdDeleteChar (FXObject *, FXSelector, void *)
long onCmdDeleteWord (FXObject *, FXSelector, void *)
long onCmdDeleteEol (FXObject *, FXSelector, void *)
long onCmdDeleteAll (FXObject *, FXSelector, void *)
long onCmdToggleEditable (FXObject *, FXSelector, void *)
long onUpdToggleEditable (FXObject *, FXSelector, void *)
long onCmdToggleOverstrike (FXObject *, FXSelector, void *)
long onUpdToggleOverstrike (FXObject *, FXSelector, void *)
 FXTextField (FXComposite *p, FXint ncols, FXObject *tgt=NULL, 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)
 Construct text field wide enough to display ncols columns.
virtual void create ()
 Create server-side resources.
virtual void layout ()
 Perform layout.
virtual void enable ()
 Enable text field.
virtual void disable ()
 Disable text field.
virtual FXint getDefaultWidth ()
 Return default width.
virtual FXint getDefaultHeight ()
 Return default height.
virtual FXbool canFocus () const
 Yes, text field may receive focus.
virtual void setFocus ()
 Move the focus to this window.
virtual void killFocus ()
 Remove the focus from this window.
void setNumColumns (FXint cols)
 Change the default width in terms of visible columns.
FXint getNumColumns () const
 Return number of visible columns.
FXString getText () const
 Get entire text.
FXString getSelectedText () const
 Get selected text.
void setText (const FXString &text, FXbool notify=false)
 Change the text and move cursor to end.
void replaceText (FXint pos, FXint m, const FXString &text, FXbool notify=false)
 Replace range of bytes with text.
void appendText (const FXString &text, FXbool notify=false)
 Append text at the end.
void insertText (FXint pos, const FXString &text, FXbool notify=false)
 Insert text at position.
void removeText (FXint pos, FXint m, FXbool notify=false)
 Remove range of text.
void clearText (FXbool notify=false)
 Remove all text.
FXbool selectAll ()
 Select all text.
FXbool setSelection (FXint pos, FXint len)
 Select len characters starting at given position pos.
FXbool extendSelection (FXint pos)
 Extend the selection from the anchor to the given position.
FXbool copySelection ()
 Copy primary selection to clipboard.
FXbool cutSelection (FXbool notify=false)
 Cut primary selection to clipboard.
FXbool deleteSelection (FXbool notify=false)
 Delete primary selection.
FXbool replaceSelection (const FXString &text, FXbool notify=false)
 Replace primary selection by other text.
FXbool pasteSelection (FXbool notify=false)
 Paste primary selection.
FXbool pasteClipboard (FXbool notify=false)
 Paste clipboard.
FXbool killSelection ()
 Unselect the text.
FXbool isPosSelected (FXint pos) const
 Return true if position pos is selected.
FXbool isPosVisible (FXint pos) const
 Return true if position is fully visible.
void makePositionVisible (FXint pos)
 Scroll text to make the given position visible.
void setCursorPos (FXint pos)
 Set cursor position.
FXint getCursorPos () const
 Return cursor position.
void moveCursor (FXint pos)
 Move cursor to position, and scroll into view.
void moveCursorAndSelect (FXint pos)
 Move cursor to position, and extent the selection to this point.
void setAnchorPos (FXint pos)
 Change anchor position.
FXint getAnchorPos () const
 Return anchor position.
void setEditable (FXbool edit=true)
 Set editable mode.
FXbool isEditable () const
 Return true if text field may be edited.
void setOverstrike (FXbool over=true)
 Set overstrike mode.
FXbool isOverstrike () const
 Return true if overstrike mode in effect.
void setJustify (FXuint mode)
 Change text justification mode.
FXuint getJustify () const
 Return text justification mode.
void setDelimiters (const FXchar *delims=textDelimiters)
 Change word delimiters.
const FXchar * getDelimiters () const
 Return word delimiters.
void setTextStyle (FXuint style)
 Change text style.
FXuint getTextStyle () const
 Return text style.
void setFont (FXFont *fnt)
 Set the text font.
FXFontgetFont () const
 Get the text font.
void setTextColor (FXColor clr)
 Change text color.
FXColor getTextColor () const
 Return text color.
void setSelBackColor (FXColor clr)
 Change selected background color.
FXColor getSelBackColor () const
 Return selected background color.
void setSelTextColor (FXColor clr)
 Change selected text color.
FXColor getSelTextColor () const
 Return selected text color.
void setCursorColor (FXColor clr)
 Changes the cursor color.
FXColor getCursorColor () const
 Return the cursor color.
void setHelpText (const FXString &text)
 Set the status line help text for this label.
const FXStringgetHelpText () const
 Get the status line help text for this label.
void setTipText (const FXString &text)
 Set the tool tip message for this text field.
const FXStringgetTipText () const
 Get the tool tip message for this text field.
virtual void save (FXStream &store) const
 Save text field to a stream.
virtual void load (FXStream &store)
 Load text field from a stream.
virtual ~FXTextField ()
 Destructor.
- Public Member Functions inherited from FX::FXFrame
 FXFrame (FXComposite *p, FXuint opts=FRAME_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)
 Construct frame window.
void setFrameStyle (FXuint style)
 Change frame style.
FXuint getFrameStyle () const
 Get current frame style.
FXint getBorderWidth () const
 Get border width.
void setPadTop (FXint pt)
 Change top padding.
FXint getPadTop () const
 Get top interior padding.
void setPadBottom (FXint pb)
 Change bottom padding.
FXint getPadBottom () const
 Get bottom interior padding.
void setPadLeft (FXint pl)
 Change left padding.
FXint getPadLeft () const
 Get left interior padding.
void setPadRight (FXint pr)
 Change right padding.
FXint getPadRight () const
 Get right interior padding.
void setHiliteColor (FXColor clr)
 Change highlight color.
FXColor getHiliteColor () const
 Get highlight color.
void setShadowColor (FXColor clr)
 Change shadow color.
FXColor getShadowColor () const
 Get shadow color.
void setBorderColor (FXColor clr)
 Change border color.
FXColor getBorderColor () const
 Get border color.
void setBaseColor (FXColor clr)
 Change base gui color.
FXColor getBaseColor () const
 Get base gui color.
- Public Member Functions inherited from FX::FXWindow
long onMap (FXObject *, FXSelector, void *)
long onUnmap (FXObject *, FXSelector, void *)
long onConfigure (FXObject *, FXSelector, void *)
long onMouseWheel (FXObject *, FXSelector, void *)
long onEnter (FXObject *, FXSelector, void *)
long onLeave (FXObject *, FXSelector, void *)
long onRightBtnPress (FXObject *, FXSelector, void *)
long onRightBtnRelease (FXObject *, FXSelector, void *)
long onSpaceBallMotion (FXObject *, FXSelector, void *)
long onSpaceBallButtonPress (FXObject *, FXSelector, void *)
long onSpaceBallButtonRelease (FXObject *, FXSelector, void *)
long onBeginDrag (FXObject *, FXSelector, void *)
long onEndDrag (FXObject *, FXSelector, void *)
long onDragged (FXObject *, FXSelector, void *)
long onUngrabbed (FXObject *, FXSelector, void *)
long onDestroy (FXObject *, FXSelector, void *)
long onDNDEnter (FXObject *, FXSelector, void *)
long onDNDLeave (FXObject *, FXSelector, void *)
long onDNDMotion (FXObject *, FXSelector, void *)
long onDNDDrop (FXObject *, FXSelector, void *)
long onDNDRequest (FXObject *, FXSelector, void *)
long onCmdShow (FXObject *, FXSelector, void *)
long onCmdHide (FXObject *, FXSelector, void *)
long onUpdToggleShown (FXObject *, FXSelector, void *)
long onCmdToggleShown (FXObject *, FXSelector, void *)
long onCmdRaise (FXObject *, FXSelector, void *)
long onCmdLower (FXObject *, FXSelector, void *)
long onCmdEnable (FXObject *, FXSelector, void *)
long onCmdDisable (FXObject *, FXSelector, void *)
long onUpdToggleEnabled (FXObject *, FXSelector, void *)
long onCmdToggleEnabled (FXObject *, FXSelector, void *)
long onCmdUpdate (FXObject *, FXSelector, void *)
long onUpdYes (FXObject *, FXSelector, void *)
long onCmdDelete (FXObject *, FXSelector, void *)
 FXWindow (FXComposite *p, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
 Constructor.
FXWindowgetParent () const
 Return a pointer to the parent window.
FXWindowgetOwner () const
 Return a pointer to the owner window.
FXWindowgetShell () const
 Return a pointer to the shell window.
FXWindowgetRoot () const
 Return a pointer to the root window.
FXWindowgetNext () const
 Return a pointer to the next (sibling) window, if any.
FXWindowgetPrev () const
 Return a pointer to the previous (sibling) window , if any.
FXWindowgetFirst () const
 Return a pointer to this window's first child window , if any.
FXWindowgetLast () const
 Return a pointer to this window's last child window, if any.
FXWindowgetFocus () const
 Return a pointer to the currently focused child window.
virtual WindowClass getWindowClass () const
 Get window class.
void setKey (FXuint k)
 Change window key.
FXuint getKey () const
 Return window key.
FXWindowgetChildWithKey (FXuint k) const
 Return child window with given window key.
void setTarget (FXObject *t)
 Set the message target object for this window.
FXObjectgetTarget () const
 Get the message target object for this window, if any.
void setSelector (FXSelector sel)
 Set the message identifier for this window.
FXSelector getSelector () const
 Get the message identifier for this window.
FXint getX () const
 Get this window's x-coordinate, in the parent's coordinate system.
FXint getY () const
 Get this window's y-coordinate, in the parent's coordinate system.
virtual FXint getWidthForHeight (FXint givenheight)
 Return width for given height.
virtual FXint getHeightForWidth (FXint givenwidth)
 Return height for given width.
void setX (FXint x)
 Set this window's x-coordinate, in the parent's coordinate system.
void setY (FXint y)
 Set this window's y-coordinate, in the parent's coordinate system.
void setWidth (FXint w)
 Set the window width; and flag the widget as being in need of layout by its parent.
void setHeight (FXint h)
 Set the window height; and flag the widget as being in need of layout by its parent.
void setLayoutHints (FXuint lout)
 Set layout hints for this window.
FXuint getLayoutHints () const
 Get layout hints for this window.
FXAccelTablegetAccelTable () const
 Return a pointer to the accelerator table.
void setAccelTable (FXAccelTable *acceltable)
 Set the accelerator table.
void addHotKey (FXHotKey code)
 Add a hot key.
void remHotKey (FXHotKey code)
 Remove a hot key.
void setHelpTag (const FXString &text)
 Change help tag for this widget.
const FXStringgetHelpTag () const
 Get the help tag for this widget.
FXbool isShell () const
 Return true if window is a shell window.
FXbool isOwnerOf (const FXWindow *window) const
 Return true if specified window is owned by this window.
FXbool isChildOf (const FXWindow *window) const
 Return true if specified window is ancestor of this window.
FXbool containsChild (const FXWindow *child) const
 Return true if this window contains child in its subtree.
FXWindowgetChildAt (FXint x, FXint y) const
 Return the child window at specified coordinates.
FXint numChildren () const
 Return the number of child windows for this window.
FXint indexOfChild (const FXWindow *window) const
 Return the index (starting from zero) of the specified child window, or -1 if the window is not a child or NULL.
FXWindowchildAtIndex (FXint index) const
 Return the child window at specified index, or NULL if the index is negative or out of range.
FXComposeContextgetComposeContext () const
 Return compose context.
void createComposeContext ()
 Create compose context.
void destroyComposeContext ()
 Destroy compose context.
FXbool cursorShown () const
 Is cursor shown.
void showCursor (FXbool flag=true)
 Show or hide the cursor.
void setDefaultCursor (FXCursor *cur)
 Set the default cursor for this window.
FXCursorgetDefaultCursor () const
 Return the default cursor for this window.
void setDragCursor (FXCursor *cur)
 Set the drag cursor for this window.
FXCursorgetDragCursor () const
 Return the drag cursor for this window.
FXbool getCursorPosition (FXint &x, FXint &y, FXuint &buttons) const
 Return the cursor position and mouse button-state.
FXbool setCursorPosition (FXint x, FXint y)
 Warp the cursor to the new position.
FXbool isActive () const
 Return true if the window is active.
FXbool hasFocus () const
 Return true if this window has the focus.
FXbool inFocusChain () const
 Return true if this window is in focus chain.
virtual void changeFocus (FXWindow *child)
 Notification that focus moved to new child.
FXbool isDefault () const
 Return true if this is the default window.
virtual void setDefault (FXuchar flag=true)
 This changes the default window which responds to the Return key in a dialog.
FXWindowfindDefault () const
 Find default window among this window's children.
FXbool isInitial () const
 Return true if this is the initial default window.
void setInitial (FXbool flag=true)
 Make this window the initial default window.
FXWindowfindInitial () const
 Find inital default window among this window's children.
FXbool isEnabled () const
 Return true if this window is able to receive mouse and keyboard events.
virtual void attach (FXID w)
 Attach foreign window handle to this window.
virtual void detach ()
 Detach the server-side resources for this window.
virtual void destroy ()
 Destroy the server-side resources for this window.
virtual void setShape (const FXRegion &region)
 Set window shape by means of region.
virtual void setShape (FXBitmap *bitmap)
 Set window shape by means of bitmap.
virtual void setShape (FXIcon *icon)
 Set window shape by means of icon.
virtual void clearShape ()
 Clear window shape.
virtual void raise ()
 Raise this window to the top of the stacking order.
virtual void lower ()
 Lower this window to the bottom of the stacking order.
virtual void move (FXint x, FXint y)
 Move the window immediately, in the parent's coordinate system.
virtual void resize (FXint w, FXint h)
 Resize the window to the specified width and height immediately, updating the server representation as well, if the window was realized.
virtual void position (FXint x, FXint y, FXint w, FXint h)
 Move and resize the window immediately, in the parent's coordinate system.
virtual void recalc ()
 Mark this window's layout as dirty for later layout.
void forceRefresh ()
 Generate a SEL_UPDATE message for the window and its children.
virtual void reparent (FXWindow *father, FXWindow *other=NULL)
 Reparent this window under new father before other.
void scroll (FXint x, FXint y, FXint w, FXint h, FXint dx, FXint dy) const
 Scroll rectangle x,y,w,h by a shift of dx,dy.
void update (FXint x, FXint y, FXint w, FXint h) const
 Mark the specified rectangle to be repainted later.
void update () const
 Mark the entire window to be repainted later.
void repaint (FXint x, FXint y, FXint w, FXint h) const
 Process any outstanding repaint messages immediately, for the given rectangle.
void repaint () const
 Process any outstanding repaint messages immediately.
FXbool grabbed () const
 Return true if the window has been grabbed.
void grab ()
 Grab the mouse to this window; future mouse events will be reported to this window even while the cursor goes outside of this window.
void ungrab ()
 Release the mouse grab.
FXbool grabbedKeyboard () const
 Return true if active grab is in effect.
void grabKeyboard ()
 Grab keyboard device.
void ungrabKeyboard ()
 Ungrab keyboard device.
FXbool shown () const
 Return true if the window is shown.
virtual void show ()
 Show this window.
virtual void hide ()
 Hide this window.
virtual FXbool isComposite () const
 Return true if the window is composite.
FXbool underCursor () const
 Return true if the window is under the cursor.
FXbool hasSelection () const
 Return true if this window owns the primary selection.
FXbool acquireSelection (const FXDragType *types, FXuint numtypes)
 Try to acquire the primary selection, given a list of drag types.
FXbool releaseSelection ()
 Release the primary selection.
FXbool hasClipboard () const
 Return true if this window owns the clipboard.
FXbool acquireClipboard (const FXDragType *types, FXuint numtypes)
 Try to acquire the clipboard, given a list of drag types.
FXbool releaseClipboard ()
 Release the clipboard.
FXbool isDropEnabled () const
 Return true if this window is able to receive drops.
virtual void dropEnable ()
 Enable this window to receive drops.
virtual void dropDisable ()
 Disable this window from receiving drops.
FXbool isDragging () const
 Return true if a drag operaion has been initiated from this window.
FXbool beginDrag (const FXDragType *types, FXuint numtypes)
 Initiate a drag operation with a list of previously registered drag types.
FXbool handleDrag (FXint x, FXint y, FXDragAction action=DRAG_COPY)
 When dragging, inform the drop-target of the new position and the drag action.
FXDragAction endDrag (FXbool drop=true)
 Terminate the drag operation with or without actually dropping the data Returns the action performed by the target.
FXbool isDropTarget () const
 Return true if this window is the target of a drop.
void setDragRectangle (FXint x, FXint y, FXint w, FXint h, FXbool wantupdates=true) const
 When being dragged over, indicate that no further SEL_DND_MOTION messages are required while the cursor is inside the given rectangle.
void clearDragRectangle () const
 When being dragged over, indicate we want to receive SEL_DND_MOTION messages every time the cursor moves.
void acceptDrop (FXDragAction action=DRAG_ACCEPT) const
 When being dragged over, indicate acceptance or rejection of the dragged data.
FXDragAction didAccept () const
 The target accepted our drop.
void dropFinished (FXDragAction action=DRAG_REJECT) const
 Sent by the drop target in response to SEL_DND_DROP.
FXbool inquireDNDTypes (FXDNDOrigin origin, FXDragType *&types, FXuint &numtypes) const
 When being dragged over, inquire the drag types which are being offered.
FXbool offeredDNDType (FXDNDOrigin origin, FXDragType type) const
 When being dragged over, return true if we are offered the given drag type.
FXDragAction inquireDNDAction () const
 When being dragged over, return the drag action.
FXbool setDNDData (FXDNDOrigin origin, FXDragType type, FXuchar *data, FXuint size) const
 Set DND data; the array must be allocated with allocElms() and ownership is transferred to the system.
FXbool setDNDData (FXDNDOrigin origin, FXDragType type, const FXString &string) const
 Set DND data from string value.
FXbool getDNDData (FXDNDOrigin origin, FXDragType type, FXuchar *&data, FXuint &size) const
 Get DND data; the caller becomes the owner of the array and must free it with freeElms().
FXbool getDNDData (FXDNDOrigin origin, FXDragType type, FXString &string) const
 Get DND data into string value.
virtual FXbool contains (FXint parentx, FXint parenty) const
 Return true if window logically contains the given point.
void translateCoordinatesFrom (FXint &tox, FXint &toy, const FXWindow *fromwindow, FXint fromx, FXint fromy) const
 Translate coordinates from fromwindow's coordinate space to this window's coordinate space.
void translateCoordinatesTo (FXint &tox, FXint &toy, const FXWindow *towindow, FXint fromx, FXint fromy) const
 Translate coordinates from this window's coordinate space to towindow's coordinate space.
virtual void setBackColor (FXColor clr)
 Set window background color.
FXColor getBackColor () const
 Get background color.
virtual FXbool doesSaveUnder () const
 Does save-unders.
virtual const FXchar * tr (const FXchar *text, const FXchar *hint=NULL, FXint count=-1) const FX_FORMAT(2)
 Translate message for localization; using the current FXTranslator, an attempt is made to translate the given message into the current language.
virtual ~FXWindow ()
 Destroy window.
- Public Member Functions inherited from FX::FXDrawable
FXVisualgetVisual () const
 Get the visual.
FXint getWidth () const
 Width of drawable.
FXint getHeight () const
 Height of drawable.
void setVisual (FXVisual *vis)
 Change visual.
virtual ~FXDrawable ()
 Cleanup.
- Public Member Functions inherited from FX::FXId
FXAppgetApp () const
 Get application.
FXID id () const
 Get XID handle.
void setUserData (FXptr ptr)
 Set user data pointer.
FXptr getUserData () const
 Get user data pointer.
virtual ~FXId ()
 Destructor.
- Public Member Functions inherited from FX::FXObject
const FXchar * getClassName () const
 Get class name of some object.
FXbool isMemberOf (const FXMetaClass *metaclass) const
 Check if object is member of metaclass.
virtual long tryHandle (FXObject *sender, FXSelector sel, void *ptr)
 Try handle message safely, catching certain exceptions.
virtual long onDefault (FXObject *, FXSelector, void *)
 Called for unhandled messages.
virtual ~FXObject ()
 Virtual destructor.

Static Public Attributes

static const FXchar textDelimiters []
 Default text delimiters.

Protected Member Functions

FXint index (FXint x) const
FXint coord (FXint i) const
FXint leftWord (FXint pos) const
FXint rightWord (FXint pos) const
FXint wordStart (FXint pos) const
FXint wordEnd (FXint pos) const
void drawCursor (FXuint state)
void paintCursor (FXDCWindow &dc) const
void eraseCursor (FXDCWindow &dc) const
void drawTextRange (FXDCWindow &dc, FXint fm, FXint to) const
void drawTextFragment (FXDCWindow &dc, FXint x, FXint y, FXint fm, FXint to) const
void drawPWDTextFragment (FXDCWindow &dc, FXint x, FXint y, FXint fm, FXint to) const
void enterText (const FXString &text, FXbool notify)
FXbool deletePendingSelection (FXbool notify)
- Protected Member Functions inherited from FX::FXFrame
void drawBorderRectangle (FXDCWindow &dc, FXint x, FXint y, FXint w, FXint h)
void drawRaisedRectangle (FXDCWindow &dc, FXint x, FXint y, FXint w, FXint h)
void drawSunkenRectangle (FXDCWindow &dc, FXint x, FXint y, FXint w, FXint h)
void drawRidgeRectangle (FXDCWindow &dc, FXint x, FXint y, FXint w, FXint h)
void drawGrooveRectangle (FXDCWindow &dc, FXint x, FXint y, FXint w, FXint h)
void drawDoubleRaisedRectangle (FXDCWindow &dc, FXint x, FXint y, FXint w, FXint h)
void drawDoubleSunkenRectangle (FXDCWindow &dc, FXint x, FXint y, FXint w, FXint h)
void drawFrame (FXDCWindow &dc, FXint x, FXint y, FXint w, FXint h)
- Protected Member Functions inherited from FX::FXWindow
 FXWindow (FXApp *a, FXVisual *vis)
 FXWindow (FXApp *a, FXWindow *own, FXuint opts, FXint x, FXint y, FXint w, FXint h)
virtual FXbool doesOverrideRedirect () const
void addColormapWindows ()
void remColormapWindows ()
- Protected Member Functions inherited from FX::FXDrawable
 FXDrawable (FXApp *a, FXint w, FXint h)
- Protected Member Functions inherited from FX::FXId
 FXId (FXApp *a)

Protected Attributes

FXString contents
FXFontfont
const FXchar * delimiters
FXString clipped
FXString help
FXString tip
FXColor textColor
FXColor selbackColor
FXColor seltextColor
FXColor cursorColor
FXuint blink
FXint cursor
FXint anchor
FXint columns
FXint shift
- Protected Attributes inherited from FX::FXFrame
FXColor baseColor
FXColor hiliteColor
FXColor shadowColor
FXColor borderColor
FXint padtop
FXint padbottom
FXint padleft
FXint padright
FXint border
- Protected Attributes inherited from FX::FXWindow
FXComposeContextcomposeContext
FXCursordefaultCursor
FXCursordragCursor
FXAccelTableaccelTable
FXObjecttarget
FXSelector message
FXint xpos
FXint ypos
FXColor backColor
FXString tag
FXuint flags
FXuint options
- Protected Attributes inherited from FX::FXDrawable
FXVisualvisual
FXint width
FXint height
- Protected Attributes inherited from FX::FXId
FXID xid

Detailed Description

A text field is a single-line text entry widget.

The text field widget supports clipboard for cut-and-paste operations. Text input may be constrained to a certain format; the built-in capabilities support integer and real number entry constraints; additional constraints on the input may be implemented by intercepting the SEL_VERIFY message; a custom handler should examine the tentative input string passed as type const FXchar* in the message data, and return a value of "0" if the new input is accepted. During text entry, the text field sends a SEL_CHANGED message to its target, with the message data set to the current text value of type const FXchar*. When the text is accepted by hitting ENTER, the SEL_COMMAND message is sent. The text field also sends SEL_COMMAND when the focus moves to another control. TEXTFIELD_ENTER_ONLY can be passed to suppress this feature. Typically, this flag is used in dialogs that close when ENTER is hit in a text field.


Member Function Documentation

void FX::FXTextField::setJustify ( FXuint  mode)

Change text justification mode.

The justify mode is a combination of horizontal justification (JUSTIFY_LEFT, JUSTIFY_RIGHT, or JUSTIFY_CENTER_X), and vertical justification (JUSTIFY_TOP, JUSTIFY_BOTTOM, JUSTIFY_CENTER_Y). Note that JUSTIFY_CENTER_X can not be set from the constructor since by default text fields are left-justified.


The documentation for this class was generated from the following file:

Copyright © 1997-2016 Jeroen van der Zijp