6 #include <clib/alib_protos.h>
8 #include <exec/types.h>
10 #include <libraries/mui.h>
12 #include <proto/dos.h>
13 #include <proto/exec.h>
14 #include <proto/intuition.h>
15 #include <proto/muimaster.h>
16 #include <proto/utility.h>
18 static const char str
[] = "\33bTHERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. "
19 "EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDER AND/OR OTHER PARTIES "
20 "PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR "
21 "IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY "
22 "AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE "
23 "OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE "
24 "COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n"
26 "\33bIN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING "
27 "WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY REDISTRIBUTE THE "
28 "PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY "
29 "GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE "
30 "USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS "
31 "OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR "
32 "THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER "
33 "PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE "
34 "POSSIBILITY OF SUCH DAMAGES.";
36 #define List(ftxt) ListviewObject, MUIA_Weight, 50, MUIA_Listview_Input, FALSE, MUIA_Listview_List,\
37 FloattextObject, MUIA_Frame, MUIV_Frame_ReadList, MUIA_Background, MUII_ReadListBack, MUIA_Floattext_Text, ftxt, MUIA_Floattext_TabSize, 4, MUIA_Floattext_Justify, TRUE, End, End
39 int main(int argc
, char *argv
[])
41 Object
*win
, *app
, *bt
, *lv
;
45 app
= ApplicationObject
,
46 MUIA_Application_Title
, "Foo",
47 MUIA_Application_Base
, "xxxxx",
49 SubWindow
, win
= WindowObject
,
50 MUIA_Window_Title
, "Bar",
52 WindowContents
, VGroup
,
56 Child
, lv
= ListviewObject
,
59 ListObject
, InputListFrame
, End
,
62 Child
, bt
= SimpleButton("Click me!"),
68 DoMethod(win
, MUIM_Notify
, MUIA_Window_CloseRequest
, TRUE
, app
, 2, MUIM_Application_ReturnID
, MUIV_Application_ReturnID_Quit
);
69 DoMethod(bt
, MUIM_Notify
, MUIA_Pressed
, FALSE
, app
, 2, MUIM_Application_ReturnID
, 1);
71 set(win
, MUIA_Window_Open
, TRUE
);
73 while((id
= DoMethod(app
,MUIM_Application_NewInput
,&sigs
)) != MUIV_Application_ReturnID_Quit
) {
77 static const char *foo
= "Hello World";
79 DoMethod(lv
, MUIM_List_InsertSingle
, foo
, MUIV_List_Insert_Active
);
83 sigs
= Wait(sigs
| SIGBREAKF_CTRL_C
);
84 if (sigs
& SIGBREAKF_CTRL_C
) break;
88 MUI_DisposeObject(app
);