.\" $Xorg: Panner,v 1.3 2000/08/17 19:42:27 cpqbld Exp $
.NH 2
Panner Widget
.LP
.XS
	Panner Widget
.XE
.IN "Panner widget" "" "@DEF@"
.Ds 0
.TA 2.0i
.ta 2.0i
.sp
Application header file	<X11/Xaw/Panner.h>
.IN "Panner.h" ""
Class header file	<X11/Xaw/PannerP.h>
.IN "PannerP.h" ""
Class		pannerWidgetClass
.IN "pannerWidgetClass" ""
Class Name	Panner
.IN "Panner widget" "class name"
Superclass	Simple
.sp
.De
.LP
A Panner widget is a rectangle, called the
``canvas,'' on which another rectangle, the ``slider,'' moves in two
dimensions.  It is often used with a Porthole widget to move, or
``scroll,'' a third widget in two dimensions, in which case the
slider's size and position gives feedback as to what portion of
the third widget is visible.
.LP
The slider may be scrolled around the canvas by pressing,
dragging, and releasing Button1; the default translation also
enables scrolling via arrow keys and some other keys.  While
scrolling is in progress, the application receives notification
through callback procedures.  Notification may be done either
continuously whenever the slider moves or discretely whenever the
slider has been given a new location.
.NH 3
Resources
.LP
When creating a Panner widget instance, the following resources are
retrieved from the argument list or from the resource database:
.LP
.IN "Panner widget" "resources"
.TS H
expand;
lw(1i) lw(1i) lw(1i) lw(.5i) lw(2i).
_
.sp 3p
.TB
Name	Class	Type	Notes	Default Value
.sp 3p
_
.TH
.R
.sp 3p
accelerators	Accelerators	AcceleratorTable		NULL
allowOff	AllowOff	Boolean		False
ancestorSensitive	AncestorSensitive	Boolean	D	True
background	Background	Pixel		XtDefaultBackground
backgroundPixmap	Pixmap	Pixmap		XtUnspecifiedPixmap
backgroundStipple	BackgroundStipple	String		NULL
borderColor	BorderColor	Pixel		XtDefaultForeground
borderPixmap	Pixmap	Pixmap		XtUnspecifiedPixmap
borderWidth	BorderWidth	Dimension		1
canvasHeight	CanvasHeight	Dimension		0
canvasWidth	CanvasWidth	Dimension		0
colormap	Colormap	Colormap		Parent's Colormap
cursor	Cursor	Cursor		None
cursorName	Cursor	String		NULL
defaultScale	DefaultScale	Dimension		8
depth	Depth	int	C	Parent's Depth
destroyCallback	Callback	XtCallbackList		NULL
foreground	Foreground	Pixel		XtDefaultForeground
height	Height	Dimension	A	depends on orientation
internalSpace	InternalSpace	Dimension		4
international	International	Boolean	C	False
lineWidth	LineWidth	Dimension		0
mappedWhenManaged	MappedWhenManaged	Boolean		True
pointerColor	Foreground	Pixel		XtDefaultForeground
pointerColorBackground	Background	Pixel		XtDefaultBackground
reportCallback	ReportCallback	Callback		NULL
resize	Resize	Boolean		True
rubberBand	RubberBand	Boolean		False
screen	Screen	Screen	R	Parent's Screen
sensitive	Sensitive	Boolean		True
shadowColor	ShadowColor	Pixel		XtDefaultForeground
shadowThickness	ShadowThickness	Dimension		2
sliderX	SliderX	Position		0
sliderY	SliderY	Position		0
sliderHeight	SliderHeight	Dimension		0
sliderWidth	SliderWidth	Dimension		0
translations	Translations	TranslationTable		See below
width	Width	Dimension	A	depends on orientation
x	Position	Position		0
y	Position	Position		0
.sp 3p
_
.TE
.Ac
.IP \fBallowOff\fP 1.5i
Whether to allow the edges of the slider to go off the edges of the canvas.
.As
.Bg
.Gp
.IP \fBbackgroundStipple\fP 1.5i
The name of a bitmap pattern to be used as the background for
the area representing the canvas.
.Bc
.Bp
.Bw
.IP \fBcanvasHeight\fP 1.5i
.br
.ns
.IP \fBcanvasWidth\fP 1.5i
The size of the canvas.
.Cm
.Cu
.Cn
.IP \fBdefaultScale\fP 1.5i
The percentage size that the Panner widget should have relative
to the size of the canvas.
.Dp
.Dc
.IP \fBforeground\fP 1.5i
A pixel value which indexes the widget's colormap to derive the color
used to draw the slider.
.Hw
.IP \fBinternalSpace\fP 1.5i
The width of internal border in pixels between a slider representing the 
full size of the canvas
and the edge of the Panner widget.
.Ix
.IP \fBlineWidth\fP 1.5i
The width of the lines in the rubberbanding rectangle when rubberbanding
is in effect instead of continuous scrolling.  The default is 0.
.Mm
.Pf
.Pb
.IP \fBreportCallback\fP 1.5i
All functions on this callback list are called when the
\fBnotify\fP action is invoked.  See the \fBPanner Actions\fP section 
for details.
.IP \fBresize\fP 1.5i
Whether or not to resize the panner whenever the canvas size is changed so
that the \fBdefaultScale\fP is maintained.
.IP \fBrubberBand\fP 1.5i
Whether or not scrolling should be discrete (only moving a rubberbanded
rectangle until the scrolling is done) or continuous (moving the slider
itself).  This controls whether or not the \fBmove\fP action procedure also
invokes the \fBnotify\fP action procedure.
.Sc
.Se
.IP \fBshadowColor\fP 1.5i
The color of the shadow underneath the slider.
.IP \fBshadowThickness\fP 1.5i
The width of the shadow underneath the slider.
.IP \fBsliderX\fP 1.5i
.br
.ns
.IP \fBsliderY\fP 1.5i
The location of the slider in the coordinates of the canvas.
.IP \fBsliderHeight\fP 1.5i
.br
.ns
.IP \fBsliderWidth\fP 1.5i
The size of the slider.
.Tr
.Xy
.NH 3 
Panner Actions
.IN "Panner widget" "actions"
.LP
The actions supported by the Panner widget are:
.IP \fBstart\fP() 1.5i
This action begins movement of the slider.
.IP \fBstop\fP() 1.5i
This action ends movement of the slider.
.IP \fBabort\fP() 1.5i
This action ends movement of the slider and restores it to the position it
held when the \fBstart\fP action was invoked.
.IP \fBmove\fP() 1.5i
This action moves the outline of the slider (if the \fBrubberBand\fP resource
is True) or the slider itself (by invoking the \fBnotify\fP
action procedure).
.IP \fBpage\fP(\fIxamount\fP,\fIyamount\fP) 1.5i
This action moves the slider by the specified amounts.  The format
for the amounts is a signed or unsigned floating-point number (e.g., +1.0
or \-.5) followed
by either \fBp\fP indicating pages (slider sizes), or \fBc\fP indicating
canvas sizes.  Thus, \fIpage(+0,+.5p)\fP represents vertical movement down
one-half the height of the slider and \fIpage(0,0)\fP represents moving to
the upper left corner of the canvas.
.IP \fBnotify\fP() 1.5i
This action informs the application of the slider's current position by 
invoking the \fBreportCallback\fP functions registered by the application.
.IP \fBset\fP(\fIwhat\fP,\fIvalue\fP) 1.5i
This action changes the behavior of the Panner.  The \fIwhat\fP argument 
must currently be the string \fBrubberband\fP and controls the value of 
the \fBrubberBand\fP resource.  The \fIvalue\fP argument 
may have one of the values \fBon\fP, \fBoff\fP, or \fBtoggle\fP.
.LP
.sp
The default bindings for Panner are:
.IN "Panner widget" "default translation table"
.LP
.Ds 0
.TA .5i 1.75i
.ta .5i 1.75i
	<Btn1Down>:	start(\|)
	<Btn1Motion>:	move(\|)
	<Btn1Up>:	notify(\|) stop(\|)
	<Btn2Down>:	abort(\|)
	<Key>KP_Enter:	set(rubberband,toggle)
	<Key>space:	page(+1p,+1p)
	<Key>Delete:	page(\-1p,\-1p)
	<Key>BackSpace:	page(\-1p,\-1p)
	<Key>Left:	page(\-.5p,+0)
	<Key>Right:	page(+.5p,+0)
	<Key>Up:	page(+0,\-.5p)
	<Key>Down:	page(+0,+.5p)
	<Key>Home:	page(0,0)
.De
.NH 3
Panner Callbacks
.IN "Panner widget" "callbacks"
.LP
The functions registered on the \fBreportCallback\fP list are invoked by
the \fBnotify\fP action as follows:
.IN "ReportProc" "" "@DEF@"
.FD 0
void ReportProc(\fIpanner\fP, \fIclient_data\fP, \fIreport\fP)
.br
	Widget \fIpanner\fP;
.br
	XtPointer \fIclient_data\fP;
.br
	XtPointer \fIreport\fP;    /* (XawPannerReport *) */
.FN
.IP \fIpanner\fP 1i
Specifies the Panner widget.
.IP \fIclient_data\fP 1i
Specifies the client data.
.IP \fIreport\fP 1i
Specifies a pointer to an \fBXawPannerReport\fP structure containing
the location and size of the slider and the size of the canvas.
