FXTextField

class FXTextField

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

Inheritance:


Public Methods

[more] 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
[more]virtual void create()
Create server-side resources
[more]virtual void enable()
Enable text field
[more]virtual void disable()
Disable text field
[more]virtual FXint getDefaultWidth()
Return default width
[more]virtual FXint getDefaultHeight()
Return default height
[more]virtual FXbool canFocus() const
Yes, text field may receive focus
[more]virtual void setFocus()
Move the focus to this window
[more]virtual void killFocus()
Remove the focus from this window
[more]FXbool isEditable() const
Return TRUE if text field may be edited
[more]void setEditable(FXbool edit=TRUE)
Change text field editability
[more]void setCursorPos(FXint pos)
Set cursor position
[more]FXint getCursorPos() const
Return cursor position
[more]void setAnchorPos(FXint pos)
Change anchor position
[more]FXint getAnchorPos() const
Return anchor position
[more]void setText(const FXString& text)
Set the text for this label
[more]FXString getText() const
Get the text for this label
[more]void setFont(FXFont* fnt)
Set the text font
[more]FXFont* getFont() const
Get the text font
[more]void setTextColor(FXColor clr)
Change text color
[more]FXColor getTextColor() const
Return text color
[more]void setSelBackColor(FXColor clr)
Change selected background color
[more]FXColor getSelBackColor() const
Return selected background color
[more]void setSelTextColor(FXColor clr)
Change selected text color
[more]FXColor getSelTextColor() const
Return selected text color
[more]void setNumColumns(FXint cols)
Change width of text field in terms of number of columns * `m'
[more]FXint getNumColumns() const
Return number of columns
[more]void setJustify(FXuint mode)
Change text justification mode
[more]FXuint getJustify() const
Return text justification mode
[more]void setHelpText(const FXString& text)
Set the status line help text for this label
[more]FXString getHelpText() const
Get the status line help text for this label
[more]void setTipText(const FXString& text)
Set the tool tip message for this text field
[more]FXString getTipText() const
Get the tool tip message for this text field
[more]void setTextStyle(FXuint style)
Change text style
[more]FXuint getTextStyle() const
Return text style
[more]FXbool selectAll()
Select all text
[more]FXbool setSelection(FXint pos, FXint len)
Select len characters starting at given position pos
[more]FXbool extendSelection(FXint pos)
Extend the selection from the anchor to the given position
[more]FXbool killSelection()
Unselect the text
[more]FXbool isPosSelected(FXint pos) const
Return TRUE if position pos is selected
[more]FXbool isPosVisible(FXint pos) const
Return TRUE if position is fully visible
[more]void makePositionVisible(FXint pos)
Scroll text to make the given position visible
[more]virtual void save(FXStream& store) const
Save text field to a stream
[more]virtual void load(FXStream& store)
Load text field from a stream
[more]virtual ~FXTextField()
Destructor


Inherited from FXFrame:

Public Methods

ovoid setFrameStyle(FXuint style)
oFXuint getFrameStyle() const
oFXint getBorderWidth() const
ovoid setPadTop(FXint pt)
oFXint getPadTop() const
ovoid setPadBottom(FXint pb)
oFXint getPadBottom() const
ovoid setPadLeft(FXint pl)
oFXint getPadLeft() const
ovoid setPadRight(FXint pr)
oFXint getPadRight() const
ovoid setHiliteColor(FXColor clr)
oFXColor getHiliteColor() const
ovoid setShadowColor(FXColor clr)
oFXColor getShadowColor() const
ovoid setBorderColor(FXColor clr)
oFXColor getBorderColor() const
ovoid setBaseColor(FXColor clr)
oFXColor getBaseColor() const


Inherited from FXWindow:

Public Methods

oFXWindow* getParent() const
oFXWindow* getOwner() const
oFXWindow* getShell() const
oFXWindow* getRoot() const
oFXWindow* getNext() const
oFXWindow* getPrev() const
oFXWindow* getFirst() const
oFXWindow* getLast() const
oFXWindow* getFocus() const
ovoid setKey(FXuint k)
oFXuint getKey() const
ovoid setTarget(FXObject* t)
oFXObject* getTarget() const
ovoid setSelector(FXSelector sel)
oFXSelector getSelector() const
oFXint getX() const
oFXint getY() const
ovirtual FXint getWidthForHeight(FXint givenheight)
ovirtual FXint getHeightForWidth(FXint givenwidth)
ovoid setX(FXint x)
ovoid setY(FXint y)
ovoid setWidth(FXint w)
ovoid setHeight(FXint h)
ovoid setLayoutHints(FXuint lout)
oFXuint getLayoutHints() const
oFXAccelTable* getAccelTable() const
ovoid setAccelTable(FXAccelTable* acceltable)
ovoid addHotKey(FXHotKey code)
ovoid remHotKey(FXHotKey code)
oFXbool isShell() const
oFXbool isChildOf(const FXWindow* window) const
oFXbool containsChild(const FXWindow* child) const
oFXWindow* getChildAt(FXint x, FXint y) const
oFXint numChildren() const
oFXint indexOfChild(const FXWindow* window) const
oFXWindow* childAtIndex(FXint index) const
ostatic FXWindow* commonAncestor(FXWindow* a, FXWindow* b)
ovoid setDefaultCursor(FXCursor* cur)
oFXCursor* getDefaultCursor() const
ovoid setDragCursor(FXCursor* cur)
oFXCursor* getDragCursor() const
oFXint getCursorPosition(FXint& x, FXint& y, FXuint& buttons) const
oFXint setCursorPosition(FXint x, FXint y)
oFXbool isEnabled() const
oFXbool isActive() const
oFXbool hasFocus() const
ovirtual void setDefault(FXbool enable=TRUE)
oFXbool isDefault() const
ovoid setInitial(FXbool enable=TRUE)
oFXbool isInitial() const
ovirtual void detach()
ovirtual void destroy()
ovirtual void raise()
ovirtual void lower()
ovirtual void move(FXint x, FXint y)
ovirtual void resize(FXint w, FXint h)
ovirtual void position(FXint x, FXint y, FXint w, FXint h)
ovirtual void recalc()
ovoid forceRefresh()
ovirtual void reparent(FXWindow* newparent)
ovoid scroll(FXint x, FXint y, FXint w, FXint h, FXint dx, FXint dy)
ovoid update(FXint x, FXint y, FXint w, FXint h)
ovoid update()
ovoid repaint(FXint x, FXint y, FXint w, FXint h)
ovoid repaint()
ovoid grab()
ovoid ungrab()
oFXbool grabbed() const
ovoid grabKeyboard()
ovoid ungrabKeyboard()
oFXbool grabbedKeyboard() const
ovirtual void show()
ovirtual void hide()
oFXbool shown() const
ovirtual FXbool isComposite() const
oFXbool underCursor() const
oFXbool hasSelection() const
oFXbool acquireSelection(const FXDragType* types, FXuint numtypes)
oFXbool releaseSelection()
oFXbool hasClipboard() const
oFXbool acquireClipboard(const FXDragType* types, FXuint numtypes)
oFXbool releaseClipboard()
ovoid dropEnable()
ovoid dropDisable()
oFXbool isDropEnabled() const
oFXbool isDragging() const
oFXbool beginDrag(const FXDragType* types, FXuint numtypes)
oFXbool handleDrag(FXint x, FXint y, FXDragAction action=DRAG_COPY)
oFXbool endDrag(FXbool drop=TRUE)
oFXbool isDropTarget() const
ovoid setDragRectangle(FXint x, FXint y, FXint w, FXint h, FXbool wantupdates=TRUE)
ovoid clearDragRectangle()
ovoid acceptDrop(FXDragAction action=DRAG_ACCEPT)
oFXDragAction didAccept() const
oFXbool inquireDNDTypes(FXDNDOrigin origin, FXDragType*& types, FXuint& numtypes)
oFXbool offeredDNDType(FXDNDOrigin origin, FXDragType type)
oFXDragAction inquireDNDAction() const
oFXbool setDNDData(FXDNDOrigin origin, FXDragType type, FXuchar* data, FXuint size)
oFXbool getDNDData(FXDNDOrigin origin, FXDragType type, FXuchar*& data, FXuint& size)
ovirtual FXbool contains(FXint parentx, FXint parenty) const
ovoid translateCoordinatesFrom(FXint& tox, FXint& toy, const FXWindow* fromwindow, FXint fromx, FXint fromy) const
ovoid translateCoordinatesTo(FXint& tox, FXint& toy, const FXWindow* towindow, FXint fromx, FXint fromy) const
ovirtual void setBackColor(FXColor clr)
oFXColor getBackColor() const
ovoid linkBefore(FXWindow* sibling)
ovoid linkAfter(FXWindow* sibling)


Inherited from FXDrawable:

Public Methods

oFXint getWidth() const
oFXint getHeight() const
oFXVisual* getVisual() const
ovoid setVisual(FXVisual* vis)


Inherited from FXId:

Public Methods

oFXApp* getApp() const
oFXID id() const
ovoid setUserData(void* ptr)
ovoid* getUserData() const


Inherited from FXObject:

Public Methods

oconst FXchar* getClassName() const
oFXbool isMemberOf(const FXMetaClass* metaclass) const


Documentation

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.
o 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

ovirtual void create()
Create server-side resources

ovirtual void enable()
Enable text field

ovirtual void disable()
Disable text field

ovirtual FXint getDefaultWidth()
Return default width

ovirtual FXint getDefaultHeight()
Return default height

ovirtual FXbool canFocus() const
Yes, text field may receive focus

ovirtual void setFocus()
Move the focus to this window

ovirtual void killFocus()
Remove the focus from this window

oFXbool isEditable() const
Return TRUE if text field may be edited

ovoid setEditable(FXbool edit=TRUE)
Change text field editability

ovoid setCursorPos(FXint pos)
Set cursor position

oFXint getCursorPos() const
Return cursor position

ovoid setAnchorPos(FXint pos)
Change anchor position

oFXint getAnchorPos() const
Return anchor position

ovoid setText(const FXString& text)
Set the text for this label

oFXString getText() const
Get the text for this label

ovoid setFont(FXFont* fnt)
Set the text font

oFXFont* getFont() const
Get the text font

ovoid setTextColor(FXColor clr)
Change text color

oFXColor getTextColor() const
Return text color

ovoid setSelBackColor(FXColor clr)
Change selected background color

oFXColor getSelBackColor() const
Return selected background color

ovoid setSelTextColor(FXColor clr)
Change selected text color

oFXColor getSelTextColor() const
Return selected text color

ovoid setNumColumns(FXint cols)
Change width of text field in terms of number of columns * `m'

oFXint getNumColumns() const
Return number of columns

ovoid setJustify(FXuint mode)
Change text justification mode

oFXuint getJustify() const
Return text justification mode

ovoid setHelpText(const FXString& text)
Set the status line help text for this label

oFXString getHelpText() const
Get the status line help text for this label

ovoid setTipText(const FXString& text)
Set the tool tip message for this text field

oFXString getTipText() const
Get the tool tip message for this text field

ovoid setTextStyle(FXuint style)
Change text style

oFXuint getTextStyle() const
Return text style

oFXbool selectAll()
Select all text

oFXbool setSelection(FXint pos, FXint len)
Select len characters starting at given position pos

oFXbool extendSelection(FXint pos)
Extend the selection from the anchor to the given position

oFXbool killSelection()
Unselect the text

oFXbool isPosSelected(FXint pos) const
Return TRUE if position pos is selected

oFXbool isPosVisible(FXint pos) const
Return TRUE if position is fully visible

ovoid makePositionVisible(FXint pos)
Scroll text to make the given position visible

ovirtual void save(FXStream& store) const
Save text field to a stream

ovirtual void load(FXStream& store)
Load text field from a stream

ovirtual ~FXTextField()
Destructor


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.