Grip widget

Application Header file <Xraw/Grip.h>
Class Header file <Xraw/GripP.h>
Class gripWidgetClass
Class Name Grip
Superclass Simple --> Core

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.


New Resources

Name Class Type Notes Default Value
callback Callback Callback C NULL
New Xraw resources
gripForeground GripForeground Pixel CSG Parent background
Obsolete resources
foreground Foreground Pixel CSG XtDefaultBackground
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.
gripForeground 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)

[Xraw home] [Xraw widget class hierarchy]
Vladimir T. Romanovski
romsky@hp1.oea.ihep.su