A text field is a single-line text entry widget.
Inheritance:
Public Methods
-
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 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
-
FXbool isEditable() const
- Return TRUE if text field may be edited
-
void setEditable(FXbool edit=TRUE)
- Change text field editability
-
void setCursorPos(FXint pos)
- Set cursor position
-
FXint getCursorPos() const
- Return cursor position
-
void setAnchorPos(FXint pos)
- Change anchor position
-
FXint getAnchorPos() const
- Return anchor position
-
void setText(const FXString& text)
- Set the text for this label
-
FXString getText() const
- Get the text for this label
-
void setFont(FXFont* fnt)
- Set the text font
-
FXFont* getFont() 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 setNumColumns(FXint cols)
- Change width of text field in terms of number of columns * `m'
-
FXint getNumColumns() const
- Return number of columns
-
void setJustify(FXuint mode)
- Change text justification mode
-
FXuint getJustify() const
- Return text justification mode
-
void setHelpText(const FXString& text)
- Set the status line help text for this label
-
FXString getHelpText() const
- Get the status line help text for this label
-
void setTipText(const FXString& text)
- Set the tool tip message for this text field
-
FXString getTipText() const
- Get the tool tip message for this text field
-
void setTextStyle(FXuint style)
- Change text style
-
FXuint getTextStyle() const
- Return text style
-
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 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
-
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
Inherited from FXFrame:
Public Methods
-
void setFrameStyle(FXuint style)
-
FXuint getFrameStyle() const
-
FXint getBorderWidth() const
-
void setPadTop(FXint pt)
-
FXint getPadTop() const
-
void setPadBottom(FXint pb)
-
FXint getPadBottom() const
-
void setPadLeft(FXint pl)
-
FXint getPadLeft() const
-
void setPadRight(FXint pr)
-
FXint getPadRight() const
-
void setHiliteColor(FXColor clr)
-
FXColor getHiliteColor() const
-
void setShadowColor(FXColor clr)
-
FXColor getShadowColor() const
-
void setBorderColor(FXColor clr)
-
FXColor getBorderColor() const
-
void setBaseColor(FXColor clr)
-
FXColor getBaseColor() const
Public Methods
-
FXWindow* getParent() const
-
FXWindow* getOwner() const
-
FXWindow* getShell() const
-
FXWindow* getRoot() const
-
FXWindow* getNext() const
-
FXWindow* getPrev() const
-
FXWindow* getFirst() const
-
FXWindow* getLast() const
-
FXWindow* getFocus() const
-
void setKey(FXuint k)
-
FXuint getKey() const
-
void setTarget(FXObject* t)
-
FXObject* getTarget() const
-
void setSelector(FXSelector sel)
-
FXSelector getSelector() const
-
FXint getX() const
-
FXint getY() const
-
virtual FXint getWidthForHeight(FXint givenheight)
-
virtual FXint getHeightForWidth(FXint givenwidth)
-
void setX(FXint x)
-
void setY(FXint y)
-
void setWidth(FXint w)
-
void setHeight(FXint h)
-
void setLayoutHints(FXuint lout)
-
FXuint getLayoutHints() const
-
FXAccelTable* getAccelTable() const
-
void setAccelTable(FXAccelTable* acceltable)
-
void addHotKey(FXHotKey code)
-
void remHotKey(FXHotKey code)
-
FXbool isShell() const
-
FXbool isChildOf(const FXWindow* window) const
-
FXbool containsChild(const FXWindow* child) const
-
FXWindow* getChildAt(FXint x, FXint y) const
-
FXint numChildren() const
-
FXint indexOfChild(const FXWindow* window) const
-
FXWindow* childAtIndex(FXint index) const
-
static FXWindow* commonAncestor(FXWindow* a, FXWindow* b)
-
void setDefaultCursor(FXCursor* cur)
-
FXCursor* getDefaultCursor() const
-
void setDragCursor(FXCursor* cur)
-
FXCursor* getDragCursor() const
-
FXint getCursorPosition(FXint& x, FXint& y, FXuint& buttons) const
-
FXint setCursorPosition(FXint x, FXint y)
-
FXbool isEnabled() const
-
FXbool isActive() const
-
FXbool hasFocus() const
-
virtual void setDefault(FXbool enable=TRUE)
-
FXbool isDefault() const
-
void setInitial(FXbool enable=TRUE)
-
FXbool isInitial() const
-
virtual void detach()
-
virtual void destroy()
-
virtual void raise()
-
virtual void lower()
-
virtual void move(FXint x, FXint y)
-
virtual void resize(FXint w, FXint h)
-
virtual void position(FXint x, FXint y, FXint w, FXint h)
-
virtual void recalc()
-
void forceRefresh()
-
virtual void reparent(FXWindow* newparent)
-
void scroll(FXint x, FXint y, FXint w, FXint h, FXint dx, FXint dy)
-
void update(FXint x, FXint y, FXint w, FXint h)
-
void update()
-
void repaint(FXint x, FXint y, FXint w, FXint h)
-
void repaint()
-
void grab()
-
void ungrab()
-
FXbool grabbed() const
-
void grabKeyboard()
-
void ungrabKeyboard()
-
FXbool grabbedKeyboard() const
-
virtual void show()
-
virtual void hide()
-
FXbool shown() const
-
virtual FXbool isComposite() const
-
FXbool underCursor() const
-
FXbool hasSelection() const
-
FXbool acquireSelection(const FXDragType* types, FXuint numtypes)
-
FXbool releaseSelection()
-
FXbool hasClipboard() const
-
FXbool acquireClipboard(const FXDragType* types, FXuint numtypes)
-
FXbool releaseClipboard()
-
void dropEnable()
-
void dropDisable()
-
FXbool isDropEnabled() const
-
FXbool isDragging() const
-
FXbool beginDrag(const FXDragType* types, FXuint numtypes)
-
FXbool handleDrag(FXint x, FXint y, FXDragAction action=DRAG_COPY)
-
FXbool endDrag(FXbool drop=TRUE)
-
FXbool isDropTarget() const
-
void setDragRectangle(FXint x, FXint y, FXint w, FXint h, FXbool wantupdates=TRUE)
-
void clearDragRectangle()
-
void acceptDrop(FXDragAction action=DRAG_ACCEPT)
-
FXDragAction didAccept() const
-
FXbool inquireDNDTypes(FXDNDOrigin origin, FXDragType*& types, FXuint& numtypes)
-
FXbool offeredDNDType(FXDNDOrigin origin, FXDragType type)
-
FXDragAction inquireDNDAction() const
-
FXbool setDNDData(FXDNDOrigin origin, FXDragType type, FXuchar* data, FXuint size)
-
FXbool getDNDData(FXDNDOrigin origin, FXDragType type, FXuchar*& data, FXuint& size)
-
virtual FXbool contains(FXint parentx, FXint parenty) const
-
void translateCoordinatesFrom(FXint& tox, FXint& toy, const FXWindow* fromwindow, FXint fromx, FXint fromy) const
-
void translateCoordinatesTo(FXint& tox, FXint& toy, const FXWindow* towindow, FXint fromx, FXint fromy) const
-
virtual void setBackColor(FXColor clr)
-
FXColor getBackColor() const
-
void linkBefore(FXWindow* sibling)
-
void linkAfter(FXWindow* sibling)
Public Methods
-
FXint getWidth() const
-
FXint getHeight() const
-
FXVisual* getVisual() const
-
void setVisual(FXVisual* vis)
Inherited from FXId:
Public Methods
-
FXApp* getApp() const
-
FXID id() const
-
void setUserData(void* ptr)
-
void* getUserData() const
Public Methods
-
const FXchar* getClassName() const
-
FXbool 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.
- 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 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
- FXbool isEditable() const
- Return TRUE if text field may be edited
- void setEditable(FXbool edit=TRUE)
- Change text field editability
- void setCursorPos(FXint pos)
- Set cursor position
- FXint getCursorPos() const
- Return cursor position
- void setAnchorPos(FXint pos)
- Change anchor position
- FXint getAnchorPos() const
- Return anchor position
- void setText(const FXString& text)
- Set the text for this label
- FXString getText() const
- Get the text for this label
- void setFont(FXFont* fnt)
- Set the text font
- FXFont* getFont() 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 setNumColumns(FXint cols)
- Change width of text field in terms of number of columns * `m'
- FXint getNumColumns() const
- Return number of columns
- void setJustify(FXuint mode)
- Change text justification mode
- FXuint getJustify() const
- Return text justification mode
- void setHelpText(const FXString& text)
- Set the status line help text for this label
- FXString getHelpText() const
- Get the status line help text for this label
- void setTipText(const FXString& text)
- Set the tool tip message for this text field
- FXString getTipText() const
- Get the tool tip message for this text field
- void setTextStyle(FXuint style)
- Change text style
- FXuint getTextStyle() const
- Return text style
- 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 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
- 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
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.