2 Copyright © 2004, 2009, The AROS Development Team. All rights reserved.
6 #include <exec/types.h>
12 #include <intuition/gadgetclass.h>
13 #include <intuition/icclass.h>
14 #include <proto/exec.h>
15 #include <proto/intuition.h>
16 #include <proto/muimaster.h>
17 #include <clib/alib_protos.h>
19 #include <libraries/mui.h>
24 Object
*application
, *window
, *b1
, *b2
, *b3
;
26 application
= ApplicationObject
,
27 SubWindow
, window
= WindowObject
,
28 MUIA_Window_Title
, (IPTR
) "Hide & Show",
29 MUIA_Window_Activate
, TRUE
,
31 WindowContents
, (IPTR
) VGroup
,
33 Child
, (IPTR
) SimpleButton("Visible all the time"),
34 Child
, (IPTR
) (b1
= ImageButton("Click Hide or Show", "THEME:Images/Gadgets/Test")),
35 Child
, (IPTR
) SimpleButton("Visible all the time too"),
38 Child
, (IPTR
) (b2
= SimpleButton("Hide")),
39 Child
, (IPTR
) (b3
= SimpleButton("Show")),
51 window
, MUIM_Notify
, MUIA_Window_CloseRequest
, TRUE
,
52 (IPTR
) application
, 2, MUIM_Application_ReturnID
,
53 MUIV_Application_ReturnID_Quit
58 b2
, MUIM_Notify
, MUIA_Pressed
, FALSE
,
59 (IPTR
) b1
, 3, MUIM_Set
, MUIA_ShowMe
, FALSE
64 b3
, MUIM_Notify
, MUIA_Pressed
, FALSE
,
65 (IPTR
) b1
, 3, MUIM_Set
, MUIA_ShowMe
, TRUE
68 set(window
,MUIA_Window_Open
,TRUE
);
74 application
, MUIM_Application_NewInput
, (IPTR
) &sigs
75 ) != MUIV_Application_ReturnID_Quit
80 sigs
= Wait(sigs
| SIGBREAKF_CTRL_C
| SIGBREAKF_CTRL_D
);
81 if (sigs
& SIGBREAKF_CTRL_C
) break;
82 if (sigs
& SIGBREAKF_CTRL_D
) break;
86 MUI_DisposeObject(application
);