2 summary:: Show a subset of items on gui elements
3 categories:: GUI>EZ-GUI
6 EZScroller is a vertical slider that allows displaying different subsets of a dynamically changing list of objects on a fixed number of views by scrolling.
8 EZScroller is used JITLib guis like link::Classes/NodeProxyEditor::, link::Classes/ProxyMixer::, link::Classes/TdefAllGui::, and link::Classes/PdefAllGui::.
13 w = Window.new("EZScroller test", Rect(100, 400,200, 100)).front;
15 v = { |i| DragBoth.new(w, Rect(0, i * 20, 100, 20)) }.dup(5);
19 e = EZScroller(w, Rect(100,0,14,100), v.size, a.size, { |sc|
20 var startIndex = sc.value.asInteger.postcs;
21 v.do { |drag, i| drag.object_( a[ (startIndex) + i] ? ""); };
22 e.visible_(sc.numItems > sc.maxItems); // hide when not useful
26 // change list a, update ezscroller
27 a = (1..4); e.numItems_(a.size); e.doAction;
29 a = (1..8); e.numItems_(a.size); e.doAction;