2 Copyright © 2002, The AROS Development Team.
8 #include <exec/types.h>
14 #include <intuition/gadgetclass.h>
15 #include <intuition/icclass.h>
16 #include <proto/exec.h>
17 #include <proto/intuition.h>
18 #include <proto/muimaster.h>
19 #include <clib/alib_protos.h>
21 /* the following should go in a single include file which then only
22 ** constits of the public constants and members. Actually this is easiey
25 #include <libraries/mui.h>
27 struct Library
*MUIMasterBase
;
33 Object
*wnd
, *str
, *dirlist
, *page
;
35 MUIMasterBase
= (struct Library
*)OpenLibrary("muimaster.library",0);
37 app
= ApplicationObject
,
38 SubWindow
, wnd
= WindowObject
,
39 MUIA_Window_Title
, "dirlist",
40 MUIA_Window_Activate
, TRUE
,
42 WindowContents
, VGroup
,
43 MUIA_Background
, MUII_GroupBack
,
44 Child
, ListviewObject
,
45 MUIA_Listview_List
, dirlist
= DirlistObject
,
50 Child
, str
= StringObject
,
52 MUIA_String_Contents
, (IPTR
)"SYS:",
54 Child
, page
= PageGroup
,
56 MUIA_FixWidthTxt
, (IPTR
)"AA",
57 Child
, ColorfieldObject
,
58 MUIA_Colorfield_Red
, 0xFFFFFFFF,
59 MUIA_Colorfield_Green
, 0,
60 MUIA_Colorfield_Blue
, 0,
62 Child
, ColorfieldObject
,
63 MUIA_Colorfield_Red
, 0xFFFFFFFF,
64 MUIA_Colorfield_Green
, 0xFFFFFFFF,
65 MUIA_Colorfield_Blue
, 0,
67 Child
, ColorfieldObject
,
68 MUIA_Colorfield_Red
, 0,
69 MUIA_Colorfield_Green
, 0x66666666,
70 MUIA_Colorfield_Blue
, 0,
84 wnd
, MUIM_Notify
, MUIA_Window_CloseRequest
, TRUE
, (IPTR
) app
,
85 2, MUIM_Application_ReturnID
, MUIV_Application_ReturnID_Quit
88 DoMethod(str
, MUIM_Notify
, MUIA_String_Acknowledge
, MUIV_EveryTime
,
89 (IPTR
)dirlist
, 3, MUIM_Set
, MUIA_Dirlist_Directory
, MUIV_TriggerValue
);
91 DoMethod(dirlist
, MUIM_Notify
, MUIA_Dirlist_Status
, MUIV_EveryTime
,
92 (IPTR
)page
, 3, MUIM_Set
, MUIA_Group_ActivePage
, MUIV_TriggerValue
);
94 set(dirlist
, MUIA_Dirlist_Directory
, "SYS:");
96 set(wnd
,MUIA_Window_Open
,TRUE
);
98 while (DoMethod(app
, MUIM_Application_NewInput
, (IPTR
) &sigs
) != MUIV_Application_ReturnID_Quit
)
102 sigs
= Wait(sigs
| SIGBREAKF_CTRL_C
| SIGBREAKF_CTRL_D
);
103 if (sigs
& SIGBREAKF_CTRL_C
) break;
104 if (sigs
& SIGBREAKF_CTRL_D
) break;
108 MUI_DisposeObject(app
);
111 CloseLibrary(MUIMasterBase
);