home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 3
/
goldfish_volume_3.bin
/
files
/
fish
/
disks
/
d1031.lha
/
Programs
/
Textfield
/
MUITest
/
muitest.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-11-12
|
2KB
|
87 lines
/*
* muitest.c was generated with MUIBuilder, except for the part
* that makes the Textfield gadget, which I just modified from
* from a list object.
*
* When using the Textfield gadgetin MUI, I suggest you use the
* frames and labels that it provides instead of the features
* builtin to the Textfield gadget. This way, MUI has a better
* idea how to correctly layout the graphics elements.
*/
#include <libraries/mui.h>
#include <proto/muimaster.h>
#include <clib/exec_protos.h>
#include <exec/memory.h>
#include <intuition/icclass.h>
#include <gadgets/textfield.h>
#include <proto/textfield.h>
#ifndef MAKE_ID
#define MAKE_ID(a,b,c,d) ((ULONG) (a)<<24 | (ULONG) (b)<<16 | (ULONG) (c)<<8 | (ULONG) (d))
#endif
#ifdef _DCC
#define __inline
#endif
#define MUIA_Boopsi_Smart 0x8042b8d7 /* V9 i.. BOOL */
/* ExTended KeyButton ( or Eric Totel KeyButton :-) ) */
/* to use with localization features */
static APTR __inline ETKeyButton(char *text)
{
return (KeyButton(&text[3], text[1]));
}
#include "muitest.h"
struct ObjApp * CreateApp( void )
{
struct ObjApp * Object;
if (!(Object = AllocVec( sizeof( struct ObjApp ), MEMF_PUBLIC|MEMF_CLEAR )))
return( NULL );
Object->App = ApplicationObject,
MUIA_Application_Author, "NONE",
MUIA_Application_Base, "NONE",
MUIA_Application_Title, "NONE",
MUIA_Application_Version, "$VER: NONE XX.XX (XX.XX.XX)",
MUIA_Application_Copyright, "NOBODY",
MUIA_Application_Description, "NONE",
SubWindow, Object->window = WindowObject,
MUIA_Window_Title, "Test MUI - BOOPSI",
MUIA_Window_ID, MAKE_ID( '0','W','I','N' ),
WindowContents, GroupObject,
MUIA_Group_Horiz, TRUE,
Child, Object->text = BoopsiObject, /* MUI and Boopsi tags mixed */
InputListFrame,
MUIA_Boopsi_Class, TextFieldClass,
MUIA_Boopsi_Smart, TRUE,
MUIA_Boopsi_MinWidth, 20, /* boopsi objects don't know */
MUIA_Boopsi_MinHeight, 20, /* their sizes, so we help */
ICA_TARGET, ICTARGET_IDCMP, /* needed for notification */
TEXTFIELD_Text, (ULONG)"Hello?",
End,
End,
End,
End;
if (!(Object->App))
{
FreeVec(Object);
Object = NULL;
}
return( Object );
}
void DisposeApp( struct ObjApp * Object )
{
MUI_DisposeObject(Object->App);
FreeVec( Object );
}