18 | box dlg l0 l1 spl rb |
19 System newProcessGroupWith: (Process newWithMethod: #REPL class: REPL new).
22 add: (GuiToggle new: 'radio 0' action: [ 'radio 0 toggled' printNl ]; checked: true);
23 add: (GuiToggle new: 'radio 1' action: [ 'radio 1 toggled' printNl ]; checked: true);
24 add: (GuiToggle new: 'radio 2' action: [ 'radio 2 toggled' printNl ]; checked: true);
26 rb := GuiRadioBox new: box.
28 l0 := GuiList new; << 'list 0 item 0'; << 'list 0 item 1'.
29 l1 := GuiList new; << 'list 1 item 0'; << 'list 1 item 1'.
31 (spl := GuiSplit new); add: l0; add: l1.
33 add: (GuiLabel new: 'label');
34 add: (GuiButton new: 'test &button' action: [ 'test button pressed' printNl. GuiSingleton setQuitFlag ]);
35 add: (GuiToggle new: 'tog&gle 0' action: [ 'toggle 0 toggled' printNl ]; checked: true);
36 add: (GuiProgressBar new);
37 add: (GuiHTrackBar new: [:v | 'trackbar value changed: ' print. v printNl ]; max: 666; value: 42);
38 add: (GuiEdit new: [:t | 'text: ' print. t printNl ]);
39 add: (GuiList new: [:i :sel | 'item #' print. i print. ' is ' print. sel ifFalse: ['un' print]. 'selected' printNl];
46 dlg := GuiDialog new: 'First Dialog Window' widget: box onClose: [ GuiSingleton setQuitFlag ].
47 dlg attribute: 'RESIZE' value: 'NO'.
48 "dlg attribute: 'TRAY' value: 'YES'."
50 "GuiSingleton message: 'starting GUI loop...'."
51 GuiSingleton add: dlg.
52 GuiSingleton mainLoop.