XmText

NAME
SYNOPSYS
DESCRIPTION
X RESOURCES
CLASS HIERARCHY
CALLBACKS
ACTIONS
CONVENIENCE FUNCTIONS
SEE ALSO

NAME

XmText

SYNOPSYS

#include <Xm/Text.h>

XmText

XmCreateText

DESCRIPTION

XmText

X RESOURCES

XmNsource

XmNactivateCallback

XmNfocusCallback

XmNlosingFocusCallback

XmNvalueChangedCallback

XmNmodifyVerifyCallback

XmNmodifyVerifyCallbackWcs

XmNmotionVerifyCallback

XmNgainPrimaryCallback

XmNlosePrimaryCallback

XmNvalue

XmNvalueWcs

XmNmaxLength

XmNmarginHeight

XmNmarginWidth

XmNoutputCreate

XmNinputCreate

XmNtopCharacter

XmNcursorPosition

XmNeditMode

XmNautoShowCursorPosition

XmNeditable

XmNverifyBell

XmNshadowThickness

XmNhighlightThickness

XmNnavigationType

CLASS HIERARCHY

Object(3) Rect(3) UnNamedObj(3) Core(3) XmPrimitive(3) XmText(3)

CALLBACKS

The XmText widget defines a large number of callback lists : XmNactivateCallback, XmNfocusCallback, XmNlosingFocusCallback, XmNvalueChangedCallback, XmNmodifyVerifyCallback, XmNmodifyVerifyCallbackWcs, XmNmotionVerifyCallback, XmNgainPrimaryCallback, XmNlosePrimaryCallback. The XmNactivateCallback can only be called if the XmNeditMode is XmSINGLE_LINE_EDIT.
typedef struct {

int reason;
XEvent *event;
Boolean doit;
XmTextPosition currInsert, newInsert;
XmTextPosition startPos, endPos;
XmTextBlock text;
} XmTextVerifyCallbackStruct, *XmTextVerifyPtr;

typedef struct {
char *ptr;
int length;
XmTextFormat format;
} XmTextBlockRec, *XmTextBlock;

typedef struct {
wchar_t *wcsptr;
int length;
} XmTextBlockRecWcs, *XmTextBlockWcs;

typedef struct {
int reason;
XEvent *event;
Boolean doit;
XmTextPosition currInsert, newInsert;
XmTextPosition startPos, endPos;
XmTextBlockWcs text;
} XmTextVerifyCallbackStructWcs, *XmTextVerifyPtrWcs;

ACTIONS

CONVENIENCE FUNCTIONS

XmTextClearSelection(Widget w,Time time)

Clears the primary selection from the Text Widget.

Boolean XmTextCopy(Widget w,Time time)

Copies the primary selection from the Text Widget to the Clipboard.

Boolean XmTextCut(Widget w,Time time)

Copies the primary selection from the Text Widget to the Clipboard and deletes it from the Text Widget.

int XmTextGetBaseline(Widget w)

Gets the X position of the first baseline in the Text Widget.

Boolean XmTextGetEditable(Widget w)

Determine the Editable permission state.

XmTextPosition XmTextGetInsertionPositiom(Widget w)

Determine the insertion position of the cursor.

XmTextPosition XmTextGetLastPosition(Widget w)

Determine the position of the last character in the Text Widget.

int XmTextGetMaxLength(Widget w)

Determine the maximum allowable text string length.

char *XmTextGetSelection(Widget w)

Gets the string that is in the primary selection.

Boolean XmTextGetSelectionPosition(Widget w,XmTextPosition *left,XmTextPosition *right)

Accesses the position of the Lest and Right position of the primary position.

XmTextSource XmTextGetSource(Widget w)

obtain the source of the Text Widget.

char *XmTextGetString(Widget w)

Obtain the text from the Text Widget.

XmTextPosition XmTextGetTopCharacter(Widget w)

Determine the position of the top of the text in the Text Widget.

void XmTextInsert(Widget w,XmTextPosition pos ,char *value)

Insert a string into the text string at a position determined by pos.

Boolean XmTextPaste(Widget w)

Insert the clipboard selection into the Text Widget.

Boolean XmTextPosToXY(Widget w,XmTextPosition pos, Position *x,Position *y)

Converts a TextPosition into a x,y position.

Boolean XmTextRemove(Widget w)

Deletes the primary selection.

void XmTextReplace(Widget w,XmTextPosition a,XmTextPosition b,char *value)

Replace the text from a to b with that given in value.

void XmTextScroll(Widget w,int num_of_lines)

Scroll the TextWidget num_of_lines.

void XmTextSetAddMode(Widget w,Boolean state)

Sets the Add Mode state of the Text Widget.

void XmTextSetEditable(Widget w,Boolean state)

Sets the Editable state of the Text Widget.

void XmTextSetHighlight(Widget w,XmTextPosition left,XmTextPosition right, XmHighLightMode mode)

Highlights the text between the two positions.

void XmTextSetInsertionPosition(Widget w,XmTextPosition pos)

Set the position of the insertion cursor.

void XmTextSetMaxLength(Widget w,int max_length)

Set the maximum length of the text string of the text widget.

void XmTextSetSelection(Widget w,XmTextPosition first,XmTextPosition last,Time time)

Set the primary selection of of the text widget.

void XmTextSetSource(Widget w,XmTextSource source,XmTextPosition top_char,XmTextPosition cursor_pos)

Set the text source for the text widget.

void XmTextSetString(Widget w,char *value)

Set the String value.

void XmTextSetTopCharacter(Widget w,XmTextPosition top_character)

Sets the position of the first character displayed.

void XmTextShowPosition(Widget w,XmTextPosition)

Show the text at a given position.

XmTextPosition XmTextXYToPos(Widget w,Position x,Position y)

Converts an X,Y position into an XmTextPosition.

SEE ALSO