Initial commit
[amiga/OpenBoopsi.git] / include / gadgets / SliderBarGClass.h
1 /*
2 **      $Id: SliderBarGClass.h,v 1.1 1999/02/07 14:24:43 bernie Exp $
3 **
4 **      Copyright (C) 1999 Bernardo Innocenti
5 **      All rights reserved.
6 **
7 **      "sliderbargclass", a compound gadget which implements
8 **      the GadTools SLIDER_KIND in a boopsi fashon. This class
9 **      is derived from the groupgclass but from the outside it
10 **      can be manipulated as it were a normal propgclass boopsi
11 **      gadget. The slider bar gadget frames all its childs
12 **      automatically so it doesn't need an additional frame.
13 **
14 **      The up/down and left/right buttons are built using the
15 **      ScrollButton class using the glyphs provided by the
16 **      vectorglyph class.
17 */
18
19 #define SLIDERBARGCLASS "sliderbargclass"
20 #define SLIDERBARVERS   1
21
22
23 /* Class initializer and terminator. Only avalable when
24  * the class is compiled in the static linker object flavour.
25  */
26 Class   *MakeSliderBarGClass (void);
27 BOOL     FreeSliderBarGClass (Class *ListViewClass);
28
29
30 /*
31  * New Methods:
32  *
33  *      This class does not define any new methods
34  */
35
36
37 /*
38  * New Attributes:
39  *
40  */
41 #define SBA_Dummy                       (TAG_USER | ('S'<<16) | ('B'<<8))
42
43 #define SBA_Adjust                      (SBA_Dummy + 1)
44         /* [SU] (LONG) - Add the specified SIGNED quantity to the PGA_Top
45          * attribute. The result is clipped to valid values. This attribute
46          * is used internally by the class to handle the scroll buttons.
47          */
48
49 #define SBA_InternalTop         (SBA_Dummy + 2)
50         /* [U] (ULONG) - PRIVATE: DO NOTO USE. Used by internal
51          * notification to synchronize the local copy of the Top
52          * attribute with the embedded Prop gadget.
53          */
54
55 /*
56  * Changed attributes:
57  *
58  * LAYOUTA_Orientation
59  *      [I] (ULONG) - Pass one of the LORIENT_#? modes.
60  *      Defaults to LORIENT_HORIZ.
61  *
62  * PGA_Top
63  * PGA_Total
64  * PGA_Visible
65  *      [ISGNU] (LONG) - These attributes are supported exactly as if
66  *      they were inherited from the propgclass.
67  *
68  */
69
70 /* FIX: Define the attributes that not present
71  * before V42 of <intuition/gadgetclass.h>.
72  */
73 #ifndef LAYOUTA_Dummy
74         #define LAYOUTA_Dummy           (TAG_USER+0x38000)
75         #define LAYOUTA_Orientation     (LAYOUTA_Dummy+0x0003)
76         #define LORIENT_NONE    0
77         #define LORIENT_HORIZ   1
78         #define LORIENT_VERT    2
79 #endif
80
81
82 /*
83  * Changed methods:
84  *
85  * OM_SET
86  * OM_UPDATE
87  *      The class will intercept GA_Top, GA_Left, GA_Width and GA_Height
88  *      and adjust its childs accordingly. The PGA_#? attributes
89  *      are forwarded to the embedded prop gadget.
90  *
91  * GM_LAYOUT
92  *      The class will adjust the position and size of all its children
93  *      and forward the GM_LAYOUT method to them.
94  */