2 Copyright © 2002-2015, The AROS Development Team.
8 #define INTUITION_NO_INLINE_STDARG
10 #include <exec/types.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
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"
41 #define STRING_COUNT 6
43 #define MULTI_LIST_COUNT 2
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",
58 static const char *empty
[] = {"", "", "", "", "", NULL
};
59 static const LONG list_active_positions
[] =
62 MUIV_List_Active_Bottom
,
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",
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,";
99 struct Library
*MUIMasterBase
;
100 struct Library
*ColorWheelBase
;
112 Object
*strings
[STRING_COUNT
],
122 *standard_hook_check
,
130 Object
*lists
[LIST_COUNT
],
153 *insert_single_button
,
154 *insert_multiple_button
,
159 *showdropmarks_check
,
167 *multi_lists
[MULTI_LIST_COUNT
],
173 LONG quiet
[LIST_COUNT
];
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
,
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
;
197 AROS_UFH0(void, repeat_function
)
201 printf("MUI_Timer\n");
206 AROS_UFH0(void, wheel_function
)
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);
220 AROS_UFH0(void, slider_function
)
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
));
239 AROS_UFH0(void, objects_function
)
243 Object
*new_obj
= MUI_MakeObject(MUIO_Button
, "Button");
246 DoMethod(group
, MUIM_Group_InitChange
);
247 DoMethod(group
, OM_ADDMEMBER
, new_obj
);
248 DoMethod(group
, MUIM_Group_ExitChange
);
254 static void About(void)
256 static Object
*about_wnd
;
260 about_wnd
= AboutmuiObject
, MUIA_Aboutmui_Application
, app
, End
;
264 set(about_wnd
, MUIA_Window_Open
, TRUE
);
267 static void ChangeStringAccept(void)
269 STRPTR accept_chars
= NULL
, reject_chars
= NULL
;
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
);
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)
294 GET(colorfield_pen
, MUIA_String_Integer
, &pen
);
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)
310 i
= XGET(list
.list_radios
, MUIA_Radio_Active
);
312 GET(list
.lists
[i
], MUIA_List_Title
, &title
);
315 GET(list
.title_string
, MUIA_String_Contents
, &title
);
316 if (title
[0] == '\0')
319 title
= StrDup(title
);
321 SET(list
.lists
[i
], MUIA_List_Title
, title
);
324 static void UpdateListInfo(void)
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
,
347 GET(list
.lists
[i
], MUIA_List_Visible
, &value
);
348 DoMethod(list
.visible_text
, MUIM_SetAsString
, MUIA_Text_Contents
,
350 GET(list
.lists
[i
], MUIA_List_First
, &value
);
351 DoMethod(list
.first_text
, MUIM_SetAsString
, MUIA_Text_Contents
,
353 GET(list
.lists
[i
], MUIA_List_InsertPosition
, &value
);
354 DoMethod(list
.insert_text
, MUIM_SetAsString
, MUIA_Text_Contents
,
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");
360 DoMethod(list
.active_text
, MUIM_SetAsString
, MUIA_Text_Contents
,
364 static void ListGetVisible(void)
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
,
376 static void ListGetFirst(void)
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
,
388 static void ListSetDragSortable(void)
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)
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)
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)
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)
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
;
447 i
= XGET(list
.list_radios
, MUIA_Radio_Active
);
449 mode
= XGET(list
.move1_cycle
, MUIA_Cycle_Active
);
452 pos1
= XGET(list
.index1_string
, MUIA_String_Integer
);
456 mode
= XGET(list
.move2_cycle
, MUIA_Cycle_Active
);
459 pos2
= XGET(list
.index2_string
, MUIA_String_Integer
);
463 DoMethod(list
.lists
[i
], MUIM_List_Move
, pos1
, pos2
);
466 static void ListSort(void)
470 i
= XGET(list
.list_radios
, MUIA_Radio_Active
);
472 DoMethod(list
.lists
[i
], MUIM_List_Sort
);
475 static void ListEnable(void)
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
;
489 i
= XGET(list
.list_radios
, MUIA_Radio_Active
);
491 mode
= XGET(list
.move1_cycle
, MUIA_Cycle_Active
);
494 pos1
= XGET(list
.index1_string
, MUIA_String_Integer
);
498 mode
= XGET(list
.move2_cycle
, MUIA_Cycle_Active
);
501 pos2
= XGET(list
.index2_string
, MUIA_String_Integer
);
505 DoMethod(list
.lists
[i
], MUIM_List_Exchange
, pos1
, pos2
);
508 static void ListJump(void)
513 i
= XGET(list
.list_radios
, MUIA_Radio_Active
);
515 mode
= XGET(list
.jump_cycle
, MUIA_Cycle_Active
);
518 pos
= XGET(list
.index1_string
, MUIA_String_Integer
);
522 DoMethod(list
.lists
[i
], MUIM_List_Jump
, pos
);
525 static void ListSelect(void)
530 i
= XGET(list
.list_radios
, MUIA_Radio_Active
);
532 mode
= XGET(list
.select_cycle
, MUIA_Cycle_Active
);
535 pos
= XGET(list
.index1_string
, MUIA_String_Integer
);
539 DoMethod(list
.lists
[i
], MUIM_List_Select
, pos
, MUIV_List_Select_On
,
543 static void ListDeselect(void)
548 i
= XGET(list
.list_radios
, MUIA_Radio_Active
);
550 mode
= XGET(list
.select_cycle
, MUIA_Cycle_Active
);
553 pos
= XGET(list
.index1_string
, MUIA_String_Integer
);
557 DoMethod(list
.lists
[i
], MUIM_List_Select
, pos
, MUIV_List_Select_Off
,
561 static void ListToggle(void)
566 i
= XGET(list
.list_radios
, MUIA_Radio_Active
);
568 mode
= XGET(list
.select_cycle
, MUIA_Cycle_Active
);
571 pos
= XGET(list
.index1_string
, MUIA_String_Integer
);
575 DoMethod(list
.lists
[i
], MUIM_List_Select
, pos
,
576 MUIV_List_Select_Toggle
, NULL
);
579 static void ListRedraw(void)
584 i
= XGET(list
.list_radios
, MUIA_Radio_Active
);
586 mode
= XGET(list
.select_cycle
, MUIA_Cycle_Active
);
589 pos
= XGET(list
.index1_string
, MUIA_String_Integer
);
593 DoMethod(list
.lists
[i
], MUIM_List_Redraw
, pos
);
596 static void ListInsertSingle(void)
601 i
= XGET(list
.list_radios
, MUIA_Radio_Active
);
603 mode
= XGET(list
.insert_cycle
, MUIA_Cycle_Active
);
606 pos
= XGET(list
.index1_string
, MUIA_String_Integer
);
610 DoMethod(list
.lists
[i
], MUIM_List_InsertSingle
, "Tomato", pos
);
613 static void ListInsert(void)
618 i
= XGET(list
.list_radios
, MUIA_Radio_Active
);
620 mode
= XGET(list
.insert_cycle
, MUIA_Cycle_Active
);
623 pos
= XGET(list
.index1_string
, MUIA_String_Integer
);
627 DoMethod(list
.lists
[i
], MUIM_List_Insert
, fruits
, -1, pos
);
630 static void ListRemove(void)
632 LONG mode
, pos
, count
, j
, *selections
;
635 i
= XGET(list
.list_radios
, MUIA_Radio_Active
);
637 mode
= XGET(list
.remove_cycle
, MUIA_Cycle_Active
);
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)
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
);
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
);
669 /* We must remove the entries in reverse order; otherwise the
670 later indices will become invalid */
672 DoMethod(list
.lists
[i
], MUIM_List_Remove
, selections
[--count
]);
679 pos
= XGET(list
.index1_string
, MUIA_String_Integer
);
682 DoMethod(list
.lists
[i
], MUIM_List_Remove
, pos
);
686 static void ListClear(void)
690 i
= XGET(list
.list_radios
, MUIA_Radio_Active
);
692 DoMethod(list
.lists
[i
], MUIM_List_Clear
);
695 static void ListActivate(void)
700 i
= XGET(list
.list_radios
, MUIA_Radio_Active
);
702 mode
= XGET(list
.activate_cycle
, MUIA_Cycle_Active
);
705 pos
= XGET(list
.index1_string
, MUIA_String_Integer
);
709 SET(list
.lists
[i
], MUIA_List_Active
, pos
);
712 static void ListDeactivate(void)
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
))
728 static char buf
[100];
732 sprintf(buf
, "%ld", (long)*(strings
- 1));
734 strings
[1] = entry
->column1
;
735 strings
[2] = entry
->column2
;
739 strings
[0] = "Number";
740 strings
[1] = "Column 1";
741 strings
[2] = "Column 2";
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
);
753 if (!strlen(filename
))
756 if ((fh
= Open(filename
, MODE_NEWFILE
)))
758 Write(fh
, text
, strlen(text
));
763 #if defined(TEST_ICONLIST)
764 /* IconList callbacks */
765 static void volume_doubleclicked(void)
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
)
775 strcpy(buf
, ent
->label
);
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
)
787 set(drawer_iconlist
, MUIA_IconDrawerList_Drawer
,
788 ent
->ile_IconEntry
->ie_IconNode
.ln_Name
);
792 static IPTR
create_balance_column(void)
794 return (IPTR
) VGroup
,
795 Child
, RectangleObject
,
798 Child
, BalanceObject
,
800 Child
, RectangleObject
,
803 Child
, BalanceObject
,
805 Child
, RectangleObject
,
808 Child
, BalanceObject
,
810 Child
, RectangleObject
,
813 Child
, BalanceObject
,
815 Child
, RectangleObject
,
821 /* The custom class */
830 struct Library
*KeymapBase
;
834 __saveds __asm IPTR
dispatcher(register __a0
struct IClass
*cl
,
835 register __a2 Object
*obj
, register __a1 Msg msg
)
837 AROS_UFH3S(IPTR
, dispatcher
,
838 AROS_UFHA(Class
*, cl
, A0
),
839 AROS_UFHA(Object
*, obj
, A2
), AROS_UFHA(Msg
, msg
, A1
))
844 switch (msg
->MethodID
)
847 return MUIV_DragQuery_Accept
;
850 struct DropText_Data
*data
=
851 (struct DropText_Data
*)INST_DATA(cl
, obj
);
854 sprintf(buf
, "%ld times", (long)data
->times
);
855 set(obj
, MUIA_Text_Contents
, buf
);
859 return DoSuperMethodA(cl
, obj
, (Msg
) msg
);
864 static struct MUI_CustomClass
*CL_DropText
;
866 #define DropTextObject BOOPSIOBJMACRO_START(CL_DropText->mcc_Class)
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
))
878 void (*func
) (ULONG
*) = (void (*)(ULONG
*))(*funcptr
);
881 func((ULONG
*) funcptr
+ 1);
889 Object
*wnd
, *second_wnd
;
891 Object
*about_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];
906 static char *pages
[] =
907 {"General", "Text", "Boopsi", "Color", "Edit", "List", "Gauges",
909 #if defined(TEST_ICONLIST)
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
};
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
,
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
,
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",
979 MUIA_Listview_MultiSelect
,
980 MUIV_Listview_MultiSelect_None
,
983 list
.lists
[1] = ListviewObject
,
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",
992 MUIA_Listview_ScrollerPos
,
993 MUIV_Listview_ScrollerPos_Left
,
996 list
.lists
[2] = ListviewObject
,
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",
1005 MUIA_Listview_MultiSelect
,
1006 MUIV_Listview_MultiSelect_Shifted
,
1007 MUIA_Listview_ScrollerPos
,
1008 MUIV_Listview_ScrollerPos_Right
,
1011 list
.lists
[3] = ListviewObject
,
1015 MUIA_List_SourceArray
, fruits
,
1016 MUIA_List_Pool
, NULL
,
1017 MUIA_ShortHelp
, "No scroller\nDefault active entry",
1019 MUIA_Listview_MultiSelect
,
1020 MUIV_Listview_MultiSelect_Always
,
1021 MUIA_Listview_ScrollerPos
,
1022 MUIV_Listview_ScrollerPos_None
,
1025 list
.lists
[4] = ListviewObject
,
1029 MUIA_List_SourceArray
, fruits
,
1030 MUIA_ShortHelp
, "Default scroller\nDefault active entry",
1032 MUIA_Listview_Input
, FALSE
,
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
, "?",
1044 MUIA_Family_Child
, MenuitemObject
,
1045 MUIA_Menuitem_Title
, (SIPTR
)-1,
1047 MUIA_Family_Child
, quit_item
= MenuitemObject
,
1048 MUIA_Menuitem_Title
, "Quit",
1049 MUIA_Menuitem_Shortcut
, "Q",
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",
1065 GroupFrameT("A horizontal group"),
1067 GroupFrameT("A column group"),
1068 Child
, repeat_button
= TextObject
,
1071 MUIA_Background
, MUII_ButtonBack
,
1072 MUIA_Text_PreParse
, "\33c",
1073 MUIA_Text_Contents
, "Repeat",
1074 MUIA_InputMode
, MUIV_InputMode_RelVerify
,
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
,
1085 Child
, open_button
= TextObject
,
1088 MUIA_Background
, MUII_ButtonBack
,
1089 MUIA_Text_PreParse
, "\33c",
1090 MUIA_Text_Contents
, "Open Window",
1091 MUIA_InputMode
, MUIV_InputMode_RelVerify
,
1094 MUIA_ContextMenu
, context_menu
,
1097 MUIA_Background
, MUII_ButtonBack
,
1098 MUIA_Text_PreParse
, "\33c",
1099 MUIA_Text_Contents
, "Press Right",
1100 MUIA_InputMode
, MUIV_InputMode_RelVerify
,
1102 Child
, objects_button
= TextObject
,
1105 MUIA_Background
, MUII_ButtonBack
,
1106 MUIA_Text_PreParse
, "\33c",
1107 MUIA_Text_Contents
, "Add Objects",
1108 MUIA_InputMode
, MUIV_InputMode_RelVerify
,
1113 Child
, MUI_MakeObject(MUIO_Checkmark
,
1117 Child
, MUI_MakeObject(MUIO_Label
,
1124 Child
, group
= VGroup
,
1125 GroupFrameT("A vertical group"),
1126 Child
, DropTextObject
,
1127 MUIA_Dropable
, TRUE
,
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
,
1138 MUIA_Background
, MUII_MARKHALFSHINE
,
1140 MUIA_Text_PreParse
, "\33c",
1141 MUIA_Text_Contents
, "Pattern",
1143 Child
, MUI_NewObject(MUIC_Popimage
, TAG_DONE
),
1145 Child
, ScrollgroupObject
,
1146 GroupFrameT("A scroll group"),
1147 MUIA_Scrollgroup_Contents
, VGroupV
,
1152 "Line1\nLine2\nLine3\nLine4\n"
1153 "Line5\nLine6\nLine7\nLine8\n"
1155 "Line9\nLine10\nLine11\n",
1158 Child
, MUI_MakeObject(MUIO_Button
,
1160 Child
, MUI_MakeObject(MUIO_Button
,
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
,
1172 MUIA_Text_Contents
, "test",
1174 Child
, listview
= ListviewObject
,
1175 MUIA_Listview_List
, ListObject
,
1177 MUIA_List_DisplayHook
, &hook_display
,
1178 MUIA_List_Format
, ",,",
1179 MUIA_List_SourceArray
, entries
,
1180 MUIA_List_Title
, TRUE
,
1187 MUIA_Cycle_Entries
, pages
,
1189 Child
, ScrollbarObject
,
1190 MUIA_Group_Horiz
, TRUE
,
1191 MUIA_Prop_Visible
, 100,
1192 MUIA_Prop_Entries
, 300,
1193 MUIA_Prop_First
, 50,
1198 Child
, RegisterGroup(text_pages
),
1202 MUIA_Background
, "2:cfffffff,cfffffff,10000000",
1204 MUIA_Text_Contents
, "\33cHello World!\n"
1205 "This is a text object\n\33lLeft \33bbold\33n\n"
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",
1215 Child
, RectangleObject
,
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",
1222 Child
, StringObject
,
1225 MUIA_String_AdvanceOnCR
, TRUE
,
1233 Child
, VGroup
, GroupFrameT("Default Alignment"),
1234 Child
, string
.strings
[0] = StringObject
,
1237 (IPTR
)default_accept_chars
,
1239 (IPTR
)default_reject_chars
,
1240 MUIA_String_AdvanceOnCR
, TRUE
,
1241 MUIA_String_MaxLen
, 9,
1243 MUIA_String_AttachedList
, list
.lists
[0],
1246 Child
, VGroup
, GroupFrameT("Left Aligned"),
1247 Child
, string
.strings
[1] = StringObject
,
1250 (IPTR
)default_accept_chars
,
1252 (IPTR
)default_reject_chars
,
1254 MUIV_String_Format_Left
,
1255 MUIA_String_AdvanceOnCR
, TRUE
,
1256 MUIA_String_MaxLen
, 9,
1258 MUIA_String_Contents
,
1259 (IPTR
)default_accept_chars
,
1260 MUIA_String_BufferPos
, 3,
1261 MUIA_String_AttachedList
, list
.lists
[0],
1264 Child
, VGroup
, GroupFrameT("Right Aligned"),
1265 Child
, string
.strings
[2] = StringObject
,
1268 (IPTR
)default_accept_chars
,
1270 (IPTR
)default_reject_chars
,
1272 MUIV_String_Format_Right
,
1273 MUIA_String_AdvanceOnCR
, TRUE
,
1274 MUIA_String_MaxLen
, 9,
1276 MUIA_String_AttachedList
, list
.lists
[0],
1279 Child
, VGroup
, GroupFrameT("Centered"),
1280 Child
, string
.strings
[3] = StringObject
,
1283 (IPTR
)default_accept_chars
,
1285 (IPTR
)default_reject_chars
,
1287 MUIV_String_Format_Center
,
1288 MUIA_String_AdvanceOnCR
, TRUE
,
1289 MUIA_String_MaxLen
, 9,
1291 MUIA_String_Integer
, 123,
1292 MUIA_String_AttachedList
, list
.lists
[0],
1295 Child
, VGroup
, GroupFrameT("Secret"),
1296 Child
, string
.strings
[4] = StringObject
,
1299 (IPTR
)default_accept_chars
,
1301 (IPTR
)default_reject_chars
,
1303 MUIV_String_Format_Center
,
1304 MUIA_String_Secret
, TRUE
,
1305 MUIA_String_AdvanceOnCR
, TRUE
,
1306 MUIA_String_MaxLen
, 9,
1308 MUIA_String_AttachedList
, list
.lists
[0],
1311 Child
, HGroup
, GroupFrameT("Narrow"),
1313 Child
, string
.strings
[5] = StringObject
,
1316 (IPTR
)default_accept_chars
,
1318 (IPTR
)default_reject_chars
,
1320 MUIV_String_Format_Center
,
1321 MUIA_String_AdvanceOnCR
, TRUE
,
1323 MUIA_String_MaxLen
, 9,
1325 MUIA_String_AttachedList
, list
.lists
[0],
1331 Child
, VGroup
, GroupFrameT("Controls"),
1333 Child
, string
.accept_all_check
=
1334 MUI_MakeObject(MUIO_Checkmark
, NULL
),
1335 Child
, MUI_MakeObject(MUIO_Label
,
1336 "Accept all characters", 0),
1340 Child
, MUI_MakeObject(MUIO_Label
,
1341 "Acceptable characters:", 0),
1342 Child
, string
.accept_string
= StringObject
,
1344 MUIA_String_Contents
,
1345 (IPTR
)default_accept_chars
,
1347 Child
, MUI_MakeObject(MUIO_Label
,
1348 "Unacceptable characters:", 0),
1349 Child
, string
.reject_string
= StringObject
,
1352 Child
, MUI_MakeObject(MUIO_Label
,
1353 "Cursor position:", 0),
1354 Child
, string
.cursor_pos_slider
=
1356 MUIA_Group_Horiz
, TRUE
,
1357 MUIA_Numeric_Min
, 0,
1359 Child
, MUI_MakeObject(MUIO_Label
,
1360 "Display position:", 0),
1361 Child
, string
.display_pos_slider
=
1363 MUIA_Group_Horiz
, TRUE
,
1364 MUIA_Numeric_Min
, 0,
1366 Child
, MUI_MakeObject(MUIO_Label
,
1367 "Integer value:", 0),
1368 Child
, string
.integer_string
=
1371 MUIA_String_Accept
, (IPTR
)digits
,
1373 Child
, MUI_MakeObject(MUIO_Label
,
1375 Child
, string
.plaintext_string
=
1379 Child
, MUI_MakeObject(MUIO_Label
,
1380 "Maximum string length:", 0),
1381 Child
, string
.max_len_text
= TextObject
,
1383 MUIA_Text_Contents
, "Unknown",
1388 Child
, string
.cr_advance_check
=
1389 MUI_MakeObject(MUIO_Checkmark
,
1391 Child
, MUI_MakeObject(MUIO_Label
,
1392 "Advance on CR", 0),
1396 Child
, string
.attach_list_check
=
1397 MUI_MakeObject(MUIO_Checkmark
,
1399 Child
, MUI_MakeObject(MUIO_Label
,
1405 Child
, string
.standard_hook_check
=
1406 MUI_MakeObject(MUIO_Checkmark
,
1408 Child
, MUI_MakeObject(MUIO_Label
,
1409 "Use standard edit hook", 0),
1413 Child
, string
.custom_hook_check
=
1414 MUI_MakeObject(MUIO_Checkmark
,
1416 Child
, MUI_MakeObject(MUIO_Label
,
1417 "Use custom edit hook", 0),
1430 Child
, wheel
= BoopsiObject
, /* MUI/Boopsi tags mixed */
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
,
1445 GA_Top
, 0, /* MUI will automatically */
1446 GA_Width
, 0, /* fill in the correct values */
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
1458 Child
, r_slider
= SliderObject
,
1459 MUIA_Group_Horiz
, TRUE
,
1460 MUIA_Numeric_Min
, 0,
1461 MUIA_Numeric_Max
, 255,
1463 Child
, g_slider
= SliderObject
,
1464 MUIA_Group_Horiz
, TRUE
,
1465 MUIA_Numeric_Min
, 0,
1466 MUIA_Numeric_Max
, 255,
1468 Child
, b_slider
= SliderObject
,
1469 MUIA_Group_Horiz
, TRUE
,
1470 MUIA_Numeric_Min
, 0,
1471 MUIA_Numeric_Max
, 255,
1473 Child
, hue_gauge
= GaugeObject
,
1475 MUIA_Gauge_Horiz
, TRUE
,
1476 MUIA_Gauge_Max
, 255,
1477 MUIA_Gauge_Divide
, 1<<24,
1478 MUIA_Gauge_InfoText
, "Hue: %ld",
1483 Child
, RegisterGroup(color_pages
),
1484 Child
, VGroup
, GroupFrameT("Palette"),
1485 Child
, PaletteObject
,
1489 Child
, VGroup
, GroupFrameT("Colorfield"),
1492 Child
, colorfield
= ColorfieldObject
,
1493 MUIA_Colorfield_RGB
, default_color
,
1494 MUIA_Colorfield_Pen
, 253,
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],
1502 Child
, colorfield_reset_button
=
1503 MUI_MakeObject(MUIO_Button
,
1507 MUI_MakeObject(MUIO_Label
, "Pen:", 0),
1508 Child
, colorfield_pen
= StringObject
,
1513 Child
, VGroup
, GroupFrameT("Coloradjust"),
1514 Child
, coloradjust
= ColoradjustObject
,
1515 MUIA_Coloradjust_RGB
, default_color
,
1521 Child
, VGroup
, GroupFrameT("Pendisplay"),
1524 Child
, pendisplay2
= PendisplayObject
,
1525 MUIA_Pendisplay_RGBcolor
,
1532 MUIO_Label
, "Pen:", 0),
1534 Child
, pendisplay_pen
=
1535 StringObject
, StringFrame
,
1538 Child
, reference_check
=
1539 MUI_MakeObject(MUIO_Checkmark
,
1541 Child
, MUI_MakeObject(MUIO_Label
,
1546 MUIO_Label
, "Penspec:", 0),
1547 Child
, pendisplay_spec
= StringObject
,
1552 Child
, shine_button
=
1553 MUI_MakeObject(MUIO_Button
,
1555 Child
, shadow_button
=
1556 MUI_MakeObject(MUIO_Button
,
1558 Child
, yellow_button
=
1559 MUI_MakeObject(MUIO_Button
,
1563 Child
, VGroup
, GroupFrameT("Poppen"),
1564 Child
, poppen
= PoppenObject
,
1568 Child
, VGroup
, GroupFrameT("Penadjust"),
1569 Child
, PenadjustObject
,
1577 Child
, editor_text
= StringObject
,
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
),
1586 Child
, save_button
=
1587 MUI_MakeObject(MUIO_Button
, "Save"),
1591 Child
, RegisterGroup(list_pages
),
1593 Child
, ColGroup(LIST_COUNT
),
1594 Child
, VGroup
, GroupFrameT("No Multiselect"),
1595 Child
, list
.lists
[0],
1598 GroupFrameT("Default Multiselect"),
1599 Child
, list
.lists
[1],
1602 GroupFrameT("Shifted Multiselect"),
1603 Child
, list
.lists
[2],
1606 GroupFrameT("Unconditional Multiselect"),
1607 Child
, list
.lists
[3],
1610 GroupFrameT("Read Only"),
1611 Child
, list
.lists
[4],
1615 MUIA_Group_HorizSpacing
, 0,
1616 Child
, RectangleObject
,
1617 MUIA_HorizWeight
, 1,
1619 Child
, list
.list_radios
= RadioObject
,
1620 MUIA_Radio_Entries
, empty
,
1621 MUIA_Group_Horiz
, TRUE
,
1622 MUIA_HorizWeight
, 1000,
1624 Child
, RectangleObject
,
1625 MUIA_HorizWeight
, 1,
1628 Child
, RectangleObject
,
1630 MUIA_Rectangle_HBar
, TRUE
,
1631 MUIA_Rectangle_BarTitle
, "List Controls",
1634 Child
, MUI_MakeObject(MUIO_Label
,
1635 "Affected index 1:", 0),
1636 Child
, list
.index1_string
=
1639 MUIA_String_Accept
, (IPTR
)digits
,
1640 MUIA_String_Integer
, 0,
1643 Child
, list
.dragsortable_check
=
1644 MUI_MakeObject(MUIO_Checkmark
, NULL
),
1645 Child
, MUI_MakeObject(MUIO_Label
,
1646 "Drag sortable", 0),
1650 Child
, list
.showdropmarks_check
=
1651 MUI_MakeObject(MUIO_Checkmark
, NULL
),
1652 Child
, MUI_MakeObject(MUIO_Label
,
1653 "Show drop marks", 0),
1659 Child
, MUI_MakeObject(MUIO_Label
,
1660 "Affected index 2:", 0),
1661 Child
, list
.index2_string
=
1664 MUIA_String_Accept
, (IPTR
)digits
,
1665 MUIA_String_Integer
, 0,
1668 Child
, list
.quiet_check
=
1669 MUI_MakeObject(MUIO_Checkmark
,NULL
),
1670 Child
, MUI_MakeObject(MUIO_Label
,
1675 Child
, list
.autovisible_check
=
1676 MUI_MakeObject(MUIO_Checkmark
,NULL
),
1677 Child
, MUI_MakeObject(MUIO_Label
,
1681 Child
, list
.reset_button
=
1682 MUI_MakeObject(MUIO_Button
, "Reset"),
1685 Child
, MUI_MakeObject(MUIO_Label
,
1686 "Move/exchange mode 1:", 0),
1687 Child
, list
.move1_cycle
= CycleObject
,
1689 MUIA_Cycle_Entries
, list_move1_modes
,
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"),
1699 Child
, MUI_MakeObject(MUIO_Label
,
1700 "Move/exchange mode 2:", 0),
1701 Child
, list
.move2_cycle
= CycleObject
,
1703 MUIA_Cycle_Entries
, list_move2_modes
,
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
,
1711 Child
, list
.title_string
=
1716 Child
, MUI_MakeObject(MUIO_Label
,
1718 Child
, list
.jump_cycle
= CycleObject
,
1720 MUIA_Cycle_Entries
, list_jump_modes
,
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
,
1728 Child
, list
.entries_text
= TextObject
,
1730 MUIA_Text_Contents
, "N/A",
1733 Child
, MUI_MakeObject(MUIO_Label
,
1734 "Select/redraw mode:", 0),
1735 Child
, list
.select_cycle
= CycleObject
,
1737 MUIA_Cycle_Entries
, list_select_modes
,
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
,
1747 MUIA_Text_Contents
, "N/A",
1750 Child
, MUI_MakeObject(MUIO_Label
,
1752 Child
, list
.insert_cycle
= CycleObject
,
1754 MUIA_Cycle_Entries
, list_insert_modes
,
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
,
1764 MUIA_Text_Contents
, "N/A",
1767 Child
, MUI_MakeObject(MUIO_Label
,
1769 Child
, list
.remove_cycle
= CycleObject
,
1771 MUIA_Cycle_Entries
, list_remove_modes
,
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
,
1781 MUIA_Text_Contents
, "N/A",
1784 Child
, MUI_MakeObject(MUIO_Label
,
1785 "Activate mode:", 0),
1786 Child
, list
.activate_cycle
= CycleObject
,
1788 MUIA_Cycle_Entries
, list_activate_modes
,
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
,
1798 MUIA_Text_Contents
, "N/A",
1803 Child
, ColGroup(LIST_COUNT
/ 2),
1804 Child
, VGroup
, GroupFrameT("Standard Format"),
1805 Child
, list
.multi_lists
[0] = ListviewObject
,
1809 MUIA_List_DisplayHook
,
1811 MUIA_List_Format
, list_format
,
1812 MUIA_List_SourceArray
, entries
,
1813 MUIA_List_Title
, TRUE
,
1815 MUIA_Listview_MultiSelect
,
1816 MUIV_Listview_MultiSelect_None
,
1817 MUIA_Listview_DefClickColumn
, 1,
1821 Child
, VGroup
, GroupFrameT("Custom Format"),
1822 Child
, list
.multi_lists
[1] = ListviewObject
,
1826 MUIA_List_DisplayHook
,
1828 MUIA_List_Format
, list_format
,
1829 MUIA_List_SourceArray
, entries
,
1830 MUIA_List_Title
, TRUE
,
1832 MUIA_Listview_MultiSelect
,
1833 MUIV_Listview_MultiSelect_None
,
1838 Child
, RectangleObject
,
1840 MUIA_Rectangle_HBar
, TRUE
,
1841 MUIA_Rectangle_BarTitle
, "List Controls",
1844 Child
, MUI_MakeObject(MUIO_Label
, "Format:", 0),
1845 Child
, list
.format_string
= StringObject
,
1849 Child
, list
.showheadings_check
=
1850 MUI_MakeObject(MUIO_Checkmark
, NULL
),
1851 Child
, MUI_MakeObject(MUIO_Label
,
1852 "Show column headings", 0),
1855 Child
, MUI_MakeObject(MUIO_Label
,
1856 "Default clicked column:", 0),
1857 Child
, list
.def_column_string
= StringObject
,
1859 MUIA_String_Accept
, (IPTR
)digits
,
1860 MUIA_String_Integer
, -1,
1863 Child
, MUI_MakeObject(MUIO_Label
,
1864 "Clicked column:", 0),
1865 Child
, list
.column_string
= StringObject
,
1868 Child
, list
.column_text
= TextObject
,
1870 MUIA_Text_Contents
, "N/A",
1883 MUIA_Gauge_InfoText
, "%ld %%",
1884 MUIA_Gauge_Horiz
, TRUE
,
1885 MUIA_Gauge_Current
, 25,
1894 MUIA_Gauge_InfoText
, "%ld %%",
1895 MUIA_Gauge_Horiz
, TRUE
,
1896 MUIA_Gauge_Current
, 50,
1905 MUIA_Gauge_InfoText
, "%ld %%",
1906 MUIA_Gauge_Horiz
, TRUE
,
1907 MUIA_Gauge_Current
, 75,
1917 MUIA_Gauge_InfoText
, "%ld %%",
1918 MUIA_Gauge_Current
, 25,
1922 MUIA_Gauge_InfoText
, "%ld %%",
1923 MUIA_Gauge_Current
, 50,
1927 MUIA_Gauge_InfoText
, "%ld %%",
1928 MUIA_Gauge_Current
, 75,
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
,
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
,
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
,
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
,
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
,
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
,
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
,
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
,
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
,
2013 Child
, numerics
[RKNOB
] = KnobObject
,
2014 MUIA_Numeric_Reverse
, TRUE
,
2015 MUIA_Numeric_Min
, NUMERIC_MIN
,
2016 MUIA_Numeric_Max
, NUMERIC_MAX
,
2021 Child
, MUI_MakeObject(MUIO_Label
,
2022 "Minimum Value:", 0),
2023 Child
, min_string
= (Object
*)StringObject
,
2025 MUIA_String_Accept
, (IPTR
)digits
,
2026 MUIA_String_Integer
, NUMERIC_MIN
,
2029 Child
, MUI_MakeObject(MUIO_Label
,
2030 "Maximum Value:", 0),
2031 Child
, max_string
= (Object
*)StringObject
,
2033 MUIA_String_Accept
, (IPTR
)digits
,
2034 MUIA_String_Integer
, NUMERIC_MAX
,
2037 Child
, slider_button
= TextObject
,
2039 MUIA_InputMode
, MUIV_InputMode_RelVerify
,
2041 MUIA_Background
, MUII_ButtonBack
,
2042 MUIA_Text_PreParse
, "\33c",
2044 "Change Slider Orientations",
2046 Child
, MUI_MakeObject(MUIO_Label
, "", 0),
2055 MUIA_Radio_Entries
, radio_entries1
,
2057 Child
, country_radio
[0] = RadioObject
,
2059 MUIA_Radio_Entries
, radio_entries2
,
2060 MUIA_Radio_Active
, 1,
2066 MUIA_Radio_Entries
, radio_entries1
,
2068 Child
, country_radio
[1] = RadioObject
,
2070 MUIA_Radio_Entries
, radio_entries2
,
2071 MUIA_Radio_Active
, 1,
2076 #if defined(TEST_ICONLIST)
2079 Child
, volume_iconlist
=
2080 MUI_NewObject(MUIC_IconVolumeList
, GroupFrame
,
2082 Child
, drawer_iconlist
=
2083 MUI_NewObject(MUIC_IconDrawerList
, GroupFrame
,
2084 MUIA_IconDrawerList_Drawer
, "SYS:",
2091 Child
, create_balance_column(),
2092 Child
, BalanceObject
,
2095 Child
, create_balance_column(),
2096 Child
, BalanceObject
,
2099 Child
, create_balance_column(),
2100 Child
, BalanceObject
,
2103 Child
, create_balance_column(),
2104 Child
, BalanceObject
,
2107 Child
, create_balance_column(),
2114 Child
, about_button
= TextObject
,
2116 MUIA_InputMode
, MUIV_InputMode_RelVerify
,
2118 MUIA_Background
, MUII_ButtonBack
,
2119 MUIA_Text_PreParse
, "\33c",
2120 MUIA_Text_Contents
, "About",
2122 Child
, quit_button
= TextObject
,
2124 MUIA_InputMode
, MUIV_InputMode_RelVerify
,
2126 MUIA_Background
, MUII_ButtonBack
,
2127 MUIA_ControlChar
, 'q',
2128 MUIA_Text_HiChar
, 'q',
2129 MUIA_Text_PreParse
, "\33c",
2130 MUIA_Text_Contents
, "Quit",
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
,
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
++)
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
);
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
,
2223 DoMethod(string
.strings
[0], MUIM_Notify
,
2224 MUIA_String_BufferPos
, MUIV_EveryTime
,
2225 string
.strings
[i
], 3, MUIM_Set
, MUIA_String_BufferPos
,
2227 DoMethod(string
.strings
[0], MUIM_Notify
,
2228 MUIA_String_DisplayPos
, MUIV_EveryTime
,
2229 string
.strings
[i
], 3, MUIM_Set
, MUIA_String_DisplayPos
,
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
,
2277 /* Notifications for color objects */
2278 DoMethod(colorfield
, MUIM_Notify
, MUIA_Colorfield_Red
,
2279 MUIV_EveryTime
, colorfield2
, 3, MUIM_Set
, MUIA_Colorfield_Red
,
2281 DoMethod(colorfield
, MUIM_Notify
, MUIA_Colorfield_Green
,
2282 MUIV_EveryTime
, colorfield2
, 3, MUIM_Set
, MUIA_Colorfield_Green
,
2284 DoMethod(colorfield
, MUIM_Notify
, MUIA_Colorfield_Blue
,
2285 MUIV_EveryTime
, colorfield2
, 3, MUIM_Set
, MUIA_Colorfield_Blue
,
2287 DoMethod(coloradjust
, MUIM_Notify
, MUIA_Coloradjust_Red
,
2288 MUIV_EveryTime
, colorfield
, 3, MUIM_Set
, MUIA_Colorfield_Red
,
2290 DoMethod(coloradjust
, MUIM_Notify
, MUIA_Coloradjust_Green
,
2291 MUIV_EveryTime
, colorfield
, 3, MUIM_Set
, MUIA_Colorfield_Green
,
2293 DoMethod(coloradjust
, MUIM_Notify
, MUIA_Coloradjust_Blue
,
2294 MUIV_EveryTime
, colorfield
, 3, MUIM_Set
, MUIA_Colorfield_Blue
,
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
,
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
,
2321 DoMethod(pendisplay_spec
, MUIM_Notify
, MUIA_String_Contents
,
2322 MUIV_EveryTime
, pendisplay
, 3, MUIM_Set
, MUIA_Pendisplay_Spec
,
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
);
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
,
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
,
2349 DoMethod(list
.lists
[i
], MUIM_Notify
, MUIA_List_First
,
2350 MUIV_EveryTime
, app
, 3, MUIM_CallHook
, &hook_standard
,
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
,
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
,
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
,
2406 DoMethod(list
.list_radios
, MUIM_Notify
, MUIA_Radio_Active
,
2407 MUIV_EveryTime
, app
, 3, MUIM_CallHook
, &hook_standard
,
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
,
2436 DoMethod(list
.column_string
, MUIM_Notify
, MUIA_String_Contents
,
2437 MUIV_EveryTime
, list
.column_text
, 3, MUIM_Set
, MUIA_Text_Contents
,
2440 DoMethod(listview
, MUIM_Notify
, MUIA_Listview_DoubleClick
, TRUE
,
2441 popobject
, 2, MUIM_Popstring_Close
, TRUE
);
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
,
2449 DoMethod(max_string
, MUIM_Notify
, MUIA_String_Integer
,
2450 MUIV_EveryTime
, numerics
[i
], 3, MUIM_Set
, MUIA_Numeric_Max
,
2453 DoMethod(slider_button
, MUIM_Notify
, MUIA_Pressed
, FALSE
,
2454 numerics
[HRSLIDER
], 3, MUIM_Set
, MUIA_Slider_Horiz
, FALSE
);
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)
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
);
2474 /* automatic tests */
2475 get(list
.lists
[0], MUIA_List_Visible
, &value
);
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
));
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
)
2501 sigs
= Wait(sigs
| SIGBREAKF_CTRL_C
| SIGBREAKF_CTRL_D
);
2502 if (sigs
& SIGBREAKF_CTRL_C
)
2504 if (sigs
& SIGBREAKF_CTRL_D
)
2509 MUI_DisposeObject(app
);
2512 MUI_DisposeObject(context_menu
);
2513 CloseLibrary(ColorWheelBase
);
2514 MUI_DeleteCustomClass(CL_DropText
);
2516 CloseLibrary(MUIMasterBase
);