### _________________________________________________________Xaw Plus

### The Grip Widget

Application Header file Class Header file Class Class Name Superclass | <X11/XawPlus/Grip.h> <X11/XawPlus/GripP.h> gripWidgetClass Grip 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.

### Differences between Xaw and XawPlus

The resource foreground is not needed by XawPlus and therefore deleted . Since the core extension class Add3dExt is inserted, the Grip widget has the additional resources highlightColor, shadowColor and buttonBorderWidth. The default background color is now grey75.

### Resources

When creating a Grip widget instance, the following resources are retrieved from the argument list of XtSetValues() or XtVaSetValues() or from the resource database:

Name | Class | Type | Default Value
OBJECT: |  |  |
destroyCallback | Callback | Pointer | NULL
RECTANGLE: |  |  |
borderWidth height sensitive width x y | BorderWidth Height Sensitive Width Position Position | Dimension Dimension Boolean Dimension Position Position | 0 12 True 12 0 0
CORE: |  |  |
border background mappedWhenManaged | BorderColor Background MappedWhenManaged | Pixel Pixel Boolean | XtDefaultForeground grey75 True
SIMPLE: |  |  |
cursor cursorName pointerColor pointerColorBackground insensitiveBorder international highlightColor shadowColor buttonBorderWidth | Cursor Cursor Foreground Background Insensitive International Background Background Width | Cursor String Pixel Pixel Pixmap Boolean Pixel Pixel Dimension | None NULL XtDefaultForeground XtDefaultBackground NULL False grey90 grey40 2
GRIP: |  |  |
callback | Callback | Pointer | NULL

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 more thorough description is given below in the Grip Actions section.

### 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;

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> : <Btn1Motion> : <Btn1Up> : | GripAction(press) GripAction(move) GripAction(release)

### Xaw Plus_________________________________________________________