Grip Widget
Application header file <X11/Xaw/Grip.h>
Class header file <X11/Xaw/GripP.h>
Class gripWidgetClass
Class Name Grip
Superclass Simple
The Grip widget provides a small rectangular region in which user input
events (such as ButtonPress or ButtonRelease) may be handled. The most
common use for the Grip widget is as an attachment point for visually
repositioning an object, such as the pane border in a Paned widget.
Resources
When creating a Grip widget instance, the following resources are
retrieved from the argument list or from the resource database:
Name
Class
Type
Notes
Default Value
accelerators
Accelerators
AcceleratorTable
NULL
ancestorSensitive
AncestorSensitive
Boolean
D
True
background
Background
Pixel
XtDefaultBackground
backgroundPixmap
Pixmap
Pixmap
XtUnspecifiedPixmap
borderColor
BorderColor
Pixel
XtDefaultForeground
borderPixmap
Pixmap
Pixmap
XtUnspecifiedPixmap
borderWidth
BorderWidth
Dimension
0
callback
Callback
Callback
NULL
colormap
Colormap
Colormap
Parent's Colormap
cursor
Cursor
Cursor
None
cursorName
Cursor
String
NULL
depth
Depth
int
C
Parent's Depth
destroyCallback
Callback
XtCallbackList
NULL
foreground
Foreground
Pixel
XtDefaultForeground
height
Height
Dimension
8
insensitiveBorder
Insensitive
Pixmap
GreyPixmap
international
International
Boolean
C
False
mappedWhenManaged
MappedWhenManaged
Boolean
True
pointerColor
Foreground
Pixel
XtDefaultForeground
pointerColorBackground
Background
Pixel
XtDefaultBackground
screen
Screen
Screen
R
Parent's Screen
sensitive
Sensitive
Boolean
True
translations
Translations
TranslationTable
NULL
width
Width
Dimension
8
x
Position
Position
0
y
Position
Position
0
callback
All routines on this list are called whenever the GripAction
action routine is invoked. The call_data contains all
information passed to the action routine. A detailed description
is given below in the Grip Actions section.
foreground
A pixel value which indexes the widget's colormap to derive the color
used to flood fill the entire Grip widget.
Grip Actions
The Grip widget does not declare any default event translation bindings,
but it does declare a single action routine named GripAction. The
client specifies an arbitrary event translation table, optionally giving
parameters to the GripAction routine.
The GripAction routine executes the callbacks on the
callback list, passing as call_data a pointer to a
XawGripCallData structure, defined in the Grip widget's application
header file.
typedef struct _XawGripCallData {
XEvent *event;
String *params;
Cardinal num_params;
} XawGripCallDataRec, *XawGripCallData,
GripCallDataRec, *GripCallData; /* supported for R4 compatibility */
In this structure, the event is a pointer to the input event that
triggered the action. params and num_params give the string
parameters specified in the translation table for the particular event
binding.
The following is an example of a translation table that uses the GripAction:
<Btn1Down>: GripAction(press)
<Btn1Motion>: GripAction(move)
<Btn1Up>: GripAction(release)
For a complete description of the format of translation tables, see the
X Toolkit Intrinsics - C Language Interface.