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