XmQTaccessTextual(3X) UNIX System V XmQTaccessTextual(3X)
NAME
XmQTaccessTextual - A widget holding this trait can display
textual data
SYNOPSIS
#include <Xm/AccTextT.h>
typedef struct {
int version;
XmAccessTextualGetValuesProc getValue;
XmAccessTextualSetValuesProc setValue;
XmAccessTextualPreferredProc preferredFormat;
} XmAccessTextualTraitRec, *XmAccessTextualTrait;
XtPointer (*XmAccessTextualGetValuesProc)(
Widget,
int,
void (*XmAccessTextualSetValuesProc)(
Widget,
XtPointer,
int,
int (*XmAccessTextualPreferredProc)(
Widget);
VERSION
This page documents Motif 2.1.
DESCRIPTION
A widget holding the XmQTaccessTextual trait is capable of
rendering one primary parcel of textual data. The primary
parcel may consist of many lines (like in XmText) or only
one line (like in XmTextField). However, if the widget
renders more than one parcel of textual data (as does
XmList), then the widget should not hold this trait.
The following standard Motif primitive widgets hold this
trait:
o XmText
o XmTextField
o XmLabel and all its subclasses
The following standard Motif manager widgets examine their
child widgets for this trait:
o XmComboBox
o XmNotebook
o XmSelectionBox
Page 1 (printed 7/20/06)
XmQTaccessTextual(3X) UNIX System V XmQTaccessTextual(3X)
o XmSpinBox
(See the source code for the ExmString demonstration widget
for an example use of this trait.)
The getValue Trait Method
XtPointer getValue(
Widget widget,
int format);
The getValue trait method returns a copy of the textual data
associated with widget widget in the format specified by
format.
widget Specifies the widget holding this trait.
format Specifies the string format in which the method
should return the data. The format must be one of
the following: XmFORMAT_XmSTRING, XmFORMAT_MBYTE,
or XmFORMAT_WCS.
This method returns a copy of the textual data in the format
specified by format. The caller is responsible for managing
the space allocated by the copy. If the format is
XmFORMAT_XmSTRING, then the method returns an XmString cast
to an XtPointer. If the format is XmFORMAT_MBYTE or
XmFORMAT_WCS, then the method returns a char* cast to an
XtPointer.
The setValue Trait Method
void setValue(
Widget widget,
XtPointer str,
int format);
A parent widget calls the setValue method to set the string
data associated with child widget widget. The parent
specifies both the string data (str) and the format of that
string data.
widget Specifies the widget holding this trait.
str Specifies the string data to be associated with
the child widget.
format Specifies the format of the string data. The
format must be one of the following:
XmFORMAT_XmSTRING, XmFORMAT_MBYTE, or
XmFORMAT_WCS.
The preferredFormat Trait Method
int preferredFormat(
Page 2 (printed 7/20/06)
XmQTaccessTextual(3X) UNIX System V XmQTaccessTextual(3X)
Widget widget);
A parent widget calls the preferredFormat method to find the
format in which the child widget prefers to receive its
string data.
widget Specifies the widget holding this trait.
This method returns the preferred string format of the child
widget. The returned format must be one of the following:
XmFORMAT_XmSTRING, XmFORMAT_MBYTE, or XmFORMAT_WCS.
RELATED
ExmString(3).
Page 3 (printed 7/20/06)