Specifications
Athena Widget Set libXaw 1.0.7
<Btn1Up>: stop( )unset( )
3.7. Scrollbar Widget
Application header file <X11/Xaw/Scrollbar.h>
Class header file <X11/Xaw/ScrollbarP.h>
Class scrollbarWidgetClass
Class Name Scrollbar
Superclass Simple
AScrollbar widget is a rectangle, called the ‘‘canvas,’’ onwhich another rectangle, the ‘‘thumb,’’
movesinone dimension, either vertically or horizontally.AScrollbar can be used alone, as a
value generator,oritcan be used within a composite widget (for example, a Viewport). When a
Scrollbar is used to move,or‘‘scroll,’’ the contents of another widget, the size and the position of
the thumb usually give feedback as to what portion of the other widget’scontents are visible.
Each pointer button invokesaspecific action. Pointer buttons 1 and 3 do not move the thumb
automatically.Instead, theyreturn the pixel position of the cursor on the scroll region. When
pointer button 2 is clicked, the thumb movestothe current pointer position. When pointer button
2isheld down and the pointer is moved, the thumb follows the pointer.
The pointer cursor in the scroll region changes depending on the current action. When no pointer
button is pressed, the cursor appears as a double-headed arrowthat points in the direction that
scrolling can occur.When pointer button 1 or 3 is pressed, the cursor appears as a single-headed
arrowthat points in the logical direction that the thumb will move.When pointer button 2 is
pressed, the cursor appears as an arrowthat points to the top or the left of the thumb.
When the user scrolls, the application receivesnotification through callback procedures. Forboth
discrete scrolling actions, the callback returns the Scrollbar widget, the client_data, and the pixel
position of the pointer when the button was released. Forcontinuous scrolling, the callback rou-
tine returns the scroll bar widget, the client data, and the current relative position of the thumb.
When the thumb is movedusing pointer button 2, the callback procedure is invokedcontinuously.
When either button 1 or 3 is pressed, the callback procedure is invokedonly when the button is
released and the client callback procedure is responsible for moving the thumb.
3.7.1. Resources
When creating a Scrollbar widget instance, the following resources are retrievedfrom the argu-
ment 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 1
colormap Colormap Colormap parent’sColormap
cursor Cursor Cursor None
cursorName Cursor String NULL
depth Depth int C parent’sDepth
destroyCallback Callback XtCallbackList NULL
foreground Foreground Pixel XtDefaultForeground
41