2 Copyright © 2003-2011, The AROS Development Team.
8 /* "muizunesupport.h" contains misc includes and
9 init stuff which is not important at the moment. */
11 #include "muizunesupport.h"
19 Object
*BT_1
, *BT_2
, *BT_3
;
22 /****************************************************************
23 Allocate resources for gui
24 *****************************************************************/
28 app
= ApplicationObject
,
29 MUIA_Application_Title
, (IPTR
) "HVGroup",
30 MUIA_Application_Version
, (IPTR
) "$VER: HVGroup 0.1 (14.01.03)",
31 MUIA_Application_Copyright
, (IPTR
) "© 2003-2011, The AROS Development Team",
32 MUIA_Application_Author
, (IPTR
) "The AROS Development Team",
33 MUIA_Application_Description
, (IPTR
) "Layout with HGroup + VGroup",
34 MUIA_Application_Base
, (IPTR
) "HVGroup",
36 SubWindow
, WD_Main
= WindowObject
,
37 MUIA_Window_Title
, (IPTR
) "Layout with HGroup + VGroup",
40 Start HGroup of window here. All other GUI objects are childs
44 WindowContents
, HGroup
,
47 Layout: HGroup + VGroup for more complex layout.
49 One horizontal group with two vertical groups.
57 To display one button on the left and three buttons
66 /* One button on the left */
69 Child
, BT_One
= SimpleButton("One"),
73 /* Three buttons on the right */
76 Child
, BT_1
= SimpleButton("Button 1"),
77 Child
, BT_2
= SimpleButton("Button 2"),
78 Child
, BT_3
= SimpleButton("Button 3"),
83 End
, /* WindowObject */
85 End
; /* ApplicationObject */
89 /* Quit application if the windowclosegadget or the esc key is pressed. */
91 DoMethod(WD_Main
, MUIM_Notify
, MUIA_Window_CloseRequest
, TRUE
,
93 MUIM_Application_ReturnID
, MUIV_Application_ReturnID_Quit
);
99 } /* init_gui(void) */
102 /****************************************************************
103 Deallocates all gui resources
104 *****************************************************************/
106 void deinit_gui(void)
108 if(app
){MUI_DisposeObject(app
);}
109 } /* deinit_gui(void) */
113 /****************************************************************
115 *****************************************************************/
121 while((LONG
) DoMethod(app
, MUIM_Application_NewInput
, &sigs
) != MUIV_Application_ReturnID_Quit
)
125 sigs
= Wait(sigs
| SIGBREAKF_CTRL_C
| SIGBREAKF_CTRL_D
);
126 if(sigs
& SIGBREAKF_CTRL_C
){break;}
127 if(sigs
& SIGBREAKF_CTRL_D
){break;}
133 /****************************************************************
135 *****************************************************************/
137 int main(int argc
, char *argv
[])
143 set(WD_Main
, MUIA_Window_Open
, TRUE
);
145 if(xget(WD_Main
, MUIA_Window_Open
))
150 set(WD_Main
, MUIA_Window_Open
, FALSE
);
159 } /* main(int argc, char *argv[]) */