•  Back 
  •  XCONTROL Utility Functions 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-FileXCONTROL Utility Functions
Sl_arrow()                                                         XCONTROL

Syntax

VOID (*xcpb->Sl_arrow)( tree, base, slider, obj, inc, min, max, numvar,
                        dir, foo )
OBJECT *tree;
WORD base, slider, obj, inc, min, max;
WORD *numvar;
WORD dir;
VOID (*foo)();

Function      Sl_arrow() is called by a CPX when the user clicks on an
              arrow element of an 'active' slider.

Parameters    tree points to the object tree containing the slider
              elements. base is the object index of the slider 'track'.
              slider is the object index of the slider 'elevator'. obj is
              the index of the arrow element clicked on by the user.
              inc specifies the increment amount for each slider step (+/-).
              min specifies the minimum value the slider can represent.
              max specifies the maximum value the slider can
              represent. numvar points to a WORD containing the value which
              the slider represents and which is to be updated as the
              slider is moved. dir specifies the direction of the slider
              movement (VERTICAL (0) or HORIZONTAL (1) ). foo is a pointer
              to a user-defined callback function which is called once for
              each step of the slider to allow the user's action to
              'actively' update the slider. foo may be NULL if no updating
              is desired.

Binding       (*xcpb->Sl_arrow)( tree, base, slider, obj, inc, min, max,
                                 numvar, dir, foo );

Comments      Slider paging can be accomplished with this function. To do
              so use a method similar to the following (this example is
              for vertical sliders):

              graf_mkstate( &mx, &my, &dum, &dum );
              objc_offset( tree, slider, &ox, &oy );
              inc = ( ( my < oy ) ? ( -1 ) : ( 1 ) );
              (*xcpb->Sl_arrow( tree, base, slider, base, inc, min, max, &numvar,
                                VERTICAL, foo );

Group         XCONTROL Utility Functions