home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magazyn Amiga Shareware Floppies
/
ma21.dms
/
ma21.adf
/
MUIBuilder
/
examplessource
/
c
/
Small.c
< prev
next >
Wrap
C/C++ Source or Header
|
1980-03-18
|
2KB
|
78 lines
#include "code.h"
int main()
{
ULONG signal;
BOOL running = TRUE;
APTR app, WI_smallexample, LV_label_0, LV_label_1, BT_ok, BT_cancel;
init();
app = ApplicationObject,
MUIA_Application_Author, "Eric Totel",
MUIA_Application_Base, "SMALL",
MUIA_Application_Title, "Small Example",
MUIA_Application_Version, "1.0",
MUIA_Application_Copyright, "(c) 1993 Eric Totel",
MUIA_Application_Description, "Here is a small example of MUI-Builder",
MUIA_HelpFile, "/ExamplesDoc/small.guide",
SubWindow, WI_smallexample = WindowObject,
MUIA_Window_Title, "Small example",
MUIA_HelpNode, "WI_smallexample",
WindowContents, GroupObject,
Child, GroupObject,
GroupFrameT( "two lists" ),
MUIA_Group_Horiz, 1,
Child, LV_label_0 = ListviewObject,
MUIA_Listview_List, DirlistObject,
MUIA_Dirlist_Directory, "progdir:",
MUIA_Dirlist_DrawersOnly, 0,
MUIA_Dirlist_FilesOnly, 0,
MUIA_Dirlist_FilterDrawers, 0,
MUIA_Dirlist_MultiSelDirs, 0,
MUIA_Dirlist_RejectIcons, 0,
MUIA_Dirlist_SortDirs, MUIV_Dirlist_SortDirs_First,
MUIA_Dirlist_SortHighLow, 0,
MUIA_Dirlist_SortType, 0,
End,
End,
Child, LV_label_1 = ListviewObject,
MUIA_Listview_List, VolumelistObject,
InputListFrame,
End,
End,
End,
Child, GroupObject,
MUIA_Group_Horiz, 1,
MUIA_Group_SameWidth, 1,
Child, BT_ok = KeyButton( "OK",'o' ),
Child, BT_cancel = KeyButton( "Cancel",'c' ),
End,
End,
End,
End;
/* Notify : clicking buttons => OUT */
DoMethod( BT_ok, MUIM_Notify, MUIA_Pressed, FALSE, app, 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit);
DoMethod( BT_cancel, MUIM_Notify, MUIA_Pressed, FALSE, app, 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit);
/* Notify : close gadget => end of application */
DoMethod( WI_smallexample, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, app, 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit );
/* Open the window */
set ( WI_smallexample, MUIA_Window_Open, TRUE );
while (running)
{
switch (DoMethod(app,MUIM_Application_Input,&signal))
{
case MUIV_Application_ReturnID_Quit:
running = FALSE;
break;
}
if (signal) Wait(signal);
}
MUI_DisposeObject(app);
}