2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
9 #include <exec/types.h>
10 #include <proto/exec.h>
11 #include <proto/reqtools.h>
12 #include <exec/libraries.h>
13 #include <exec/memory.h>
14 #include <aros/libcall.h>
16 #include "reqtools_intern.h"
19 /*****************************************************************************
23 AROS_LH6(VOID
, rtSpread
,
27 AROS_LHA(ULONG
*, posarray
, A0
),
28 AROS_LHA(ULONG
*, sizearray
, A1
),
29 AROS_LHA(ULONG
, totalsize
, D0
),
30 AROS_LHA(ULONG
, min
, D1
),
31 AROS_LHA(ULONG
, max
, D2
),
32 AROS_LHA(ULONG
, num
, D3
),
36 struct ReqToolsBase
*, ReqToolsBase
, 22, ReqTools
)
39 Evenly spread a number of objects over a certain length.
40 Primary use is for arrangement of gadgets in a window.
43 posarray - pointer to array to be filled with positions.
44 sizearray - pointer to array of sizes.
45 totalsize - total size of all objects (sum of all values in
47 min - first position to use.
48 max - last position, first _NOT_ to use.
49 num - number of objects (size of posarray and sizearray).
55 This function is for the advanced ReqTools user.
58 'sizearray' holds following values: 4, 6, 4, 2 and 8,
59 'totalsize' is 24 (= 4 + 6 + 4 + 2 + 8),
60 'min' is 3, 'max' is 43,
61 and finally, 'num' is 5.
63 After calling rtSpread() 'posarray' would hold the following
64 values: 3, 11, 19, 26 and 31.
66 My attempt at a visual representation:
70 | OOOO OOOOOO OOOO OO OOOOOOOO |
73 0----5----0----5----0----5----0----5----0----5
84 ******************************************************************************/
88 RTFuncs_rtSpread(posarray
, sizearray
, totalsize
, min
, max
, num
);