4 Original GPL release version 4.12
5 Copyright 1993-2000 Jonathan Potter
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 All users of Directory Opus 4 (including versions distributed
22 under the GPL) are entitled to upgrade to the latest version of
23 Directory Opus version 5 at a reduced price. Please see
24 http://www.gpsoft.com.au for more information.
26 The release of Directory Opus 4 under the GPL in NO WAY affects
27 the existing commercial status of Directory Opus 5.
33 void showupdownslider()
35 int x
,y
,ay
[2],a
,height
;
37 if (config
->arrowsize
[0]<8) config
->arrowsize
[0]=8;
38 else if (config
->arrowsize
[0]>20) config
->arrowsize
[0]=20;
40 height
=49-(config
->arrowsize
[0]*2);
42 switch (config
->arrowpos
[0]) {
44 y
=y_off
+35; ay
[0]=y
+height
+4; ay
[1]=ay
[0]+config
->arrowsize
[0];
47 ay
[0]=y_off
+35; ay
[1]=ay
[0]+config
->arrowsize
[0]; y
=ay
[1]+config
->arrowsize
[0];
50 ay
[0]=y_off
+35; y
=ay
[0]+config
->arrowsize
[0]; ay
[1]=y
+height
+4;
54 if (config
->sliderwidth
<8) config
->sliderwidth
=8;
55 else if (config
->sliderwidth
>108) config
->sliderwidth
=108;
56 if (config
->sliderwidth
%2) ++config
->sliderwidth
;
58 x
=x_off
+244-(config
->sliderwidth
/2);
63 config
->sliderwidth
+4,config
->arrowsize
[0]-2,
64 screen_pens
[(int)config
->arrowfg
].pen
,screen_pens
[(int)config
->arrowbg
].pen
,a
);
65 do3dbox(x
-2,ay
[a
],config
->sliderwidth
+4,config
->arrowsize
[0]-2);
70 config
->sliderwidth
,height
,
71 screen_pens
[(int)config
->sliderbgcol
].pen
,screen_pens
[(int)config
->sliderbgcol
].pen
);
72 SetAPen(rp
,screen_pens
[(int)config
->slidercol
].pen
);
73 RectFill(rp
,x
,y
+1,x
+config
->sliderwidth
-1,y
+height
);
74 do3dbox(x
-2,y
,config
->sliderwidth
+4,height
+2);
76 SetAPen(rp
,screen_pens
[0].pen
);
81 x
+config
->sliderwidth
+4,y_off
+33,
85 void showleftrightslider()
87 int y
,x
,ax
[2],a
,width
;
89 if (config
->arrowsize
[1]<8) config
->arrowsize
[1]=8;
90 else if (config
->arrowsize
[1]>20) config
->arrowsize
[1]=20;
92 width
=97-(config
->arrowsize
[1]*2);
94 switch (config
->arrowpos
[1]) {
96 x
=x_off
+317; ax
[0]=329+width
; ax
[1]=ax
[0]+config
->arrowsize
[1]+6;
99 ax
[0]=x_off
+317; ax
[1]=ax
[0]+config
->arrowsize
[1]+6; x
=ax
[1]+config
->arrowsize
[1]+6;
102 ax
[0]=x_off
+317; x
=ax
[0]+config
->arrowsize
[1]+6; ax
[1]=x
+width
+8;
106 if (config
->sliderheight
<5) config
->sliderheight
=5;
107 else if (config
->sliderheight
>49) config
->sliderheight
=49;
108 if (!(config
->sliderheight
%2)) ++config
->sliderheight
;
110 y
=(y_off
+60)-(config
->sliderheight
/2);
115 config
->arrowsize
[1]+2,config
->sliderheight
+2,
116 screen_pens
[(int)config
->arrowfg
].pen
,screen_pens
[(int)config
->arrowbg
].pen
,3-a
);
117 do3dbox(ax
[a
],y
-1,config
->arrowsize
[1]+2,config
->sliderheight
+2);
122 width
,config
->sliderheight
,
123 screen_pens
[(int)config
->sliderbgcol
].pen
,screen_pens
[(int)config
->sliderbgcol
].pen
);
124 SetAPen(rp
,screen_pens
[(int)config
->slidercol
].pen
);
125 RectFill(rp
,x
+2,y
,x
+width
+1,y
+config
->sliderheight
-1);
126 do3dbox(x
,y
-1,width
+4,config
->sliderheight
+2);
128 SetAPen(rp
,screen_pens
[0].pen
);
133 x_off
+313,y
+config
->sliderheight
+2,
137 void showstringgadget()
139 int x
,ax
[2],a
,y
,width
;
141 if (config
->arrowsize
[2]<8) config
->arrowsize
[2]=8;
142 else if (config
->arrowsize
[2]>20) config
->arrowsize
[2]=20;
144 width
=96-(config
->arrowsize
[2]*2);
146 switch (config
->arrowpos
[2]) {
148 x
=x_off
+448; ax
[0]=459+width
; ax
[1]=ax
[0]+config
->arrowsize
[2]+6;
151 ax
[0]=x_off
+446; ax
[1]=ax
[0]+config
->arrowsize
[2]+6; x
=ax
[1]+config
->arrowsize
[2]+8;
154 ax
[0]=x_off
+446; x
=ax
[0]+config
->arrowsize
[2]+8; ax
[1]=x
+width
+7;
158 if (config
->stringheight
<5) config
->stringheight
=5;
159 else if (config
->stringheight
>49) config
->stringheight
=49;
161 y
=(y_off
+60)-(config
->stringheight
/2);
166 config
->arrowsize
[2]+2,config
->stringheight
+2,
167 screen_pens
[(int)config
->arrowfg
].pen
,screen_pens
[(int)config
->arrowbg
].pen
,3-a
);
168 do3dbox(ax
[a
],y
-1,config
->arrowsize
[2]+2,config
->stringheight
+2);
171 SetAPen(rp
,screen_pens
[(int)config
->stringbgcol
].pen
);
172 RectFill(rp
,x
,y
,x
+width
,y
+config
->stringheight
-1);
175 width
+1,config
->stringheight
,
176 screen_pens
[(int)config
->gadgettopcol
].pen
,screen_pens
[(int)config
->gadgetbotcol
].pen
);
178 SetAPen(rp
,screen_pens
[0].pen
);
183 x_off
+442,y
+config
->stringheight
+2,
187 void showarrowborders(active
,old
)
191 SetAPen(rp
,screen_pens
[0].pen
);
193 SetAPen(rp
,screen_pens
[1].pen
);
195 SetDrMd(rp
,COMPLEMENT
);
196 drawarrowrec(active
);
203 a
*=129; a
+=x_off
+178;
204 RectFill(rp
,a
,y_off
+30,a
+132,y_off
+31);
205 RectFill(rp
,a
,y_off
+32,a
+3,y_off
+88);
206 RectFill(rp
,a
+129,y_off
+32,a
+132,y_off
+88);
207 RectFill(rp
,a
,y_off
+89,a
+132,y_off
+90);
210 void fixarrowgads(active
)
216 if (config
->arrowpos
[active
]==a
) arrowgadgets
[a
].Flags
|=SELECTED
;
217 else arrowgadgets
[a
].Flags
&=~SELECTED
;
219 RefreshGList(arrowgadgets
,Window
,NULL
,3);