2 Copyright © 2010, The AROS Development Team.
8 #include <dos/dosextens.h>
9 #include <libraries/mui.h>
10 #include <proto/exec.h>
11 #include <proto/intuition.h>
12 #include <proto/muimaster.h>
15 struct Library
*MUIMasterBase
;
19 int __nocommandline
= 1;
21 Object
*MakeFontsGroup(SIPTR FontAttr
, STRPTR title
)
26 Child
, TextObject
, MUIA_Text_Contents
, "No font specification", End
,
27 Child
, TextObject
, MUIA_Text_Contents
, "Normal font specification", MUIA_Font
, MUIV_Font_Normal
, End
,
28 Child
, TextObject
, MUIA_Text_Contents
, "Tiny font specification", MUIA_Font
, MUIV_Font_Tiny
, End
,
29 Child
, TextObject
, MUIA_Text_Contents
, "Fixed font specification", MUIA_Font
, MUIV_Font_Fixed
, End
,
30 Child
, TextObject
, MUIA_Text_Contents
, "Title font specification", MUIA_Font
, MUIV_Font_Title
, End
,
31 Child
, TextObject
, MUIA_Text_Contents
, "Big font specification", MUIA_Font
, MUIV_Font_Big
, End
,
32 Child
, TextObject
, MUIA_Text_Contents
, "Button font specification", MUIA_Font
, MUIV_Font_Button
, End
,
33 Child
, TextObject
, MUIA_Text_Contents
, "Knob font specification", MUIA_Font
, MUIV_Font_Knob
, End
,
41 MUIMasterBase
= (struct Library
*)OpenLibrary("muimaster.library",0);
43 app
= ApplicationObject
,
44 SubWindow
, wnd
= WindowObject
,
45 MUIA_Window_Title
, "Font specification test",
46 MUIA_Window_Activate
, TRUE
,
47 WindowContents
, HGroup
,
48 Child
, MakeFontsGroup(MUIV_Font_Inherit
, "Group with default font"),
49 Child
, MakeFontsGroup(MUIV_Font_Fixed
, "Group with fixed font"),
60 wnd
, MUIM_Notify
, MUIA_Window_CloseRequest
, TRUE
, (IPTR
) app
,
61 2, MUIM_Application_ReturnID
, MUIV_Application_ReturnID_Quit
64 set(wnd
,MUIA_Window_Open
,TRUE
);
66 while (DoMethod(app
, MUIM_Application_NewInput
, (IPTR
) &sigs
) != MUIV_Application_ReturnID_Quit
)
70 sigs
= Wait(sigs
| SIGBREAKF_CTRL_C
);
71 if (sigs
& SIGBREAKF_CTRL_C
) break;
75 MUI_DisposeObject(app
);
78 CloseLibrary(MUIMasterBase
);