#define THE_SCREEN_WIDTH 960
#define THE_SCREEN_HEIGHT 600
#define THE_SCREEN_DEPTH 7

#include "suit.h"


/******************** DANGER!!! *****************/
/*                                              */
/*   This code is machine generated by SUIT.    */
/*    Edit this file with extreme caution!      */
/*                                              */
/******************** DANGER!!! *****************/


extern void SUIT_interiorInitFromCode(char *programName, SUIT_functionPointer suiRoutine, int width, int height, int depth);

extern SUIT_type *si_getType(char *typeName);

extern void si_addChildToObject(SUIT_object, SUIT_object, boolean);

static void MAKE(char *name, char *class, char *parent) 
{ 
    SUIT_object o = SUIT_name(name); 
    SUIT_object p = SUIT_name(parent); 
    if ( p != NULL ) 
        { 
        if ( o == NULL ) 
            o = SUIT_createObjectByClass(name, class); 
        si_addChildToObject(SUIT_name(parent), o, FALSE); 
        } 
} 
 
static void SET(char *objOrClass, char *propertyName, char *propertyType, boolean atClass, boolean locked, char *stringValue) 
{ 
    SUIT_type	*type; 
    boolean	errorStatus; 
    Pointer	retval; 
    SUIT_level level = OBJECT; 
    SUIT_object o; 
     
    if ( atClass ) 
        level = CLASS; 
    if ( level == CLASS ) 
        o = SUIT_dummyObjectInClass(objOrClass); 
    else 
        o = SUIT_name(objOrClass); 
    type = si_getType(propertyType); 
    retval = type->convertFromAscii(stringValue, &errorStatus); 
    if ( errorStatus == FALSE) 
	SUIT_setProperty(o, propertyName, propertyType, retval, level); 

    if ( locked ) 
        SUIT_lockProperty(o, propertyName, level); 
}
static void INIT_suiRoutine(void)

{

/* this line is for parsing simplicity @ */
MAKE("Fred","button","ROOT");
MAKE("explain","text box","ROOT");
MAKE("Hotkey for Fred is META-\"A\"","label","ROOT");
MAKE("Done","button","ROOT");
MAKE("SUIT trapper function Demo","label","ROOT");
SET("arrow button","border raised","boolean",1,0,"no");
SET("arrow button","direction","SUIT_enum",1,0,"\"up\" of {\"up\" \"down\" \"left\" \"right\"}");
SET("arrow button","draw filled","boolean",1,0,"no");
SET("arrow button","has background","boolean",1,0,"no");
SET("arrow button","intermediate feedback","boolean",1,0,"no");
SET("arrow button","shadow thickness","int",1,0,"3");
SET("billboard","border raised","boolean",1,0,"no");
SET("borderless bulletin board","has border","boolean",1,0,"no");
SET("bounded value","arrowhead angle","int",1,0,"10");
SET("bounded value","arrowhead length","double",1,0,"0.200000");
SET("bounded value","button background color","GP_color",1,0,"black, black");
SET("bounded value","button foreground color","GP_color",1,0,"grey, white");
SET("bounded value","current value","double",1,0,"0.000000");
SET("bounded value","granularity","double",1,0,"0.000000");
SET("bounded value","has arrow","boolean",1,0,"yes");
SET("bounded value","has tick marks","boolean",1,0,"yes");
SET("bounded value","increase clockwise","boolean",1,0,"yes");
SET("bounded value","minimum value","double",1,0,"0.000000");
SET("bounded value","start angle","double",1,0,"0.000000");
SET("button","disabled color","GP_color",1,0,"grey, black");
SET("button","justification","SUIT_enum",1,0,"\"center\" of {\"left\" \"center\" \"right\"}");
SET("button","shrink to fit","boolean",1,0,"no");
SET("dialog box","border type","SUIT_enum",1,0,"\"fancy motif\" of {\"simple\" \"motif\" \"fancy motif\"}");
SET("dialog box","border width","int",1,0,"8");
SET("dialog box","cache using canvas","boolean",1,0,"yes");
SET("elevator","border raised","boolean",1,0,"no");
SET("elevator","has background","boolean",1,0,"no");
SET("label","font","GP_font",1,0,"times,,12.000000");
SET("label","has border","boolean",1,0,"no");
SET("label","justification","SUIT_enum",1,0,"\"center\" of {\"left\" \"center\" \"right\"}");
SET("label","shrink to fit","boolean",1,0,"yes");
SET("on/off switch","disabled color","GP_color",1,0,"grey, black");
SET("on/off switch","shrink to fit","boolean",1,0,"yes");
SET("place mat","border raised","boolean",1,0,"no");
SET("property list","border raised","boolean",1,0,"no");
SET("property list","text spacing","double",1,0,"1.500000");
SET("radio buttons","current value","SUIT_enum",1,0,"\"default value\" of {\"default value\"}");
SET("scrollable property list","has background","boolean",1,0,"no");
SET("scrollable property list","has border","boolean",1,0,"no");
SET("scrollable property list","lock color","GP_color",1,0,"black, white");
SET("stacker","shrink to fit","boolean",1,0,"yes");
SET("ROOT","animated","boolean",0,0,"no");
SET("ROOT","background color","GP_color",0,0,"grey, white");
SET("ROOT","border color","GP_color",0,0,"grey, black");
SET("ROOT","border raised","boolean",0,0,"yes");
SET("ROOT","border type","SUIT_enum",0,0,"\"motif\" of {\"simple\" \"motif\" \"fancy motif\"}");
SET("ROOT","border width","int",0,0,"2");
SET("ROOT","clip to viewport","boolean",0,0,"yes");
SET("ROOT","default object height","int",0,0,"80");
SET("ROOT","default object width","int",0,0,"80");
SET("ROOT","draw border on inside","boolean",0,0,"no");
SET("ROOT","font","GP_font",0,0,"times,,12.000000");
SET("ROOT","foreground color","GP_color",0,0,"black, black");
SET("ROOT","has background","boolean",0,0,"yes");
SET("ROOT","has border","boolean",0,0,"yes");
SET("ROOT","margin","int",0,0,"5");
SET("ROOT","show temporary properties","boolean",0,0,"no");
SET("ROOT","shrink to fit","boolean",0,0,"no");
SET("ROOT","springiness","SUIT_springiness",0,0,"63");
SET("ROOT","SUIT system font","GP_font",0,0,"helvetica,,14.000000");
SET("ROOT","wallpaper","text",0,0,"");
SET("ROOT","window","window",0,1,"0.000000 0.000000 1.000000 1.000000");
SET("Fred","active display","SUIT_enum",0,0,"\"button with hotkey\" of {\"button with hotkey\" \"standard\"}");
SET("Fred","callback function","SUIT_functionPointer",0,0,"function ptr");
SET("Fred","disabled","boolean",0,0,"no");
SET("Fred","hotkey","text",0,0,"Meta-a");
SET("Fred","label","text",0,0,"Fred");
SET("Fred","viewport","viewport",0,0,"392 196 590 220");
SET("explain","active display","SUIT_enum",0,0,"\"standard\" of {\"standard\"}");
SET("explain","label","text",0,0,"@bold(About The Trapper Demo:)

This is a demonstration of the use of trapper functions in SUIT. Trappers are used to capture input events before they are seen by SUIT, thus allowing you to implement \"hot keys\", or keyboard accelerators.

In this demo, the button called Fred can be pressed directly, or it can be activated by pressing META-\"A\". The callback for the button is the same in either case: it beeps and changes the label.");
SET("explain","line spacing","double",0,0,"1.000000");
SET("explain","viewport","viewport",0,0,"268 333 696 474");
SET("Hotkey for Fred is META-\"A\"","active display","SUIT_enum",0,0,"\"standard\" of {\"standard\"}");
SET("Hotkey for Fred is META-\"A\"","label","text",0,0,"Hotkey for Fred is META-\"A\"");
SET("Hotkey for Fred is META-\"A\"","viewport","viewport",0,0,"386 238 553 262");
SET("Done","active display","SUIT_enum",0,0,"\"standard\" of {\"button with hotkey\" \"standard\"}");
SET("Done","border raised","boolean",0,0,"yes");
SET("Done","callback function","SUIT_functionPointer",0,0,"function ptr");
SET("Done","disabled","boolean",0,0,"no");
SET("Done","done callback function","SUIT_functionPointer",0,0,"function ptr");
SET("Done","label","text",0,0,"Done");
SET("Done","viewport","viewport",0,0,"769 36 806 60");
SET("SUIT trapper function Demo","active display","SUIT_enum",0,0,"\"standard\" of {\"standard\"}");
SET("SUIT trapper function Demo","font","GP_font",0,0,"lucida,bolditalic,18.000000");
SET("SUIT trapper function Demo","label","text",0,0,"SUIT trapper function Demo");
SET("SUIT trapper function Demo","viewport","viewport",0,0,"290 529 582 558");


} /* end of INIT_suiRoutine */

void SUIT_initFromCode(char *programName)

{

SUIT_interiorInitFromCode(programName, INIT_suiRoutine, THE_SCREEN_WIDTH, THE_SCREEN_HEIGHT, THE_SCREEN_DEPTH);

}
