initial checkin
[org.ibex.widgets.git] / src / ibex / util / group.t
1 <!-- Copyright 2003 Charles Goodwin
2      LGPL - see COPYING for details -->
3
4 <ibex>
5     <meta:doc>
6         ibex.util.group
7             A utility for grouping together widgets that wish to be affiliated
8             with each other in an arbitrary fashion
9
10         Usage
11             Call ibex.util.group..newGroup((str)name) to create a new 'super
12             group' and use to ibex.util.group..syncGroup() to create and group
13             widgets together
14     </meta:doc>
15
16     // reference for super groups
17     var groups = {};
18
19     // v - widget to group
20     // s - super group
21     // g - sub group
22     memberInsert = function(v, s, g) {
23
24         // if necessary, create the supergroup
25         if (!groups[s]) groups[s] = [];
26
27         // if no subgroup specified, create one
28         if (3 > arguments.length)
29             groups[s][groups[s].length] = g = { members : ibex.util.vector..newVector([m]) };
30     }
31
32     memberPosition = function(v, s, g) {
33         /* TODO */
34     }
35
36     // v - widget to group
37     // s - super group
38     // g - sub group
39     memberRemove = function(v, s, g) {
40         /* TODO */
41     }
42
43     <ui:box>
44
45         /* TODO */
46
47     </ui:box>
48 </ibex>