Indentation fix, cleanup.
[AROS.git] / test / Zune / test.c
blob9bbb121745f6a65405bcb40c0aaeb5131c00c0c3
1 /*
2 Copyright © 2002-2015, The AROS Development Team.
3 All rights reserved.
5 $Id$
6 */
8 #define INTUITION_NO_INLINE_STDARG
10 #include <exec/types.h>
11 #include <stdlib.h>
12 #include <stdio.h>
13 #include <string.h>
15 #include <clib/alib_protos.h>
16 #include <intuition/gadgetclass.h>
17 #include <intuition/icclass.h>
18 #include <libraries/asl.h>
19 #include <gadgets/colorwheel.h>
20 #include <proto/exec.h>
21 #include <proto/intuition.h>
22 #include <proto/dos.h>
23 #include <proto/muimaster.h>
24 #include <proto/graphics.h>
25 #include <aros/debug.h>
27 /* the following should go in a single include file which then only
28 ** consists of the public constants and members. Actually this is easy
31 #if 0
32 #define TEST_ICONLIST
33 #endif
35 #include <libraries/mui.h>
36 #if defined(TEST_ICONLIST)
37 #include "../../workbench/system/Wanderer/Classes/iconlist_attributes.h"
38 #include "../../workbench/system/Wanderer/Classes/iconlist.h"
39 #endif
41 #define STRING_COUNT 6
42 #define LIST_COUNT 5
43 #define MULTI_LIST_COUNT 2
45 #define NUMERIC_MIN 0
46 #define NUMERIC_MAX 100
48 static const TEXT digits[] = "-0123456789";
49 static const TEXT default_accept_chars[] = "aeiou?.";
50 static const TEXT default_reject_chars[] = "*?";
51 static const ULONG default_color[] = {155 << 24, 180 << 24, 255 << 24};
52 static const struct MUI_PenSpec default_penspec = {"m0"};
53 static const char *fruits[] = {"Strawberry", "Apple", "Banana", "Orange",
54 "Grapefruit", "Kumquat", "Plum", "Raspberry", "Apricot", "Grape",
55 "Peach", "Lemon", "Lime", "Date", "Pineapple", "Blueberry", "Papaya",
56 "Cranberry", "Gooseberry", "Pear", "Fig", "Coconut", "Melon",
57 "Pumpkin", NULL};
58 static const char *empty[] = {"", "", "", "", "", NULL};
59 static const LONG list_active_positions[] =
61 MUIV_List_Active_Top,
62 MUIV_List_Active_Bottom,
63 MUIV_List_Active_Off,
64 MUIV_List_Active_Off,
65 MUIV_List_Active_Off
67 static const CONST_STRPTR list_move1_modes[] =
68 {"Index", "Top", "Active", "Bottom", NULL};
69 static const CONST_STRPTR list_move2_modes[] =
70 {"Index", "Top", "Active", "Bottom", "Next", "Previous", NULL};
71 static const CONST_STRPTR list_jump_modes[] =
72 {"Index", "Top", "Active", "Bottom", "Down", "Up", NULL};
73 static const CONST_STRPTR list_insert_modes[] =
74 {"Index", "Top", "Active", "Sorted", "Bottom", NULL};
75 static const CONST_STRPTR list_remove_modes[] =
76 {"Index", "First", "Active", "Last", "Selected", "Unsafe Loop",
77 "Safe Loop", NULL};
78 static const CONST_STRPTR list_activate_modes[] =
79 {"Index", "Top", "Bottom", "Up", "Down", "Page Up", "Page Down", NULL};
80 static const CONST_STRPTR list_select_modes[] =
81 {"Index", "Active", "All", NULL};
82 static const TEXT list_format[] = "BAR,BAR,";
84 enum
86 HNSLIDER,
87 HRSLIDER,
88 HQSLIDER,
89 VNSLIDER,
90 VRSLIDER,
91 VQSLIDER,
92 NNUMERICBUTTON,
93 RNUMERICBUTTON,
94 NKNOB,
95 RKNOB,
96 NUMERIC_COUNT
99 struct Library *MUIMasterBase;
100 struct Library *ColorWheelBase;
102 struct list_entry
104 char *column1;
105 char *column2;
108 Object *app;
110 static struct
112 Object *strings[STRING_COUNT],
113 *accept_string,
114 *reject_string,
115 *cursor_pos_slider,
116 *display_pos_slider,
117 *integer_string,
118 *plaintext_string,
119 *max_len_text,
120 *cr_advance_check,
121 *attach_list_check,
122 *standard_hook_check,
123 *custom_hook_check,
124 *accept_all_check;
126 string;
128 static struct
130 Object *lists[LIST_COUNT],
131 *list_radios,
132 *index1_string,
133 *index2_string,
134 *title_string,
135 *move1_cycle,
136 *move2_cycle,
137 *jump_cycle,
138 *select_cycle,
139 *insert_cycle,
140 *remove_cycle,
141 *activate_cycle,
142 *sort_button,
143 *clear_button,
144 *enable_button,
145 *reset_button,
146 *select_button,
147 *deselect_button,
148 *toggle_button,
149 *move_button,
150 *exchange_button,
151 *jump_button,
152 *redraw_button,
153 *insert_single_button,
154 *insert_multiple_button,
155 *remove_button,
156 *activate_button,
157 *deactivate_button,
158 *dragsortable_check,
159 *showdropmarks_check,
160 *quiet_check,
161 *autovisible_check,
162 *entries_text,
163 *visible_text,
164 *first_text,
165 *insert_text,
166 *active_text,
167 *multi_lists[MULTI_LIST_COUNT],
168 *format_string,
169 *column_string,
170 *column_text,
171 *def_column_string,
172 *showheadings_check;
173 LONG quiet[LIST_COUNT];
175 list;
177 static Object *wheel;
178 static Object *r_slider;
179 static Object *g_slider;
180 static Object *b_slider;
181 static Object *hue_gauge;
182 static Object *colorfield, *colorfield2, *colorfield_reset_button,
183 *colorfield_pen;
184 static Object *coloradjust;
185 static Object *pendisplay, *pendisplay2, *pendisplay_pen, *pendisplay_spec,
186 *reference_check, *shine_button, *shadow_button, *yellow_button, *poppen;
187 static Object *group;
188 static Object *editor_text;
189 static Object *filename_string;
190 static Object *save_button;
192 #if defined(TEST_ICONLIST)
193 static Object *drawer_iconlist;
194 static Object *volume_iconlist;
195 #endif
197 AROS_UFH0(void, repeat_function)
199 AROS_USERFUNC_INIT
201 printf("MUI_Timer\n");
203 AROS_USERFUNC_EXIT
206 AROS_UFH0(void, wheel_function)
208 AROS_USERFUNC_INIT
210 nnset(r_slider, MUIA_Numeric_Value, (XGET(wheel,
211 WHEEL_Red) >> 24) & 0xff);
212 nnset(g_slider, MUIA_Numeric_Value, (XGET(wheel,
213 WHEEL_Green) >> 24) & 0xff);
214 nnset(b_slider, MUIA_Numeric_Value, (XGET(wheel,
215 WHEEL_Blue) >> 24) & 0xff);
217 AROS_USERFUNC_EXIT
220 AROS_UFH0(void, slider_function)
222 AROS_USERFUNC_INIT
224 struct ColorWheelRGB cw;
225 ULONG red = XGET(r_slider, MUIA_Numeric_Value);
226 ULONG green = XGET(g_slider, MUIA_Numeric_Value);
227 ULONG blue = XGET(b_slider, MUIA_Numeric_Value);
229 cw.cw_Red = (red << 24) | (red << 16) | (red << 8) | red;
230 cw.cw_Green = (green << 24) | (green << 16) | (green << 8) | green;
231 cw.cw_Blue = (blue << 24) | (blue << 16) | (blue << 8) | blue;
233 nnset(wheel, WHEEL_RGB, &cw);
234 set(hue_gauge, MUIA_Gauge_Current, XGET(wheel, WHEEL_Hue));
236 AROS_USERFUNC_EXIT
239 AROS_UFH0(void, objects_function)
241 AROS_USERFUNC_INIT
243 Object *new_obj = MUI_MakeObject(MUIO_Button, "Button");
244 if (new_obj)
246 DoMethod(group, MUIM_Group_InitChange);
247 DoMethod(group, OM_ADDMEMBER, new_obj);
248 DoMethod(group, MUIM_Group_ExitChange);
251 AROS_USERFUNC_EXIT
254 static void About(void)
256 static Object *about_wnd;
258 if (!about_wnd)
260 about_wnd = AboutmuiObject, MUIA_Aboutmui_Application, app, End;
263 if (about_wnd)
264 set(about_wnd, MUIA_Window_Open, TRUE);
267 static void ChangeStringAccept(void)
269 STRPTR accept_chars = NULL, reject_chars = NULL;
270 BOOL accept_all;
271 UWORD i;
273 accept_all = XGET(string.accept_all_check, MUIA_Selected);
274 SET(string.accept_string, MUIA_Disabled, accept_all);
275 SET(string.reject_string, MUIA_Disabled, accept_all);
277 if (!accept_all)
279 GET(string.accept_string, MUIA_String_Contents, &accept_chars);
280 GET(string.reject_string, MUIA_String_Contents, &reject_chars);
283 for (i = 0; i < STRING_COUNT; i++)
285 SET(string.strings[i], MUIA_String_Accept, accept_chars);
286 SET(string.strings[i], MUIA_String_Reject, reject_chars);
290 static void ChangePen(void)
292 SIPTR pen = -1;
294 GET(colorfield_pen, MUIA_String_Integer, &pen);
295 if (pen >= 0)
296 SET(colorfield, MUIA_Colorfield_Pen, pen);
299 static void ChangePendisplayPen(void)
301 DoMethod(pendisplay, MUIM_Pendisplay_SetColormap,
302 XGET(pendisplay_pen, MUIA_String_Integer));
305 static void ChangeListTitle(void)
307 STRPTR title = NULL;
308 UWORD i;
310 i = XGET(list.list_radios, MUIA_Radio_Active);
312 GET(list.lists[i], MUIA_List_Title, &title);
313 FreeVec(title);
315 GET(list.title_string, MUIA_String_Contents, &title);
316 if (title[0] == '\0')
317 title = NULL;
319 title = StrDup(title);
321 SET(list.lists[i], MUIA_List_Title, title);
324 static void UpdateListInfo(void)
326 STRPTR title = NULL;
327 UWORD i;
328 LONG value = 0;
330 i = XGET(list.list_radios, MUIA_Radio_Active);
332 GET(list.lists[i], MUIA_List_DragSortable, &value);
333 NNSET(list.dragsortable_check, MUIA_Selected, value);
334 GET(list.lists[i], MUIA_List_ShowDropMarks, &value);
335 NNSET(list.showdropmarks_check, MUIA_Selected, value);
336 value = list.quiet[i]; // MUIA_List_Quiet is not gettable!
337 NNSET(list.quiet_check, MUIA_Selected, value);
338 GET(list.lists[i], MUIA_List_AutoVisible, &value);
339 NNSET(list.autovisible_check, MUIA_Selected, value);
341 GET(list.lists[i], MUIA_List_Title, &title);
342 NNSET(list.title_string, MUIA_String_Contents, title);
344 GET(list.lists[i], MUIA_List_Entries, &value);
345 DoMethod(list.entries_text, MUIM_SetAsString, MUIA_Text_Contents,
346 "%ld", value);
347 GET(list.lists[i], MUIA_List_Visible, &value);
348 DoMethod(list.visible_text, MUIM_SetAsString, MUIA_Text_Contents,
349 "%ld", value);
350 GET(list.lists[i], MUIA_List_First, &value);
351 DoMethod(list.first_text, MUIM_SetAsString, MUIA_Text_Contents,
352 "%ld", value);
353 GET(list.lists[i], MUIA_List_InsertPosition, &value);
354 DoMethod(list.insert_text, MUIM_SetAsString, MUIA_Text_Contents,
355 "%ld", value);
356 GET(list.lists[i], MUIA_List_Active, &value);
357 if (value == MUIV_List_Active_Off)
358 SET(list.active_text, MUIA_Text_Contents, "N/A");
359 else
360 DoMethod(list.active_text, MUIM_SetAsString, MUIA_Text_Contents,
361 "%ld", value);
364 static void ListGetVisible(void)
366 UWORD i;
367 LONG value = 0;
369 i = XGET(list.list_radios, MUIA_Radio_Active);
371 GET(list.lists[i], MUIA_List_Visible, &value);
372 DoMethod(list.visible_text, MUIM_SetAsString, MUIA_Text_Contents,
373 "%ld", value);
376 static void ListGetFirst(void)
378 UWORD i;
379 LONG value = 0;
381 i = XGET(list.list_radios, MUIA_Radio_Active);
383 GET(list.lists[i], MUIA_List_First, &value);
384 DoMethod(list.first_text, MUIM_SetAsString, MUIA_Text_Contents,
385 "%ld", value);
388 static void ListSetDragSortable(void)
390 UWORD i;
391 LONG value = 0;
393 i = XGET(list.list_radios, MUIA_Radio_Active);
395 GET(list.dragsortable_check, MUIA_Selected, &value);
396 SET(list.lists[i], MUIA_List_DragSortable, value);
399 static void ListSetShowDropMarks(void)
401 UWORD i;
402 LONG value = 0;
404 i = XGET(list.list_radios, MUIA_Radio_Active);
406 GET(list.showdropmarks_check, MUIA_Selected, &value);
407 SET(list.lists[i], MUIA_List_ShowDropMarks, value);
410 static void ListSetQuiet(void)
412 UWORD i;
413 LONG value = 0;
415 i = XGET(list.list_radios, MUIA_Radio_Active);
417 GET(list.quiet_check, MUIA_Selected, &value);
418 SET(list.lists[i], MUIA_List_Quiet, value);
419 list.quiet[i] = value;
422 static void ListSetAutoVisible(void)
424 UWORD i;
425 LONG value = 0;
427 i = XGET(list.list_radios, MUIA_Radio_Active);
429 GET(list.autovisible_check, MUIA_Selected, &value);
430 SET(list.lists[i], MUIA_List_AutoVisible, value);
433 static void ListReset(void)
435 UWORD i;
437 i = XGET(list.list_radios, MUIA_Radio_Active);
439 SET(list.lists[i], MUIA_List_Active, list_active_positions[i]);
442 static void ListMove(void)
444 LONG mode, pos1, pos2;
445 UWORD i;
447 i = XGET(list.list_radios, MUIA_Radio_Active);
449 mode = XGET(list.move1_cycle, MUIA_Cycle_Active);
451 if (mode == 0)
452 pos1 = XGET(list.index1_string, MUIA_String_Integer);
453 else
454 pos1 = 1 - mode;
456 mode = XGET(list.move2_cycle, MUIA_Cycle_Active);
458 if (mode == 0)
459 pos2 = XGET(list.index2_string, MUIA_String_Integer);
460 else
461 pos2 = 1 - mode;
463 DoMethod(list.lists[i], MUIM_List_Move, pos1, pos2);
466 static void ListSort(void)
468 UWORD i;
470 i = XGET(list.list_radios, MUIA_Radio_Active);
472 DoMethod(list.lists[i], MUIM_List_Sort);
475 static void ListEnable(void)
477 UWORD i;
479 i = XGET(list.list_radios, MUIA_Radio_Active);
481 SET(list.lists[i], MUIA_Disabled, FALSE);
484 static void ListExchange(void)
486 LONG mode, pos1, pos2;
487 UWORD i;
489 i = XGET(list.list_radios, MUIA_Radio_Active);
491 mode = XGET(list.move1_cycle, MUIA_Cycle_Active);
493 if (mode == 0)
494 pos1 = XGET(list.index1_string, MUIA_String_Integer);
495 else
496 pos1 = 1 - mode;
498 mode = XGET(list.move2_cycle, MUIA_Cycle_Active);
500 if (mode == 0)
501 pos2 = XGET(list.index2_string, MUIA_String_Integer);
502 else
503 pos2 = 1 - mode;
505 DoMethod(list.lists[i], MUIM_List_Exchange, pos1, pos2);
508 static void ListJump(void)
510 LONG mode, pos;
511 UWORD i;
513 i = XGET(list.list_radios, MUIA_Radio_Active);
515 mode = XGET(list.jump_cycle, MUIA_Cycle_Active);
517 if (mode == 0)
518 pos = XGET(list.index1_string, MUIA_String_Integer);
519 else
520 pos = 1 - mode;
522 DoMethod(list.lists[i], MUIM_List_Jump, pos);
525 static void ListSelect(void)
527 LONG mode, pos;
528 UWORD i;
530 i = XGET(list.list_radios, MUIA_Radio_Active);
532 mode = XGET(list.select_cycle, MUIA_Cycle_Active);
534 if (mode == 0)
535 pos = XGET(list.index1_string, MUIA_String_Integer);
536 else
537 pos = 0 - mode;
539 DoMethod(list.lists[i], MUIM_List_Select, pos, MUIV_List_Select_On,
540 NULL);
543 static void ListDeselect(void)
545 LONG mode, pos;
546 UWORD i;
548 i = XGET(list.list_radios, MUIA_Radio_Active);
550 mode = XGET(list.select_cycle, MUIA_Cycle_Active);
552 if (mode == 0)
553 pos = XGET(list.index1_string, MUIA_String_Integer);
554 else
555 pos = 0 - mode;
557 DoMethod(list.lists[i], MUIM_List_Select, pos, MUIV_List_Select_Off,
558 NULL);
561 static void ListToggle(void)
563 LONG mode, pos;
564 UWORD i;
566 i = XGET(list.list_radios, MUIA_Radio_Active);
568 mode = XGET(list.select_cycle, MUIA_Cycle_Active);
570 if (mode == 0)
571 pos = XGET(list.index1_string, MUIA_String_Integer);
572 else
573 pos = 0 - mode;
575 DoMethod(list.lists[i], MUIM_List_Select, pos,
576 MUIV_List_Select_Toggle, NULL);
579 static void ListRedraw(void)
581 LONG mode, pos;
582 UWORD i;
584 i = XGET(list.list_radios, MUIA_Radio_Active);
586 mode = XGET(list.select_cycle, MUIA_Cycle_Active);
588 if (mode == 0)
589 pos = XGET(list.index1_string, MUIA_String_Integer);
590 else
591 pos = 0 - mode;
593 DoMethod(list.lists[i], MUIM_List_Redraw, pos);
596 static void ListInsertSingle(void)
598 LONG mode, pos;
599 UWORD i;
601 i = XGET(list.list_radios, MUIA_Radio_Active);
603 mode = XGET(list.insert_cycle, MUIA_Cycle_Active);
605 if (mode == 0)
606 pos = XGET(list.index1_string, MUIA_String_Integer);
607 else
608 pos = 1 - mode;
610 DoMethod(list.lists[i], MUIM_List_InsertSingle, "Tomato", pos);
613 static void ListInsert(void)
615 LONG mode, pos;
616 UWORD i;
618 i = XGET(list.list_radios, MUIA_Radio_Active);
620 mode = XGET(list.insert_cycle, MUIA_Cycle_Active);
622 if (mode == 0)
623 pos = XGET(list.index1_string, MUIA_String_Integer);
624 else
625 pos = 1 - mode;
627 DoMethod(list.lists[i], MUIM_List_Insert, fruits, -1, pos);
630 static void ListRemove(void)
632 LONG mode, pos, count, j, *selections;
633 UWORD i;
635 i = XGET(list.list_radios, MUIA_Radio_Active);
637 mode = XGET(list.remove_cycle, MUIA_Cycle_Active);
639 if (mode == 5)
641 /* Remove selected entries in a loop to test MUIM_List_NextSelected.
642 This doesn't work as expected in MUI or Zune */
643 pos = MUIV_List_NextSelected_Start - 1;
644 while (pos != MUIV_List_NextSelected_End)
646 if (pos == MUIV_List_NextSelected_Start - 1)
647 pos++;
648 DoMethod(list.lists[i], MUIM_List_NextSelected, (IPTR) &pos);
649 if (pos != MUIV_List_NextSelected_End)
650 DoMethod(list.lists[i], MUIM_List_Remove, pos);
653 else if (mode == 6)
655 /* Remove selected entries safely by first retrieving them with
656 MUIM_List_NextSelected and then removing them one by one */
657 DoMethod(list.lists[i], MUIM_List_Select, MUIV_List_Select_All,
658 MUIV_List_Select_Ask, &count);
659 selections = AllocVec(sizeof(LONG) * count, MEMF_ANY);
660 if (selections != NULL)
662 pos = MUIV_List_NextSelected_Start;
663 for (j = 0; j < count; j++)
665 DoMethod(list.lists[i], MUIM_List_NextSelected, (IPTR) &pos);
666 selections[j] = pos;
669 /* We must remove the entries in reverse order; otherwise the
670 later indices will become invalid */
671 while (count > 0)
672 DoMethod(list.lists[i], MUIM_List_Remove, selections[--count]);
673 FreeVec(selections);
676 else
678 if (mode == 0)
679 pos = XGET(list.index1_string, MUIA_String_Integer);
680 else
681 pos = 1 - mode;
682 DoMethod(list.lists[i], MUIM_List_Remove, pos);
686 static void ListClear(void)
688 UWORD i;
690 i = XGET(list.list_radios, MUIA_Radio_Active);
692 DoMethod(list.lists[i], MUIM_List_Clear);
695 static void ListActivate(void)
697 LONG mode, pos;
698 UWORD i;
700 i = XGET(list.list_radios, MUIA_Radio_Active);
702 mode = XGET(list.activate_cycle, MUIA_Cycle_Active);
704 if (mode == 0)
705 pos = XGET(list.index1_string, MUIA_String_Integer);
706 else
707 pos = -1 - mode;
709 SET(list.lists[i], MUIA_List_Active, pos);
712 static void ListDeactivate(void)
714 UWORD i;
716 i = XGET(list.list_radios, MUIA_Radio_Active);
718 SET(list.lists[i], MUIA_List_Active, MUIV_List_Active_Off);
721 AROS_UFH3(static void, display_function,
722 AROS_UFHA(struct Hook *, h, A0),
723 AROS_UFHA(char **, strings, A2),
724 AROS_UFHA(struct list_entry *, entry, A1))
726 AROS_USERFUNC_INIT
728 static char buf[100];
730 if (entry)
732 sprintf(buf, "%ld", (long)*(strings - 1));
733 strings[0] = buf;
734 strings[1] = entry->column1;
735 strings[2] = entry->column2;
737 else
739 strings[0] = "Number";
740 strings[1] = "Column 1";
741 strings[2] = "Column 2";
744 AROS_USERFUNC_EXIT
747 static void Save(void)
749 char *text = (char *)XGET(editor_text, MUIA_String_Contents);
750 char *filename = (char *)XGET(filename_string, MUIA_String_Contents);
751 BPTR fh;
753 if (!strlen(filename))
754 return;
756 if ((fh = Open(filename, MODE_NEWFILE)))
758 Write(fh, text, strlen(text));
759 Close(fh);
763 #if defined(TEST_ICONLIST)
764 /* IconList callbacks */
765 static void volume_doubleclicked(void)
767 char buf[200];
768 struct IconList_Entry *ent = (void *)MUIV_IconList_NextIcon_Start;
770 DoMethod(volume_iconlist, MUIM_IconList_NextIcon,
771 MUIV_IconList_NextIcon_Selected, &ent);
772 if ((IPTR) ent == MUIV_IconList_NextIcon_End)
773 return;
775 strcpy(buf, ent->label);
776 strcat(buf, ":");
779 static void drawer_doubleclicked(void)
781 struct IconList_Entry *ent = (void *)MUIV_IconList_NextIcon_Start;
783 DoMethod(drawer_iconlist, MUIM_IconList_NextIcon,
784 MUIV_IconList_NextIcon_Selected, &ent);
785 if ((IPTR) ent == MUIV_IconList_NextIcon_End)
786 return;
787 set(drawer_iconlist, MUIA_IconDrawerList_Drawer,
788 ent->ile_IconEntry->ie_IconNode.ln_Name);
790 #endif
792 static IPTR create_balance_column(void)
794 return (IPTR) VGroup,
795 Child, RectangleObject,
796 GaugeFrame,
797 End,
798 Child, BalanceObject,
799 End,
800 Child, RectangleObject,
801 GaugeFrame,
802 End,
803 Child, BalanceObject,
804 End,
805 Child, RectangleObject,
806 GaugeFrame,
807 End,
808 Child, BalanceObject,
809 End,
810 Child, RectangleObject,
811 GaugeFrame,
812 End,
813 Child, BalanceObject,
814 End,
815 Child, RectangleObject,
816 GaugeFrame,
817 End,
818 End;
821 /* The custom class */
823 struct DropText_Data
825 ULONG times;
828 #ifdef __MAXON__
829 #undef KeymapBase
830 struct Library *KeymapBase;
831 #endif
833 #ifndef __AROS__
834 __saveds __asm IPTR dispatcher(register __a0 struct IClass *cl,
835 register __a2 Object *obj, register __a1 Msg msg)
836 #else
837 AROS_UFH3S(IPTR, dispatcher,
838 AROS_UFHA(Class *, cl, A0),
839 AROS_UFHA(Object *, obj, A2), AROS_UFHA(Msg, msg, A1))
840 #endif
842 AROS_USERFUNC_INIT
844 switch (msg->MethodID)
846 case MUIM_DragQuery:
847 return MUIV_DragQuery_Accept;
848 case MUIM_DragDrop:
850 struct DropText_Data *data =
851 (struct DropText_Data *)INST_DATA(cl, obj);
852 char buf[100];
853 data->times++;
854 sprintf(buf, "%ld times", (long)data->times);
855 set(obj, MUIA_Text_Contents, buf);
859 return DoSuperMethodA(cl, obj, (Msg) msg);
861 AROS_USERFUNC_EXIT
864 static struct MUI_CustomClass *CL_DropText;
866 #define DropTextObject BOOPSIOBJMACRO_START(CL_DropText->mcc_Class)
868 /* Main prog */
870 static struct Hook hook_standard;
872 AROS_UFH3S(void, hook_func_standard,
873 AROS_UFHA(struct Hook *, h, A0),
874 AROS_UFHA(void *, dummy, A2), AROS_UFHA(void **, funcptr, A1))
876 AROS_USERFUNC_INIT
878 void (*func) (ULONG *) = (void (*)(ULONG *))(*funcptr);
880 if (func)
881 func((ULONG *) funcptr + 1);
883 AROS_USERFUNC_EXIT
886 int main(void)
888 APTR pool;
889 Object *wnd, *second_wnd;
890 Object *open_button;
891 Object *about_button;
892 Object *quit_button;
893 Object *repeat_button;
894 Object *objects_button;
895 Object *about_item, *quit_item;
896 Object *context_menu;
897 Object *popobject, *listview;
898 Object *numerics[NUMERIC_COUNT];
899 Object *min_string, *max_string;
900 Object *slider_button;
901 Object *country_radio[2];
902 CONST_STRPTR title;
903 UWORD i;
904 LONG value = 0;
906 static char *pages[] =
907 {"General", "Text", "Boopsi", "Color", "Edit", "List", "Gauges",
908 "Numeric", "Radio",
909 #if defined(TEST_ICONLIST)
910 "Icon List",
911 #endif
912 "Balancing", NULL};
913 static char *text_pages[] =
914 {"Text", "String", NULL};
915 static char *color_pages[] =
916 {"Palette", "Colors", "Pens", NULL};
917 static char *list_pages[] =
918 {"Single Column", "Multicolumn", NULL};
919 static char **radio_entries1 = pages;
920 static char *radio_entries2[] =
921 {"Paris", "Pataya", "London", "New York", "Reykjavik", NULL};
923 static struct list_entry entry1 = {"Testentry1", "Col2: Entry1"};
924 static struct list_entry entry2 = {"Entry2", "Col2: Entry2"};
925 static struct list_entry entry3 = {"Entry3", "Col2: Entry3"};
926 static struct list_entry entry4 = {"Entry4", "Col2: Entry4"};
927 static struct list_entry entry5 = {"Entry5", "Col2: Entry5"};
928 static struct list_entry entry6 = {"Entry6", "Col2: Entry6"};
930 static struct list_entry *entries[] =
931 {&entry1, &entry2, &entry3, &entry4, &entry5, &entry6, NULL};
933 struct Hook hook;
934 struct Hook hook_wheel;
935 struct Hook hook_slider;
936 struct Hook hook_objects;
937 struct Hook hook_display;
939 hook_standard.h_Entry = (HOOKFUNC) hook_func_standard;
941 pool = CreatePool(MEMF_ANY, 4096, 4096);
943 MUIMasterBase = (struct Library *)OpenLibrary("muimaster.library", 0);
945 hook.h_Entry = (HOOKFUNC) repeat_function;
946 hook_wheel.h_Entry = (HOOKFUNC) wheel_function;
947 hook_slider.h_Entry = (HOOKFUNC) slider_function;
948 hook_objects.h_Entry = (HOOKFUNC) objects_function;
949 hook_display.h_Entry = (HOOKFUNC) display_function;
951 context_menu = MenustripObject,
952 MUIA_Family_Child, MenuObject,
953 MUIA_Menu_Title, "Menutest",
954 MUIA_Family_Child, about_item = MenuitemObject,
955 MUIA_Menuitem_Title, "First Test Entry", End,
956 MUIA_Family_Child, quit_item = MenuitemObject,
957 MUIA_Menuitem_Title, "Second Test Entry", End,
958 End,
959 End;
961 /* should check the result in a real program! */
962 CL_DropText = MUI_CreateCustomClass(NULL, MUIC_Text, NULL,
963 sizeof(struct DropText_Data), dispatcher);
964 ColorWheelBase = OpenLibrary("gadgets/colorwheel.gadget", 0);
966 pendisplay = PendisplayObject, MUIA_Pendisplay_Spec, &default_penspec, End;
968 title = StrDup("Fruits");
969 list.lists[0] = ListviewObject,
970 MUIA_Listview_List,
971 ListObject,
972 InputListFrame,
973 MUIA_List_Title, title,
974 MUIA_List_SourceArray, fruits,
975 MUIA_List_Active, MUIV_List_Active_Top,
976 MUIA_List_PoolThreshSize, 256,
977 MUIA_ShortHelp, "Default scroller\nTop entry active",
978 End,
979 MUIA_Listview_MultiSelect,
980 MUIV_Listview_MultiSelect_None,
981 MUIA_CycleChain, 1,
982 End;
983 list.lists[1] = ListviewObject,
984 MUIA_Listview_List,
985 ListObject,
986 InputListFrame,
987 MUIA_List_SourceArray, fruits,
988 MUIA_List_Active, MUIV_List_Active_Bottom,
989 MUIA_List_PoolPuddleSize, 512,
990 MUIA_ShortHelp, "Left scroller\nBottom entry active",
991 End,
992 MUIA_Listview_ScrollerPos,
993 MUIV_Listview_ScrollerPos_Left,
994 MUIA_CycleChain, 1,
995 End;
996 list.lists[2] = ListviewObject,
997 MUIA_Listview_List,
998 ListObject,
999 InputListFrame,
1000 MUIA_List_SourceArray, fruits,
1001 MUIA_List_Active, MUIV_List_Active_Off,
1002 MUIA_List_Pool, pool,
1003 MUIA_ShortHelp, "Right scroller\nNo active entry",
1004 End,
1005 MUIA_Listview_MultiSelect,
1006 MUIV_Listview_MultiSelect_Shifted,
1007 MUIA_Listview_ScrollerPos,
1008 MUIV_Listview_ScrollerPos_Right,
1009 MUIA_CycleChain, 1,
1010 End;
1011 list.lists[3] = ListviewObject,
1012 MUIA_Listview_List,
1013 ListObject,
1014 InputListFrame,
1015 MUIA_List_SourceArray, fruits,
1016 MUIA_List_Pool, NULL,
1017 MUIA_ShortHelp, "No scroller\nDefault active entry",
1018 End,
1019 MUIA_Listview_MultiSelect,
1020 MUIV_Listview_MultiSelect_Always,
1021 MUIA_Listview_ScrollerPos,
1022 MUIV_Listview_ScrollerPos_None,
1023 MUIA_CycleChain, 1,
1024 End;
1025 list.lists[4] = ListviewObject,
1026 MUIA_Listview_List,
1027 ListObject,
1028 ReadListFrame,
1029 MUIA_List_SourceArray, fruits,
1030 MUIA_ShortHelp, "Default scroller\nDefault active entry",
1031 End,
1032 MUIA_Listview_Input, FALSE,
1033 MUIA_CycleChain, 1,
1034 End;
1036 app = ApplicationObject,
1037 MUIA_Application_Menustrip, MenustripObject,
1038 MUIA_Family_Child, MenuObject,
1039 MUIA_Menu_Title, "Project",
1040 MUIA_Family_Child, about_item = MenuitemObject,
1041 MUIA_Menuitem_Title, "About...",
1042 MUIA_Menuitem_Shortcut, "?",
1043 End,
1044 MUIA_Family_Child, MenuitemObject,
1045 MUIA_Menuitem_Title, (SIPTR)-1,
1046 End,
1047 MUIA_Family_Child, quit_item = MenuitemObject,
1048 MUIA_Menuitem_Title, "Quit",
1049 MUIA_Menuitem_Shortcut, "Q",
1050 End,
1051 End,
1052 End,
1054 SubWindow, wnd = WindowObject,
1055 MUIA_Window_Title, "test",
1056 MUIA_Window_Activate, TRUE,
1058 WindowContents, VGroup,
1059 Child, RegisterGroup(pages),
1060 //MUIA_Background, "5:SYS:Prefs/Presets/Backdrops/StuccoBlue.pic",
1062 /* general */
1063 Child, VGroup,
1064 Child, HGroup,
1065 GroupFrameT("A horizontal group"),
1066 Child, ColGroup(2),
1067 GroupFrameT("A column group"),
1068 Child, repeat_button = TextObject,
1069 MUIA_CycleChain, 1,
1070 ButtonFrame,
1071 MUIA_Background, MUII_ButtonBack,
1072 MUIA_Text_PreParse, "\33c",
1073 MUIA_Text_Contents, "Repeat",
1074 MUIA_InputMode, MUIV_InputMode_RelVerify,
1075 End,
1076 Child, TextObject,
1077 MUIA_CycleChain, 1,
1078 ButtonFrame,
1079 MUIA_Background, MUII_ButtonBack,
1080 MUIA_Text_PreParse, "\33c",
1081 MUIA_Text_Contents, "Drag Me",
1082 MUIA_Draggable, TRUE,
1083 MUIA_InputMode, MUIV_InputMode_RelVerify,
1084 End,
1085 Child, open_button = TextObject,
1086 MUIA_CycleChain, 1,
1087 ButtonFrame,
1088 MUIA_Background, MUII_ButtonBack,
1089 MUIA_Text_PreParse, "\33c",
1090 MUIA_Text_Contents, "Open Window",
1091 MUIA_InputMode, MUIV_InputMode_RelVerify,
1092 End,
1093 Child, TextObject,
1094 MUIA_ContextMenu, context_menu,
1095 MUIA_CycleChain, 1,
1096 ButtonFrame,
1097 MUIA_Background, MUII_ButtonBack,
1098 MUIA_Text_PreParse, "\33c",
1099 MUIA_Text_Contents, "Press Right",
1100 MUIA_InputMode, MUIV_InputMode_RelVerify,
1101 End,
1102 Child, objects_button = TextObject,
1103 MUIA_CycleChain, 1,
1104 ButtonFrame,
1105 MUIA_Background, MUII_ButtonBack,
1106 MUIA_Text_PreParse, "\33c",
1107 MUIA_Text_Contents, "Add Objects",
1108 MUIA_InputMode, MUIV_InputMode_RelVerify,
1109 End,
1110 Child, HVSpace,
1111 Child, HGroup,
1112 Child, HVSpace,
1113 Child, MUI_MakeObject(MUIO_Checkmark,
1114 "_Checkmark"),
1115 End,
1116 Child, HGroup,
1117 Child, MUI_MakeObject(MUIO_Label,
1118 "_Checkmark", 0),
1119 Child, HVSpace,
1120 End,
1121 Child, HVSpace,
1122 Child, HVSpace,
1123 End,
1124 Child, group = VGroup,
1125 GroupFrameT("A vertical group"),
1126 Child, DropTextObject,
1127 MUIA_Dropable, TRUE,
1128 MUIA_CycleChain, 1,
1129 ButtonFrame,
1130 MUIA_Background, MUII_ButtonBack,
1131 MUIA_Text_PreParse, "\33c",
1132 MUIA_Text_Contents, "Drop Here",
1133 MUIA_Dropable, TRUE,
1134 MUIA_InputMode, MUIV_InputMode_RelVerify,
1135 End,
1136 Child, TextObject,
1137 TextFrame,
1138 MUIA_Background, MUII_MARKHALFSHINE,
1139 MUIA_CycleChain, 1,
1140 MUIA_Text_PreParse, "\33c",
1141 MUIA_Text_Contents, "Pattern",
1142 End,
1143 Child, MUI_NewObject(MUIC_Popimage, TAG_DONE),
1144 End,
1145 Child, ScrollgroupObject,
1146 GroupFrameT("A scroll group"),
1147 MUIA_Scrollgroup_Contents, VGroupV,
1148 VirtualFrame,
1149 Child, TextObject,
1150 TextFrame,
1151 MUIA_Text_Contents,
1152 "Line1\nLine2\nLine3\nLine4\n"
1153 "Line5\nLine6\nLine7\nLine8\n"
1154 "\n\n\n"
1155 "Line9\nLine10\nLine11\n",
1156 End,
1157 Child, HGroup,
1158 Child, MUI_MakeObject(MUIO_Button,
1159 "Button9"),
1160 Child, MUI_MakeObject(MUIO_Button,
1161 "Button10"),
1162 End,
1163 End,
1164 End,
1165 End,
1166 Child, popobject = PopobjectObject,
1167 MUIA_Popstring_String,
1168 MUI_MakeObject(MUIO_String, NULL, 200),
1169 MUIA_Popstring_Button, PopButton(MUII_PopUp),
1170 MUIA_Popobject_Object, VGroup,
1171 Child, TextObject,
1172 MUIA_Text_Contents, "test",
1173 End,
1174 Child, listview = ListviewObject,
1175 MUIA_Listview_List, ListObject,
1176 InputListFrame,
1177 MUIA_List_DisplayHook, &hook_display,
1178 MUIA_List_Format, ",,",
1179 MUIA_List_SourceArray, entries,
1180 MUIA_List_Title, TRUE,
1181 End,
1182 End,
1183 End,
1184 End,
1185 Child, CycleObject,
1186 ButtonFrame,
1187 MUIA_Cycle_Entries, pages,
1188 End,
1189 Child, ScrollbarObject,
1190 MUIA_Group_Horiz, TRUE,
1191 MUIA_Prop_Visible, 100,
1192 MUIA_Prop_Entries, 300,
1193 MUIA_Prop_First, 50,
1194 End,
1195 End,
1197 /* text */
1198 Child, RegisterGroup(text_pages),
1200 Child, VGroup,
1201 Child, TextObject,
1202 MUIA_Background, "2:cfffffff,cfffffff,10000000",
1203 TextFrame,
1204 MUIA_Text_Contents, "\33cHello World!\n"
1205 "This is a text object\n\33lLeft \33bbold\33n\n"
1206 "\33rRight",
1207 End,
1208 Child, TextObject,
1209 TextFrame,
1210 /* Test for a bug with pen specifications as reported here:
1211 https://sourceforge.net/p/aros/bugs/487/
1213 MUIA_Text_Contents, "This is a \33P[3]text \33P[]object \33P[1]with pen specifications",
1214 End,
1215 Child, RectangleObject,
1216 MUIA_VertWeight, 0,
1217 /* Seems to be not supported properly as orginal MUI
1218 doesn't allow to alter the height of the window */
1219 MUIA_Rectangle_HBar, TRUE,
1220 MUIA_Rectangle_BarTitle,"Enter a string",
1221 End,
1222 Child, StringObject,
1223 StringFrame,
1224 MUIA_CycleChain,1,
1225 MUIA_String_AdvanceOnCR, TRUE,
1226 End,
1227 Child, HVSpace,
1228 End,
1230 /* string */
1231 Child, HGroup,
1232 Child, VGroup,
1233 Child, VGroup, GroupFrameT("Default Alignment"),
1234 Child, string.strings[0] = StringObject,
1235 StringFrame,
1236 MUIA_String_Accept,
1237 (IPTR)default_accept_chars,
1238 MUIA_String_Reject,
1239 (IPTR)default_reject_chars,
1240 MUIA_String_AdvanceOnCR, TRUE,
1241 MUIA_String_MaxLen, 9,
1242 MUIA_CycleChain, 1,
1243 MUIA_String_AttachedList, list.lists[0],
1244 End,
1245 End,
1246 Child, VGroup, GroupFrameT("Left Aligned"),
1247 Child, string.strings[1] = StringObject,
1248 StringFrame,
1249 MUIA_String_Accept,
1250 (IPTR)default_accept_chars,
1251 MUIA_String_Reject,
1252 (IPTR)default_reject_chars,
1253 MUIA_String_Format,
1254 MUIV_String_Format_Left,
1255 MUIA_String_AdvanceOnCR, TRUE,
1256 MUIA_String_MaxLen, 9,
1257 MUIA_CycleChain, 1,
1258 MUIA_String_Contents,
1259 (IPTR)default_accept_chars,
1260 MUIA_String_BufferPos, 3,
1261 MUIA_String_AttachedList, list.lists[0],
1262 End,
1263 End,
1264 Child, VGroup, GroupFrameT("Right Aligned"),
1265 Child, string.strings[2] = StringObject,
1266 StringFrame,
1267 MUIA_String_Accept,
1268 (IPTR)default_accept_chars,
1269 MUIA_String_Reject,
1270 (IPTR)default_reject_chars,
1271 MUIA_String_Format,
1272 MUIV_String_Format_Right,
1273 MUIA_String_AdvanceOnCR, TRUE,
1274 MUIA_String_MaxLen, 9,
1275 MUIA_CycleChain, 1,
1276 MUIA_String_AttachedList, list.lists[0],
1277 End,
1278 End,
1279 Child, VGroup, GroupFrameT("Centered"),
1280 Child, string.strings[3] = StringObject,
1281 StringFrame,
1282 MUIA_String_Accept,
1283 (IPTR)default_accept_chars,
1284 MUIA_String_Reject,
1285 (IPTR)default_reject_chars,
1286 MUIA_String_Format,
1287 MUIV_String_Format_Center,
1288 MUIA_String_AdvanceOnCR, TRUE,
1289 MUIA_String_MaxLen, 9,
1290 MUIA_CycleChain, 1,
1291 MUIA_String_Integer, 123,
1292 MUIA_String_AttachedList, list.lists[0],
1293 End,
1294 End,
1295 Child, VGroup, GroupFrameT("Secret"),
1296 Child, string.strings[4] = StringObject,
1297 StringFrame,
1298 MUIA_String_Accept,
1299 (IPTR)default_accept_chars,
1300 MUIA_String_Reject,
1301 (IPTR)default_reject_chars,
1302 MUIA_String_Format,
1303 MUIV_String_Format_Center,
1304 MUIA_String_Secret, TRUE,
1305 MUIA_String_AdvanceOnCR, TRUE,
1306 MUIA_String_MaxLen, 9,
1307 MUIA_CycleChain, 1,
1308 MUIA_String_AttachedList, list.lists[0],
1309 End,
1310 End,
1311 Child, HGroup, GroupFrameT("Narrow"),
1312 Child, HVSpace,
1313 Child, string.strings[5] = StringObject,
1314 StringFrame,
1315 MUIA_String_Accept,
1316 (IPTR)default_accept_chars,
1317 MUIA_String_Reject,
1318 (IPTR)default_reject_chars,
1319 MUIA_String_Format,
1320 MUIV_String_Format_Center,
1321 MUIA_String_AdvanceOnCR, TRUE,
1322 MUIA_MaxWidth, 20,
1323 MUIA_String_MaxLen, 9,
1324 MUIA_CycleChain, 1,
1325 MUIA_String_AttachedList, list.lists[0],
1326 End,
1327 Child, HVSpace,
1328 End,
1329 Child, HVSpace,
1330 End,
1331 Child, VGroup, GroupFrameT("Controls"),
1332 Child, HGroup,
1333 Child, string.accept_all_check =
1334 MUI_MakeObject(MUIO_Checkmark, NULL),
1335 Child, MUI_MakeObject(MUIO_Label,
1336 "Accept all characters", 0),
1337 Child, HVSpace,
1338 End,
1339 Child, ColGroup(2),
1340 Child, MUI_MakeObject(MUIO_Label,
1341 "Acceptable characters:", 0),
1342 Child, string.accept_string = StringObject,
1343 StringFrame,
1344 MUIA_String_Contents,
1345 (IPTR)default_accept_chars,
1346 End,
1347 Child, MUI_MakeObject(MUIO_Label,
1348 "Unacceptable characters:", 0),
1349 Child, string.reject_string = StringObject,
1350 StringFrame,
1351 End,
1352 Child, MUI_MakeObject(MUIO_Label,
1353 "Cursor position:", 0),
1354 Child, string.cursor_pos_slider =
1355 SliderObject,
1356 MUIA_Group_Horiz, TRUE,
1357 MUIA_Numeric_Min, 0,
1358 End,
1359 Child, MUI_MakeObject(MUIO_Label,
1360 "Display position:", 0),
1361 Child, string.display_pos_slider =
1362 SliderObject,
1363 MUIA_Group_Horiz, TRUE,
1364 MUIA_Numeric_Min, 0,
1365 End,
1366 Child, MUI_MakeObject(MUIO_Label,
1367 "Integer value:", 0),
1368 Child, string.integer_string =
1369 StringObject,
1370 StringFrame,
1371 MUIA_String_Accept, (IPTR)digits,
1372 End,
1373 Child, MUI_MakeObject(MUIO_Label,
1374 "Plaintext:", 0),
1375 Child, string.plaintext_string =
1376 StringObject,
1377 StringFrame,
1378 End,
1379 Child, MUI_MakeObject(MUIO_Label,
1380 "Maximum string length:", 0),
1381 Child, string.max_len_text = TextObject,
1382 TextFrame,
1383 MUIA_Text_Contents, "Unknown",
1384 End,
1385 End,
1386 Child, VGroup,
1387 Child, HGroup,
1388 Child, string.cr_advance_check =
1389 MUI_MakeObject(MUIO_Checkmark,
1390 NULL),
1391 Child, MUI_MakeObject(MUIO_Label,
1392 "Advance on CR", 0),
1393 Child, HVSpace,
1394 End,
1395 Child, HGroup,
1396 Child, string.attach_list_check =
1397 MUI_MakeObject(MUIO_Checkmark,
1398 NULL),
1399 Child, MUI_MakeObject(MUIO_Label,
1400 "Attach list", 0),
1401 Child, HVSpace,
1402 End,
1403 #if 0
1404 Child, HGroup,
1405 Child, string.standard_hook_check =
1406 MUI_MakeObject(MUIO_Checkmark,
1407 NULL),
1408 Child, MUI_MakeObject(MUIO_Label,
1409 "Use standard edit hook", 0),
1410 Child, HVSpace,
1411 End,
1412 Child, HGroup,
1413 Child, string.custom_hook_check =
1414 MUI_MakeObject(MUIO_Checkmark,
1415 NULL),
1416 Child, MUI_MakeObject(MUIO_Label,
1417 "Use custom edit hook", 0),
1418 Child, HVSpace,
1419 End,
1420 #endif
1421 End,
1422 Child, HVSpace,
1423 End,
1425 End,
1426 End,
1428 /* boopsi */
1429 Child, VGroup,
1430 Child, wheel = BoopsiObject, /* MUI/Boopsi tags mixed */
1431 GroupFrame,
1432 /* boopsi objects don't know */
1433 /* their sizes, so we help */
1434 /* keep important values */
1435 /* during window resize */
1436 MUIA_Boopsi_ClassID, "colorwheel.gadget",
1437 MUIA_Boopsi_MinWidth , 30,
1438 MUIA_Boopsi_MinHeight, 30,
1439 MUIA_Boopsi_Remember , WHEEL_Saturation,
1440 MUIA_Boopsi_Remember , WHEEL_Hue,
1441 /* this magic fills in the screen pointer */
1442 MUIA_Boopsi_TagScreen, WHEEL_Screen,
1443 WHEEL_Screen, NULL,
1444 GA_Left, 0,
1445 GA_Top, 0, /* MUI will automatically */
1446 GA_Width, 0, /* fill in the correct values */
1447 GA_Height, 0,
1448 ICA_TARGET, ICTARGET_IDCMP,
1449 /* needed for notification */
1450 WHEEL_Saturation, 0, /* start in the center */
1451 MUIA_FillArea, TRUE,
1452 /* use this because it defaults to FALSE
1453 for boopsi gadgets but the colorwheel
1454 doesn't bother about redrawing its
1455 background */
1456 End,
1458 Child, r_slider = SliderObject,
1459 MUIA_Group_Horiz, TRUE,
1460 MUIA_Numeric_Min, 0,
1461 MUIA_Numeric_Max, 255,
1462 End,
1463 Child, g_slider = SliderObject,
1464 MUIA_Group_Horiz, TRUE,
1465 MUIA_Numeric_Min, 0,
1466 MUIA_Numeric_Max, 255,
1467 End,
1468 Child, b_slider = SliderObject,
1469 MUIA_Group_Horiz, TRUE,
1470 MUIA_Numeric_Min, 0,
1471 MUIA_Numeric_Max, 255,
1472 End,
1473 Child, hue_gauge = GaugeObject,
1474 GaugeFrame,
1475 MUIA_Gauge_Horiz, TRUE,
1476 MUIA_Gauge_Max, 255,
1477 MUIA_Gauge_Divide, 1<<24,
1478 MUIA_Gauge_InfoText, "Hue: %ld",
1479 End,
1480 End,
1482 /* color */
1483 Child, RegisterGroup(color_pages),
1484 Child, VGroup, GroupFrameT("Palette"),
1485 Child, PaletteObject,
1486 End,
1487 End,
1488 Child, HGroup,
1489 Child, VGroup, GroupFrameT("Colorfield"),
1491 Child, HGroup,
1492 Child, colorfield = ColorfieldObject,
1493 MUIA_Colorfield_RGB, default_color,
1494 MUIA_Colorfield_Pen, 253,
1495 End,
1496 Child, colorfield2 = ColorfieldObject,
1497 MUIA_Colorfield_Red, default_color[0],
1498 MUIA_Colorfield_Green, default_color[1],
1499 MUIA_Colorfield_Blue, default_color[2],
1500 End,
1501 End,
1502 Child, colorfield_reset_button =
1503 MUI_MakeObject(MUIO_Button,
1504 "Reset"),
1505 Child, HGroup,
1506 Child,
1507 MUI_MakeObject(MUIO_Label, "Pen:", 0),
1508 Child, colorfield_pen = StringObject,
1509 StringFrame,
1510 End,
1511 End,
1512 End,
1513 Child, VGroup, GroupFrameT("Coloradjust"),
1514 Child, coloradjust = ColoradjustObject,
1515 MUIA_Coloradjust_RGB, default_color,
1516 End,
1517 End,
1518 End,
1519 Child, HGroup,
1520 Child, VGroup,
1521 Child, VGroup, GroupFrameT("Pendisplay"),
1522 Child, HGroup,
1523 Child, pendisplay,
1524 Child, pendisplay2 = PendisplayObject,
1525 MUIA_Pendisplay_RGBcolor,
1526 default_color,
1527 End,
1528 End,
1529 Child, ColGroup(2),
1530 Child,
1531 MUI_MakeObject(
1532 MUIO_Label, "Pen:", 0),
1533 Child, HGroup,
1534 Child, pendisplay_pen =
1535 StringObject, StringFrame,
1536 End,
1537 Child, HVSpace,
1538 Child, reference_check =
1539 MUI_MakeObject(MUIO_Checkmark,
1540 NULL),
1541 Child, MUI_MakeObject(MUIO_Label,
1542 "Reference", 0),
1543 End,
1544 Child,
1545 MUI_MakeObject(
1546 MUIO_Label, "Penspec:", 0),
1547 Child, pendisplay_spec = StringObject,
1548 StringFrame,
1549 End,
1550 End,
1551 Child, HGroup,
1552 Child, shine_button =
1553 MUI_MakeObject(MUIO_Button,
1554 "Shine"),
1555 Child, shadow_button =
1556 MUI_MakeObject(MUIO_Button,
1557 "Shadow"),
1558 Child, yellow_button =
1559 MUI_MakeObject(MUIO_Button,
1560 "Yellow"),
1561 End,
1562 End,
1563 Child, VGroup, GroupFrameT("Poppen"),
1564 Child, poppen = PoppenObject,
1565 End,
1566 End,
1567 End,
1568 Child, VGroup, GroupFrameT("Penadjust"),
1569 Child, PenadjustObject,
1570 End,
1571 End,
1572 End,
1573 End,
1575 /* edit */
1576 Child, VGroup,
1577 Child, editor_text = StringObject,
1578 StringFrame,
1579 End,
1580 Child, PopaslObject,
1581 ASLFR_DoSaveMode, TRUE,
1582 MUIA_Popstring_String, filename_string =
1583 MUI_MakeObject(MUIO_String, NULL, 200),
1584 MUIA_Popstring_Button, PopButton(MUII_PopFile),
1585 End,
1586 Child, save_button =
1587 MUI_MakeObject(MUIO_Button, "Save"),
1588 End,
1590 /* lists */
1591 Child, RegisterGroup(list_pages),
1592 Child, VGroup,
1593 Child, ColGroup(LIST_COUNT),
1594 Child, VGroup, GroupFrameT("No Multiselect"),
1595 Child, list.lists[0],
1596 End,
1597 Child, VGroup,
1598 GroupFrameT("Default Multiselect"),
1599 Child, list.lists[1],
1600 End,
1601 Child, VGroup,
1602 GroupFrameT("Shifted Multiselect"),
1603 Child, list.lists[2],
1604 End,
1605 Child, VGroup,
1606 GroupFrameT("Unconditional Multiselect"),
1607 Child, list.lists[3],
1608 End,
1609 Child, VGroup,
1610 GroupFrameT("Read Only"),
1611 Child, list.lists[4],
1612 End,
1613 End,
1614 Child, HGroup,
1615 MUIA_Group_HorizSpacing, 0,
1616 Child, RectangleObject,
1617 MUIA_HorizWeight, 1,
1618 End,
1619 Child, list.list_radios = RadioObject,
1620 MUIA_Radio_Entries, empty,
1621 MUIA_Group_Horiz, TRUE,
1622 MUIA_HorizWeight, 1000,
1623 End,
1624 Child, RectangleObject,
1625 MUIA_HorizWeight, 1,
1626 End,
1627 End,
1628 Child, RectangleObject,
1629 MUIA_VertWeight, 0,
1630 MUIA_Rectangle_HBar, TRUE,
1631 MUIA_Rectangle_BarTitle, "List Controls",
1632 End,
1633 Child, ColGroup(6),
1634 Child, MUI_MakeObject(MUIO_Label,
1635 "Affected index 1:", 0),
1636 Child, list.index1_string =
1637 StringObject,
1638 StringFrame,
1639 MUIA_String_Accept, (IPTR)digits,
1640 MUIA_String_Integer, 0,
1641 End,
1642 Child, HGroup,
1643 Child, list.dragsortable_check =
1644 MUI_MakeObject(MUIO_Checkmark, NULL),
1645 Child, MUI_MakeObject(MUIO_Label,
1646 "Drag sortable", 0),
1647 Child, HVSpace,
1648 End,
1649 Child, HGroup,
1650 Child, list.showdropmarks_check =
1651 MUI_MakeObject(MUIO_Checkmark, NULL),
1652 Child, MUI_MakeObject(MUIO_Label,
1653 "Show drop marks", 0),
1654 Child, HVSpace,
1655 End,
1656 Child, HVSpace,
1657 Child, HVSpace,
1659 Child, MUI_MakeObject(MUIO_Label,
1660 "Affected index 2:", 0),
1661 Child, list.index2_string =
1662 StringObject,
1663 StringFrame,
1664 MUIA_String_Accept, (IPTR)digits,
1665 MUIA_String_Integer, 0,
1666 End,
1667 Child, HGroup,
1668 Child, list.quiet_check =
1669 MUI_MakeObject(MUIO_Checkmark,NULL),
1670 Child, MUI_MakeObject(MUIO_Label,
1671 "Quiet", 0),
1672 Child, HVSpace,
1673 End,
1674 Child, HGroup,
1675 Child, list.autovisible_check =
1676 MUI_MakeObject(MUIO_Checkmark,NULL),
1677 Child, MUI_MakeObject(MUIO_Label,
1678 "Auto visible", 0),
1679 Child, HVSpace,
1680 End,
1681 Child, list.reset_button =
1682 MUI_MakeObject(MUIO_Button, "Reset"),
1683 Child, HVSpace,
1685 Child, MUI_MakeObject(MUIO_Label,
1686 "Move/exchange mode 1:", 0),
1687 Child, list.move1_cycle = CycleObject,
1688 ButtonFrame,
1689 MUIA_Cycle_Entries, list_move1_modes,
1690 End,
1691 Child, list.move_button =
1692 MUI_MakeObject(MUIO_Button, "Move"),
1693 Child, list.sort_button =
1694 MUI_MakeObject(MUIO_Button, "Sort"),
1695 Child, list.enable_button =
1696 MUI_MakeObject(MUIO_Button, "Enable"),
1697 Child, HVSpace,
1699 Child, MUI_MakeObject(MUIO_Label,
1700 "Move/exchange mode 2:", 0),
1701 Child, list.move2_cycle = CycleObject,
1702 ButtonFrame,
1703 MUIA_Cycle_Entries, list_move2_modes,
1704 End,
1705 Child, list.exchange_button =
1706 MUI_MakeObject(MUIO_Button, "Exchange"),
1707 Child, list.redraw_button =
1708 MUI_MakeObject(MUIO_Button, "Redraw"),
1709 Child, MUI_MakeObject(MUIO_Label,
1710 "Title:", 0),
1711 Child, list.title_string =
1712 StringObject,
1713 StringFrame,
1714 End,
1716 Child, MUI_MakeObject(MUIO_Label,
1717 "Jump mode:", 0),
1718 Child, list.jump_cycle = CycleObject,
1719 ButtonFrame,
1720 MUIA_Cycle_Entries, list_jump_modes,
1721 End,
1722 Child, list.jump_button =
1723 MUI_MakeObject(MUIO_Button, "Jump"),
1724 Child, list.toggle_button =
1725 MUI_MakeObject(MUIO_Button, "Toggle"),
1726 Child, MUI_MakeObject(MUIO_Label,
1727 "Entries:", 0),
1728 Child, list.entries_text = TextObject,
1729 TextFrame,
1730 MUIA_Text_Contents, "N/A",
1731 End,
1733 Child, MUI_MakeObject(MUIO_Label,
1734 "Select/redraw mode:", 0),
1735 Child, list.select_cycle = CycleObject,
1736 ButtonFrame,
1737 MUIA_Cycle_Entries, list_select_modes,
1738 End,
1739 Child, list.select_button =
1740 MUI_MakeObject(MUIO_Button, "Select"),
1741 Child, list.deselect_button =
1742 MUI_MakeObject(MUIO_Button, "Deselect"),
1743 Child, MUI_MakeObject(MUIO_Label,
1744 "Visible entries:", 0),
1745 Child, list.visible_text = TextObject,
1746 TextFrame,
1747 MUIA_Text_Contents, "N/A",
1748 End,
1750 Child, MUI_MakeObject(MUIO_Label,
1751 "Insert mode:", 0),
1752 Child, list.insert_cycle = CycleObject,
1753 ButtonFrame,
1754 MUIA_Cycle_Entries, list_insert_modes,
1755 End,
1756 Child, list.insert_single_button =
1757 MUI_MakeObject(MUIO_Button, "Insert Single"),
1758 Child, list.insert_multiple_button =
1759 MUI_MakeObject(MUIO_Button, "Insert Multiple"),
1760 Child, MUI_MakeObject(MUIO_Label,
1761 "First visible index:", 0),
1762 Child, list.first_text = TextObject,
1763 TextFrame,
1764 MUIA_Text_Contents, "N/A",
1765 End,
1767 Child, MUI_MakeObject(MUIO_Label,
1768 "Remove mode:", 0),
1769 Child, list.remove_cycle = CycleObject,
1770 ButtonFrame,
1771 MUIA_Cycle_Entries, list_remove_modes,
1772 End,
1773 Child, list.remove_button =
1774 MUI_MakeObject(MUIO_Button, "Remove"),
1775 Child, list.clear_button =
1776 MUI_MakeObject(MUIO_Button, "Clear"),
1777 Child, MUI_MakeObject(MUIO_Label,
1778 "Last insertion index:", 0),
1779 Child, list.insert_text = TextObject,
1780 TextFrame,
1781 MUIA_Text_Contents, "N/A",
1782 End,
1784 Child, MUI_MakeObject(MUIO_Label,
1785 "Activate mode:", 0),
1786 Child, list.activate_cycle = CycleObject,
1787 ButtonFrame,
1788 MUIA_Cycle_Entries, list_activate_modes,
1789 End,
1790 Child, list.activate_button =
1791 MUI_MakeObject(MUIO_Button, "Activate"),
1792 Child, list.deactivate_button =
1793 MUI_MakeObject(MUIO_Button, "Deactivate"),
1794 Child, MUI_MakeObject(MUIO_Label,
1795 "Active index:", 0),
1796 Child, list.active_text = TextObject,
1797 TextFrame,
1798 MUIA_Text_Contents, "N/A",
1799 End,
1800 End,
1801 End,
1802 Child, VGroup,
1803 Child, ColGroup(LIST_COUNT / 2),
1804 Child, VGroup, GroupFrameT("Standard Format"),
1805 Child, list.multi_lists[0] = ListviewObject,
1806 MUIA_Listview_List,
1807 ListObject,
1808 InputListFrame,
1809 MUIA_List_DisplayHook,
1810 &hook_display,
1811 MUIA_List_Format, list_format,
1812 MUIA_List_SourceArray, entries,
1813 MUIA_List_Title, TRUE,
1814 End,
1815 MUIA_Listview_MultiSelect,
1816 MUIV_Listview_MultiSelect_None,
1817 MUIA_Listview_DefClickColumn, 1,
1818 MUIA_CycleChain, 1,
1819 End,
1820 End,
1821 Child, VGroup, GroupFrameT("Custom Format"),
1822 Child, list.multi_lists[1] = ListviewObject,
1823 MUIA_Listview_List,
1824 ListObject,
1825 InputListFrame,
1826 MUIA_List_DisplayHook,
1827 &hook_display,
1828 MUIA_List_Format, list_format,
1829 MUIA_List_SourceArray, entries,
1830 MUIA_List_Title, TRUE,
1831 End,
1832 MUIA_Listview_MultiSelect,
1833 MUIV_Listview_MultiSelect_None,
1834 MUIA_CycleChain, 1,
1835 End,
1836 End,
1837 End,
1838 Child, RectangleObject,
1839 MUIA_VertWeight, 0,
1840 MUIA_Rectangle_HBar, TRUE,
1841 MUIA_Rectangle_BarTitle, "List Controls",
1842 End,
1843 Child, HGroup,
1844 Child, MUI_MakeObject(MUIO_Label, "Format:", 0),
1845 Child, list.format_string = StringObject,
1846 StringFrame,
1847 MUIA_CycleChain, 1,
1848 End,
1849 Child, list.showheadings_check =
1850 MUI_MakeObject(MUIO_Checkmark, NULL),
1851 Child, MUI_MakeObject(MUIO_Label,
1852 "Show column headings", 0),
1853 End,
1854 Child, HGroup,
1855 Child, MUI_MakeObject(MUIO_Label,
1856 "Default clicked column:", 0),
1857 Child, list.def_column_string = StringObject,
1858 StringFrame,
1859 MUIA_String_Accept, (IPTR)digits,
1860 MUIA_String_Integer, -1,
1861 MUIA_CycleChain, 1,
1862 End,
1863 Child, MUI_MakeObject(MUIO_Label,
1864 "Clicked column:", 0),
1865 Child, list.column_string = StringObject,
1866 MUIA_ShowMe, FALSE,
1867 End,
1868 Child, list.column_text = TextObject,
1869 TextFrame,
1870 MUIA_Text_Contents, "N/A",
1871 End,
1872 End,
1873 End,
1874 End,
1876 /* gauges */
1877 Child, HGroup,
1878 Child, VGroup,
1879 Child, VGroup,
1880 GroupFrame,
1881 Child, GaugeObject,
1882 GaugeFrame,
1883 MUIA_Gauge_InfoText, "%ld %%",
1884 MUIA_Gauge_Horiz, TRUE,
1885 MUIA_Gauge_Current, 25,
1886 End,
1887 Child, ScaleObject,
1888 End,
1889 End,
1890 Child, VGroup,
1891 GroupFrame,
1892 Child, GaugeObject,
1893 GaugeFrame,
1894 MUIA_Gauge_InfoText, "%ld %%",
1895 MUIA_Gauge_Horiz, TRUE,
1896 MUIA_Gauge_Current, 50,
1897 End,
1898 Child, ScaleObject,
1899 End,
1900 End,
1901 Child, VGroup,
1902 GroupFrame,
1903 Child, GaugeObject,
1904 GaugeFrame,
1905 MUIA_Gauge_InfoText, "%ld %%",
1906 MUIA_Gauge_Horiz, TRUE,
1907 MUIA_Gauge_Current, 75,
1908 End,
1909 Child, ScaleObject,
1910 End,
1911 End,
1912 End,
1913 Child, HGroup,
1914 Child, HVSpace,
1915 Child, GaugeObject,
1916 GaugeFrame,
1917 MUIA_Gauge_InfoText, "%ld %%",
1918 MUIA_Gauge_Current, 25,
1919 End,
1920 Child, GaugeObject,
1921 GaugeFrame,
1922 MUIA_Gauge_InfoText, "%ld %%",
1923 MUIA_Gauge_Current, 50,
1924 End,
1925 Child, GaugeObject,
1926 GaugeFrame,
1927 MUIA_Gauge_InfoText, "%ld %%",
1928 MUIA_Gauge_Current, 75,
1929 End,
1930 Child, HVSpace,
1931 End,
1932 End,
1934 /* numeric */
1935 Child, HGroup,
1936 Child, ColGroup(2),
1937 GroupFrameT("Horizontal Sliders"),
1938 Child, MUI_MakeObject(MUIO_Label, "Normal:", 0),
1939 Child, numerics[HNSLIDER] = SliderObject,
1940 MUIA_Slider_Horiz, TRUE,
1941 MUIA_Numeric_Min, NUMERIC_MIN,
1942 MUIA_Numeric_Max, NUMERIC_MAX,
1943 MUIA_CycleChain, 1,
1944 End,
1945 Child, MUI_MakeObject(MUIO_Label, "Reverse:", 0),
1946 Child, numerics[HRSLIDER] = SliderObject,
1947 MUIA_Numeric_Reverse, TRUE,
1948 MUIA_Numeric_Min, NUMERIC_MIN,
1949 MUIA_Numeric_Max, NUMERIC_MAX,
1950 MUIA_CycleChain, 1,
1951 End,
1952 Child, MUI_MakeObject(MUIO_Label, "Quiet:", 0),
1953 Child, numerics[HQSLIDER] = SliderObject,
1954 MUIA_Slider_Quiet, TRUE,
1955 MUIA_Numeric_Min, NUMERIC_MIN,
1956 MUIA_Numeric_Max, NUMERIC_MAX,
1957 MUIA_CycleChain, 1,
1958 End,
1959 End,
1960 Child, ColGroup(3),
1961 GroupFrameT("Vertical Sliders"),
1962 Child, MUI_MakeObject(MUIO_Label, "Normal", 0),
1963 Child, MUI_MakeObject(MUIO_Label, "Reverse", 0),
1964 Child, MUI_MakeObject(MUIO_Label, "Quiet", 0),
1965 Child, numerics[VNSLIDER] = SliderObject,
1966 MUIA_Slider_Horiz, FALSE,
1967 MUIA_Numeric_Min, NUMERIC_MIN,
1968 MUIA_Numeric_Max, NUMERIC_MAX,
1969 MUIA_CycleChain, 1,
1970 End,
1971 Child, numerics[VRSLIDER] = SliderObject,
1972 MUIA_Slider_Horiz, FALSE,
1973 MUIA_Numeric_Reverse, TRUE,
1974 MUIA_Numeric_Min, NUMERIC_MIN,
1975 MUIA_Numeric_Max, NUMERIC_MAX,
1976 MUIA_CycleChain, 1,
1977 End,
1978 Child, numerics[VQSLIDER] = SliderObject,
1979 MUIA_Slider_Horiz, FALSE,
1980 MUIA_Slider_Quiet, TRUE,
1981 MUIA_Numeric_Min, NUMERIC_MIN,
1982 MUIA_Numeric_Max, NUMERIC_MAX,
1983 MUIA_CycleChain, 1,
1984 End,
1985 End,
1986 Child, ColGroup(2),
1987 GroupFrameT("Numeric Buttons"),
1988 Child, MUI_MakeObject(MUIO_Label, "Normal:", 0),
1989 Child, numerics[NNUMERICBUTTON] =
1990 NumericbuttonObject,
1991 MUIA_Numeric_Min, NUMERIC_MIN,
1992 MUIA_Numeric_Max, NUMERIC_MAX,
1993 MUIA_CycleChain, 1,
1994 End,
1995 Child, MUI_MakeObject(MUIO_Label, "Reverse:", 0),
1996 Child, numerics[RNUMERICBUTTON] =
1997 NumericbuttonObject,
1998 MUIA_Numeric_Reverse, TRUE,
1999 MUIA_Numeric_Min, NUMERIC_MIN,
2000 MUIA_Numeric_Max, NUMERIC_MAX,
2001 MUIA_CycleChain, 1,
2002 End,
2003 End,
2004 Child, ColGroup(2),
2005 GroupFrameT("Knobs"),
2006 Child, MUI_MakeObject(MUIO_Label, "Normal", 0),
2007 Child, MUI_MakeObject(MUIO_Label, "Reverse", 0),
2008 Child, numerics[NKNOB] = KnobObject,
2009 MUIA_Numeric_Min, NUMERIC_MIN,
2010 MUIA_Numeric_Max, NUMERIC_MAX,
2011 MUIA_CycleChain, 1,
2012 End,
2013 Child, numerics[RKNOB] = KnobObject,
2014 MUIA_Numeric_Reverse, TRUE,
2015 MUIA_Numeric_Min, NUMERIC_MIN,
2016 MUIA_Numeric_Max, NUMERIC_MAX,
2017 MUIA_CycleChain, 1,
2018 End,
2019 End,
2020 Child, ColGroup(2),
2021 Child, MUI_MakeObject(MUIO_Label,
2022 "Minimum Value:", 0),
2023 Child, min_string = (Object *)StringObject,
2024 StringFrame,
2025 MUIA_String_Accept, (IPTR)digits,
2026 MUIA_String_Integer, NUMERIC_MIN,
2027 MUIA_CycleChain, 1,
2028 End,
2029 Child, MUI_MakeObject(MUIO_Label,
2030 "Maximum Value:", 0),
2031 Child, max_string = (Object *)StringObject,
2032 StringFrame,
2033 MUIA_String_Accept, (IPTR)digits,
2034 MUIA_String_Integer, NUMERIC_MAX,
2035 MUIA_CycleChain, 1,
2036 End,
2037 Child, slider_button = TextObject,
2038 ButtonFrame,
2039 MUIA_InputMode, MUIV_InputMode_RelVerify,
2040 MUIA_CycleChain, 1,
2041 MUIA_Background, MUII_ButtonBack,
2042 MUIA_Text_PreParse, "\33c",
2043 MUIA_Text_Contents,
2044 "Change Slider Orientations",
2045 End,
2046 Child, MUI_MakeObject(MUIO_Label, "", 0),
2047 End,
2048 End,
2050 /* radios */
2051 Child, HGroup,
2052 Child, VGroup,
2053 Child, RadioObject,
2054 GroupFrame,
2055 MUIA_Radio_Entries, radio_entries1,
2056 End,
2057 Child, country_radio[0] = RadioObject,
2058 GroupFrame,
2059 MUIA_Radio_Entries, radio_entries2,
2060 MUIA_Radio_Active, 1,
2061 End,
2062 End,
2063 Child, HGroup,
2064 Child, RadioObject,
2065 GroupFrame,
2066 MUIA_Radio_Entries, radio_entries1,
2067 End,
2068 Child, country_radio[1] = RadioObject,
2069 GroupFrame,
2070 MUIA_Radio_Entries, radio_entries2,
2071 MUIA_Radio_Active, 1,
2072 End,
2073 End,
2074 End,
2076 #if defined(TEST_ICONLIST)
2077 /* iconlist */
2078 Child, HGroup,
2079 Child, volume_iconlist =
2080 MUI_NewObject(MUIC_IconVolumeList, GroupFrame,
2081 TAG_DONE),
2082 Child, drawer_iconlist =
2083 MUI_NewObject(MUIC_IconDrawerList, GroupFrame,
2084 MUIA_IconDrawerList_Drawer, "SYS:",
2085 TAG_DONE),
2086 End,
2087 #endif
2089 /* balancing */
2090 Child, HGroup,
2091 Child, create_balance_column(),
2092 Child, BalanceObject,
2093 End,
2095 Child, create_balance_column(),
2096 Child, BalanceObject,
2097 End,
2099 Child, create_balance_column(),
2100 Child, BalanceObject,
2101 End,
2103 Child, create_balance_column(),
2104 Child, BalanceObject,
2105 End,
2107 Child, create_balance_column(),
2109 End,
2111 End,
2113 Child, HGroup,
2114 Child, about_button = TextObject,
2115 ButtonFrame,
2116 MUIA_InputMode, MUIV_InputMode_RelVerify,
2117 MUIA_CycleChain, 1,
2118 MUIA_Background, MUII_ButtonBack,
2119 MUIA_Text_PreParse, "\33c",
2120 MUIA_Text_Contents, "About",
2121 End,
2122 Child, quit_button = TextObject,
2123 ButtonFrame,
2124 MUIA_InputMode, MUIV_InputMode_RelVerify,
2125 MUIA_CycleChain, 1,
2126 MUIA_Background, MUII_ButtonBack,
2127 MUIA_ControlChar, 'q',
2128 MUIA_Text_HiChar, 'q',
2129 MUIA_Text_PreParse, "\33c",
2130 MUIA_Text_Contents, "Quit",
2131 End,
2132 End,
2133 End,
2134 End,
2136 SubWindow, second_wnd = WindowObject,
2137 MUIA_Window_Title, "Second window",
2138 WindowContents, VGroup,
2139 Child, DropTextObject,
2140 MUIA_Text_Contents, "Drop here",
2141 MUIA_Dropable, TRUE,
2142 End,
2143 End,
2144 End,
2146 End;
2148 if (app)
2150 ULONG sigs = 0;
2152 DoMethod(wnd, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, app, 2,
2153 MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit);
2154 DoMethod(second_wnd, MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
2155 second_wnd, 3, MUIM_Set, MUIA_Window_Open, FALSE);
2156 DoMethod(open_button, MUIM_Notify, MUIA_Pressed, FALSE, second_wnd,
2157 3, MUIM_Set, MUIA_Window_Open, TRUE);
2158 DoMethod(about_button, MUIM_Notify, MUIA_Pressed, FALSE, app, 2,
2159 MUIM_Application_AboutMUI, NULL);
2160 DoMethod(quit_button, MUIM_Notify, MUIA_Pressed, FALSE, app, 2,
2161 MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit);
2162 DoMethod(objects_button, MUIM_Notify, MUIA_Pressed, FALSE, app, 2,
2163 MUIM_CallHook, &hook_objects);
2164 DoMethod(repeat_button, MUIM_Notify, MUIA_Timer, MUIV_EveryTime,
2165 app, 2, MUIM_CallHook, &hook);
2167 /* Notifications and set-up for string objects */
2168 DoMethod(string.max_len_text, MUIM_SetAsString, MUIA_Text_Contents,
2169 "%ld", XGET(string.strings[0], MUIA_String_MaxLen) - 1);
2170 set(string.cursor_pos_slider, MUIA_Numeric_Max,
2171 XGET(string.strings[0], MUIA_String_MaxLen) - 1);
2172 set(string.display_pos_slider, MUIA_Numeric_Max,
2173 XGET(string.strings[0], MUIA_String_MaxLen) - 1);
2174 set(string.cr_advance_check, MUIA_Selected, TRUE);
2175 set(string.attach_list_check, MUIA_Selected, TRUE);
2176 set(string.strings[1], MUIA_Disabled,
2177 XGET(string.strings[1], MUIA_String_Format)
2178 != MUIV_String_Format_Left);
2179 set(string.strings[2], MUIA_Disabled,
2180 XGET(string.strings[2], MUIA_String_Format)
2181 != MUIV_String_Format_Right);
2182 set(string.strings[3], MUIA_Disabled,
2183 XGET(string.strings[3], MUIA_String_Format)
2184 != MUIV_String_Format_Center);
2185 set(string.strings[4], MUIA_Disabled,
2186 !XGET(string.strings[4], MUIA_String_Secret));
2187 set(string.strings[0], MUIA_String_MaxLen, 100);
2188 set(string.reject_string, MUIA_String_Contents,
2189 (IPTR)default_reject_chars);
2191 for (i = 0; i < STRING_COUNT; i++)
2193 if (i == 0)
2195 DoMethod(string.accept_string, MUIM_Notify,
2196 MUIA_String_Contents, MUIV_EveryTime, string.strings[i],
2197 3, MUIM_Set, MUIA_String_Accept, MUIV_TriggerValue);
2198 DoMethod(string.cr_advance_check, MUIM_Notify, MUIA_Selected,
2199 MUIV_EveryTime, string.strings[i], 3, MUIM_Set,
2200 MUIA_String_AdvanceOnCR, MUIV_TriggerValue);
2201 DoMethod(string.cursor_pos_slider, MUIM_Notify,
2202 MUIA_Numeric_Value, MUIV_EveryTime, string.strings[i], 3,
2203 MUIM_Set, MUIA_String_BufferPos, MUIV_TriggerValue);
2204 DoMethod(string.display_pos_slider, MUIM_Notify,
2205 MUIA_Numeric_Value, MUIV_EveryTime, string.strings[i], 3,
2206 MUIM_Set, MUIA_String_DisplayPos, MUIV_TriggerValue);
2207 DoMethod(string.attach_list_check, MUIM_Notify, MUIA_Selected,
2208 TRUE, string.strings[i], 3, MUIM_Set,
2209 MUIA_String_AttachedList, list.lists[0]);
2210 DoMethod(string.attach_list_check, MUIM_Notify, MUIA_Selected,
2211 FALSE, string.strings[i], 3, MUIM_Set,
2212 MUIA_String_AttachedList, NULL);
2214 else
2216 DoMethod(string.strings[0], MUIM_Notify, MUIA_String_Accept,
2217 MUIV_EveryTime, string.strings[i], 3, MUIM_Set,
2218 MUIA_String_Accept, MUIV_TriggerValue);
2219 DoMethod(string.strings[0], MUIM_Notify,
2220 MUIA_String_AdvanceOnCR, MUIV_EveryTime,
2221 string.strings[i], 3, MUIM_Set, MUIA_String_AdvanceOnCR,
2222 MUIV_TriggerValue);
2223 DoMethod(string.strings[0], MUIM_Notify,
2224 MUIA_String_BufferPos, MUIV_EveryTime,
2225 string.strings[i], 3, MUIM_Set, MUIA_String_BufferPos,
2226 MUIV_TriggerValue);
2227 DoMethod(string.strings[0], MUIM_Notify,
2228 MUIA_String_DisplayPos, MUIV_EveryTime,
2229 string.strings[i], 3, MUIM_Set, MUIA_String_DisplayPos,
2230 MUIV_TriggerValue);
2231 DoMethod(string.strings[0], MUIM_Notify,
2232 MUIA_String_AttachedList, MUIV_EveryTime,
2233 string.strings[i], 3, MUIM_Set,
2234 MUIA_String_AttachedList, MUIV_TriggerValue);
2236 DoMethod(string.reject_string, MUIM_Notify, MUIA_String_Contents,
2237 MUIV_EveryTime, string.strings[i], 3, MUIM_Set,
2238 MUIA_String_Reject, MUIV_TriggerValue);
2239 DoMethod(string.strings[i], MUIM_Notify, MUIA_String_Integer,
2240 MUIV_EveryTime, string.integer_string, 3, MUIM_NoNotifySet,
2241 MUIA_String_Integer, MUIV_TriggerValue);
2242 DoMethod(string.integer_string, MUIM_Notify, MUIA_String_Integer,
2243 MUIV_EveryTime, string.strings[i], 3, MUIM_NoNotifySet,
2244 MUIA_String_Integer, MUIV_TriggerValue);
2246 DoMethod(string.accept_all_check, MUIM_Notify, MUIA_Selected,
2247 MUIV_EveryTime, app, 3, MUIM_CallHook, &hook_standard,
2248 ChangeStringAccept);
2249 DoMethod(string.strings[4], MUIM_Notify, MUIA_String_Acknowledge,
2250 MUIV_EveryTime, string.plaintext_string, 3, MUIM_NoNotifySet,
2251 MUIA_String_Contents, MUIV_TriggerValue);
2252 DoMethod(string.plaintext_string, MUIM_Notify,
2253 MUIA_String_Acknowledge, MUIV_EveryTime, string.strings[4], 3,
2254 MUIM_NoNotifySet, MUIA_String_Contents, MUIV_TriggerValue);
2256 DoMethod(wheel, MUIM_Notify, WHEEL_Hue, MUIV_EveryTime, app, 2,
2257 MUIM_CallHook, &hook_wheel);
2258 DoMethod(wheel, MUIM_Notify, WHEEL_Saturation, MUIV_EveryTime, app,
2259 2, MUIM_CallHook, &hook_wheel);
2260 DoMethod(r_slider, MUIM_Notify, MUIA_Numeric_Value, MUIV_EveryTime,
2261 app, 2, MUIM_CallHook, &hook_slider);
2262 DoMethod(g_slider, MUIM_Notify, MUIA_Numeric_Value, MUIV_EveryTime,
2263 app, 2, MUIM_CallHook, &hook_slider);
2264 DoMethod(b_slider, MUIM_Notify, MUIA_Numeric_Value, MUIV_EveryTime,
2265 app, 2, MUIM_CallHook, &hook_slider);
2267 DoMethod(save_button, MUIM_Notify, MUIA_Pressed, FALSE, app, 3,
2268 MUIM_CallHook, &hook_standard, Save);
2270 DoMethod(quit_item, MUIM_Notify, MUIA_Menuitem_Trigger,
2271 MUIV_EveryTime, app, 2, MUIM_Application_ReturnID,
2272 MUIV_Application_ReturnID_Quit);
2273 DoMethod(about_item, MUIM_Notify, MUIA_Menuitem_Trigger,
2274 MUIV_EveryTime, app, 3, MUIM_CallHook, &hook_standard,
2275 About);
2277 /* Notifications for color objects */
2278 DoMethod(colorfield, MUIM_Notify, MUIA_Colorfield_Red,
2279 MUIV_EveryTime, colorfield2, 3, MUIM_Set, MUIA_Colorfield_Red,
2280 MUIV_TriggerValue);
2281 DoMethod(colorfield, MUIM_Notify, MUIA_Colorfield_Green,
2282 MUIV_EveryTime, colorfield2, 3, MUIM_Set, MUIA_Colorfield_Green,
2283 MUIV_TriggerValue);
2284 DoMethod(colorfield, MUIM_Notify, MUIA_Colorfield_Blue,
2285 MUIV_EveryTime, colorfield2, 3, MUIM_Set, MUIA_Colorfield_Blue,
2286 MUIV_TriggerValue);
2287 DoMethod(coloradjust, MUIM_Notify, MUIA_Coloradjust_Red,
2288 MUIV_EveryTime, colorfield, 3, MUIM_Set, MUIA_Colorfield_Red,
2289 MUIV_TriggerValue);
2290 DoMethod(coloradjust, MUIM_Notify, MUIA_Coloradjust_Green,
2291 MUIV_EveryTime, colorfield, 3, MUIM_Set, MUIA_Colorfield_Green,
2292 MUIV_TriggerValue);
2293 DoMethod(coloradjust, MUIM_Notify, MUIA_Coloradjust_Blue,
2294 MUIV_EveryTime, colorfield, 3, MUIM_Set, MUIA_Colorfield_Blue,
2295 MUIV_TriggerValue);
2296 DoMethod(colorfield, MUIM_Notify, MUIA_Colorfield_Pen,
2297 MUIV_EveryTime, colorfield_pen, 3, MUIM_Set,
2298 MUIA_String_Integer, MUIV_TriggerValue);
2299 DoMethod(colorfield_pen, MUIM_Notify, MUIA_String_Acknowledge,
2300 MUIV_EveryTime, app, 3, MUIM_CallHook, &hook_standard,
2301 ChangePen);
2302 DoMethod(colorfield_reset_button, MUIM_Notify, MUIA_Pressed, FALSE,
2303 colorfield, 3, MUIM_Set, MUIA_Colorfield_RGB, default_color);
2305 /* Notifications for pen objects */
2306 DoMethod(pendisplay, MUIM_Notify, MUIA_Pendisplay_Pen,
2307 MUIV_EveryTime, pendisplay_pen, 3, MUIM_NoNotifySet,
2308 MUIA_String_Integer, MUIV_TriggerValue);
2309 DoMethod(pendisplay_pen, MUIM_Notify, MUIA_String_Acknowledge,
2310 MUIV_EveryTime, app, 3, MUIM_CallHook, &hook_standard,
2311 ChangePendisplayPen);
2312 DoMethod(pendisplay, MUIM_Notify, MUIA_Pendisplay_Spec,
2313 MUIV_EveryTime, pendisplay_spec, 3, MUIM_Set,
2314 MUIA_String_Contents, MUIV_TriggerValue);
2315 DoMethod(colorfield, MUIM_Notify, MUIA_Colorfield_RGB,
2316 MUIV_EveryTime, pendisplay, 3, MUIM_Set,
2317 MUIA_Pendisplay_RGBcolor, MUIV_TriggerValue);
2318 DoMethod(pendisplay, MUIM_Notify, MUIA_Pendisplay_RGBcolor,
2319 MUIV_EveryTime, poppen, 3, MUIM_Set, MUIA_Pendisplay_RGBcolor,
2320 MUIV_TriggerValue);
2321 DoMethod(pendisplay_spec, MUIM_Notify, MUIA_String_Contents,
2322 MUIV_EveryTime, pendisplay, 3, MUIM_Set, MUIA_Pendisplay_Spec,
2323 MUIV_TriggerValue);
2324 DoMethod(reference_check, MUIM_Notify, MUIA_Selected, TRUE,
2325 pendisplay2, 3, MUIM_Set, MUIA_Pendisplay_Reference, pendisplay);
2326 DoMethod(reference_check, MUIM_Notify, MUIA_Selected, FALSE,
2327 pendisplay2, 3, MUIM_Set, MUIA_Pendisplay_Reference, NULL);
2328 DoMethod(shine_button, MUIM_Notify, MUIA_Pressed, FALSE, pendisplay,
2329 2, MUIM_Pendisplay_SetMUIPen, MPEN_SHINE);
2330 DoMethod(shadow_button, MUIM_Notify, MUIA_Pressed, FALSE, pendisplay,
2331 2, MUIM_Pendisplay_SetMUIPen, MPEN_SHADOW);
2332 DoMethod(yellow_button, MUIM_Notify, MUIA_Pressed, FALSE, pendisplay,
2333 4, MUIM_Pendisplay_SetRGB, 0xffffffff, 0xffffffff, 0);
2335 /* Notifications and set-up for list objects */
2336 set(list.showdropmarks_check, MUIA_Selected, TRUE);
2337 UpdateListInfo();
2338 for (i = 0; i < LIST_COUNT; i++)
2340 DoMethod(list.lists[i], MUIM_Notify, MUIA_Listview_DoubleClick,
2341 MUIV_EveryTime, list.lists[i], 3, MUIM_Set, MUIA_Disabled,
2342 TRUE);
2343 DoMethod(list.lists[i], MUIM_Notify, MUIA_List_Entries,
2344 MUIV_EveryTime, list.entries_text, 4, MUIM_SetAsString,
2345 MUIA_Text_Contents, "%ld", MUIV_TriggerValue);
2346 DoMethod(list.lists[i], MUIM_Notify, MUIA_List_Visible,
2347 MUIV_EveryTime, app, 3, MUIM_CallHook, &hook_standard,
2348 ListGetVisible);
2349 DoMethod(list.lists[i], MUIM_Notify, MUIA_List_First,
2350 MUIV_EveryTime, app, 3, MUIM_CallHook, &hook_standard,
2351 ListGetFirst);
2352 DoMethod(list.lists[i], MUIM_Notify, MUIA_List_InsertPosition,
2353 MUIV_EveryTime, list.insert_text, 4, MUIM_SetAsString,
2354 MUIA_Text_Contents, "%ld", MUIV_TriggerValue);
2355 DoMethod(list.lists[i], MUIM_Notify, MUIA_List_Active,
2356 MUIV_EveryTime, app, 3, MUIM_CallHook, &hook_standard,
2357 UpdateListInfo);
2359 DoMethod(list.dragsortable_check, MUIM_Notify, MUIA_Selected,
2360 MUIV_EveryTime, app, 3, MUIM_CallHook, &hook_standard,
2361 ListSetDragSortable);
2362 DoMethod(list.showdropmarks_check, MUIM_Notify, MUIA_Selected,
2363 MUIV_EveryTime, app, 3, MUIM_CallHook, &hook_standard,
2364 ListSetShowDropMarks);
2365 DoMethod(list.quiet_check, MUIM_Notify, MUIA_Selected,
2366 MUIV_EveryTime, app, 3, MUIM_CallHook, &hook_standard,
2367 ListSetQuiet);
2368 DoMethod(list.autovisible_check, MUIM_Notify, MUIA_Selected,
2369 MUIV_EveryTime, app, 3, MUIM_CallHook, &hook_standard,
2370 ListSetAutoVisible);
2371 DoMethod(list.reset_button, MUIM_Notify, MUIA_Pressed, FALSE,
2372 app, 3, MUIM_CallHook, &hook_standard, ListReset);
2373 DoMethod(list.move_button, MUIM_Notify, MUIA_Pressed, FALSE,
2374 app, 3, MUIM_CallHook, &hook_standard, ListMove);
2375 DoMethod(list.sort_button, MUIM_Notify, MUIA_Pressed, FALSE,
2376 app, 3, MUIM_CallHook, &hook_standard, ListSort);
2377 DoMethod(list.enable_button, MUIM_Notify, MUIA_Pressed, FALSE,
2378 app, 3, MUIM_CallHook, &hook_standard, ListEnable);
2379 DoMethod(list.exchange_button, MUIM_Notify, MUIA_Pressed, FALSE,
2380 app, 3, MUIM_CallHook, &hook_standard, ListExchange);
2381 DoMethod(list.jump_button, MUIM_Notify, MUIA_Pressed, FALSE,
2382 app, 3, MUIM_CallHook, &hook_standard, ListJump);
2383 DoMethod(list.select_button, MUIM_Notify, MUIA_Pressed, FALSE,
2384 app, 3, MUIM_CallHook, &hook_standard, ListSelect);
2385 DoMethod(list.deselect_button, MUIM_Notify, MUIA_Pressed, FALSE,
2386 app, 3, MUIM_CallHook, &hook_standard, ListDeselect);
2387 DoMethod(list.toggle_button, MUIM_Notify, MUIA_Pressed, FALSE,
2388 app, 3, MUIM_CallHook, &hook_standard, ListToggle);
2389 DoMethod(list.redraw_button, MUIM_Notify, MUIA_Pressed, FALSE,
2390 app, 3, MUIM_CallHook, &hook_standard, ListRedraw);
2391 DoMethod(list.insert_single_button, MUIM_Notify, MUIA_Pressed, FALSE,
2392 app, 3, MUIM_CallHook, &hook_standard, ListInsertSingle);
2393 DoMethod(list.insert_multiple_button, MUIM_Notify, MUIA_Pressed, FALSE,
2394 app, 3, MUIM_CallHook, &hook_standard, ListInsert);
2395 DoMethod(list.remove_button, MUIM_Notify, MUIA_Pressed, FALSE,
2396 app, 3, MUIM_CallHook, &hook_standard, ListRemove);
2397 DoMethod(list.clear_button, MUIM_Notify, MUIA_Pressed, FALSE,
2398 app, 3, MUIM_CallHook, &hook_standard, ListClear);
2399 DoMethod(list.activate_button, MUIM_Notify, MUIA_Pressed, FALSE,
2400 app, 3, MUIM_CallHook, &hook_standard, ListActivate);
2401 DoMethod(list.deactivate_button, MUIM_Notify, MUIA_Pressed, FALSE,
2402 app, 3, MUIM_CallHook, &hook_standard, ListDeactivate);
2403 DoMethod(list.title_string, MUIM_Notify, MUIA_String_Acknowledge,
2404 MUIV_EveryTime, app, 3, MUIM_CallHook, &hook_standard,
2405 ChangeListTitle);
2406 DoMethod(list.list_radios, MUIM_Notify, MUIA_Radio_Active,
2407 MUIV_EveryTime, app, 3, MUIM_CallHook, &hook_standard,
2408 UpdateListInfo);
2410 SET(list.showheadings_check, MUIA_Selected,
2411 XGET(list.multi_lists[0], MUIA_List_Title));
2412 SET(list.format_string, MUIA_String_Contents,
2413 XGET(list.multi_lists[1], MUIA_List_Format));
2414 SET(list.def_column_string, MUIA_String_Integer,
2415 XGET(list.multi_lists[0], MUIA_Listview_DefClickColumn));
2416 DoMethod(list.format_string, MUIM_Notify, MUIA_String_Acknowledge,
2417 MUIV_EveryTime, list.multi_lists[1], 3, MUIM_Set,
2418 MUIA_List_Format, MUIV_TriggerValue);
2419 DoMethod(list.multi_lists[1], MUIM_Notify, MUIA_List_Format,
2420 MUIV_EveryTime, wnd, 3, MUIM_Set,
2421 MUIA_Window_ActiveObject, list.format_string);
2422 for (i = 0; i < MULTI_LIST_COUNT; i++)
2424 DoMethod(list.showheadings_check, MUIM_Notify, MUIA_Selected,
2425 MUIV_EveryTime, list.multi_lists[i], 3, MUIM_Set,
2426 MUIA_List_Title, MUIV_TriggerValue);
2427 DoMethod(list.def_column_string, MUIM_Notify,
2428 MUIA_String_Integer,
2429 MUIV_EveryTime, list.multi_lists[i], 3, MUIM_Set,
2430 MUIA_Listview_DefClickColumn, MUIV_TriggerValue);
2431 DoMethod(list.multi_lists[i], MUIM_Notify,
2432 MUIA_Listview_ClickColumn, MUIV_EveryTime,
2433 list.column_string, 3, MUIM_Set, MUIA_String_Integer,
2434 MUIV_TriggerValue);
2436 DoMethod(list.column_string, MUIM_Notify, MUIA_String_Contents,
2437 MUIV_EveryTime, list.column_text, 3, MUIM_Set, MUIA_Text_Contents,
2438 MUIV_TriggerValue);
2440 DoMethod(listview, MUIM_Notify, MUIA_Listview_DoubleClick, TRUE,
2441 popobject, 2, MUIM_Popstring_Close, TRUE);
2443 /* numeric */
2444 for (i = 0; i < NUMERIC_COUNT; i++)
2446 DoMethod(min_string, MUIM_Notify, MUIA_String_Integer,
2447 MUIV_EveryTime, numerics[i], 3, MUIM_Set, MUIA_Numeric_Min,
2448 MUIV_TriggerValue);
2449 DoMethod(max_string, MUIM_Notify, MUIA_String_Integer,
2450 MUIV_EveryTime, numerics[i], 3, MUIM_Set, MUIA_Numeric_Max,
2451 MUIV_TriggerValue);
2453 DoMethod(slider_button, MUIM_Notify, MUIA_Pressed, FALSE,
2454 numerics[HRSLIDER], 3, MUIM_Set, MUIA_Slider_Horiz, FALSE);
2456 /* radio */
2457 DoMethod(country_radio[0], MUIM_Notify, MUIA_Radio_Active,
2458 MUIV_EveryTime, country_radio[1], 3, MUIM_NoNotifySet,
2459 MUIA_Radio_Active, MUIV_TriggerValue);
2460 DoMethod(country_radio[1], MUIM_Notify, MUIA_Radio_Active,
2461 MUIV_EveryTime, country_radio[0], 3, MUIM_NoNotifySet,
2462 MUIA_Radio_Active, MUIV_TriggerValue);
2464 #if defined(TEST_ICONLIST)
2465 /* iconlist */
2466 DoMethod(volume_iconlist, MUIM_Notify, MUIA_IconList_DoubleClick,
2467 TRUE, volume_iconlist, 3, MUIM_CallHook, &hook_standard,
2468 volume_doubleclicked);
2469 DoMethod(drawer_iconlist, MUIM_Notify, MUIA_IconList_DoubleClick,
2470 TRUE, drawer_iconlist, 3, MUIM_CallHook, &hook_standard,
2471 drawer_doubleclicked);
2472 #endif
2474 /* automatic tests */
2475 get(list.lists[0], MUIA_List_Visible, &value);
2476 if (value != -1)
2477 printf("MUIA_List_Visible equals %ld before display,"
2478 " but it should be -1.\n", (long)value);
2480 set(wnd, MUIA_Window_Open, TRUE);
2481 set(wnd, MUIA_Window_ScreenTitle, "Zune Test application");
2483 /* Set pen fields */
2484 set(colorfield_pen, MUIA_String_Integer,
2485 XGET(colorfield, MUIA_Colorfield_Pen));
2487 char pen_str[10];
2488 nnset(pendisplay_pen, MUIA_String_Integer,
2489 XGET(pendisplay, MUIA_Pendisplay_Pen));
2491 struct MUI_PenSpec *pen_spec = NULL;
2492 GET(pendisplay, MUIA_Pendisplay_Spec, &pen_spec);
2493 strncpy(pen_str, pen_spec->buf, 10);
2494 set(pendisplay_spec, MUIA_String_Contents, pen_str);
2496 while ((LONG) DoMethod(app, MUIM_Application_NewInput,
2497 &sigs) != MUIV_Application_ReturnID_Quit)
2499 if (sigs)
2501 sigs = Wait(sigs | SIGBREAKF_CTRL_C | SIGBREAKF_CTRL_D);
2502 if (sigs & SIGBREAKF_CTRL_C)
2503 break;
2504 if (sigs & SIGBREAKF_CTRL_D)
2505 break;
2509 MUI_DisposeObject(app);
2511 if (context_menu)
2512 MUI_DisposeObject(context_menu);
2513 CloseLibrary(ColorWheelBase);
2514 MUI_DeleteCustomClass(CL_DropText);
2516 CloseLibrary(MUIMasterBase);
2518 DeletePool(pool);
2520 return 0;