module 'XApplication'
applicationName = 'XApplication';
generateNameCPPMFCWindows = 'windows/main.cxx';
generateNameCPPMFCMotif = 'motif/main.cxx';
generateNameCPPStubsMFCWindows = 'windows/specific.cxx';
generateNameCPPStubsMFCMotif = 'motif/specific.cxx';
generateNameCPPExternsMFCWindows = 'windows/main_xd.h';
generateNameCPPExternsMFCMotif = 'motif/main_xd.h';
generateCPixmapFile = '';
generateCPPHeaderFileMFCWindows = '"main.h"';
generateCPPHeaderFileMFCMotif = '"main.h"';
generateNameMakefile = 'motif/Makefile';
generateMask = 4325384;
useMask = 1;
ansiC = 0;
generateNewMakefile = 0;
generateMakeTemplate = 1;
useCPixmaps = 0;
useUILPixmaps = 0;
useCHeaders = 0;
useCUILHeaders = 0;
CPPFlavour = 1;
useCPPHeaders = 0;
useCPPHeadersMFCWindows = 1;
useCPPHeadersMFCMotif = 1;
value
	'magenta' : color ( '#ffff0000ffff' );
	'cyan' : color ( '#0000ffffffff' );
	'yellow' : color ( '#ffffffff0000' );
	'blue' : color ( '#00000000ffff' );
	'green' : color ( '#0000ffff0000' );
	'red' : color ( '#ffff00000000' );
	'white' : color ( '#ffffffffffff' );
	'black' : color ( '#000000000000' );
object 'shell' : XmDialogShell {
	arguments {
	codeStruct = 4;
	XmNallowShellResize = true;
	XmNprimary = 1;
	};
	methods {
	xdDeclareOnly = {
		'DoExit', 0  ;
	};
	};
object '' : XmForm {
	arguments {
	XmNautoUnmanage = false;
	};
object '' : XmMenuBar {
	arguments {
	};
object '' : XmCascadeButton {
	arguments {
	XmNlabelString = 'File';
	};
object '' : XmPulldownMenu {
	arguments {
	};
object '' : XmPushButton {
	arguments {
	XmNlabelString = 'New';
	};
};
object '' : XmPushButton {
	arguments {
	XmNlabelString = 'Open';
	};
};
object '' : XmPushButton {
	arguments {
	XmNlabelString = 'Exit';
	};
	methods {
	XmNactivateCallback = {
		'DoExit', 0  ;
	};
	};
};
};
};
object '' : XmCascadeButton {
	arguments {
	XmNlabelString = 'Edit';
	};
object '' : XmPulldownMenu {
	arguments {
	};
object '' : XmPushButton {
	arguments {
	XmNlabelString = 'Cut';
	};
};
object '' : XmPushButton {
	arguments {
	XmNlabelString = 'Copy';
	};
};
object '' : XmPushButton {
	arguments {
	XmNlabelString = 'Paste';
	};
};
};
};
};
object 'drawing' : XmDrawingArea {
	arguments {
	protectedMethod = '	void SetCell ( unsigned int x, unsigned int y );
	void draw_line ( unsigned int x0, unsigned int y0, unsigned int x1, unsigned int y1, unsigned int draw_first);
	void horizontal_line ( unsigned int x0, unsigned int y0, unsigned int x1, unsigned int draw_first );
	void draw_rectangle ( unsigned int x0, unsigned int y0, unsigned int x1, unsigned int y1 );
	void fill_rectangle ( unsigned int x0, unsigned int y0, unsigned int x1, unsigned int y1 );
	void DrawCells ();
	void DrawGrid ();
	void DrawCell ( unsigned int x, unsigned int y );
	void XGridLine ( unsigned int x );
	void YGridLine ( unsigned int y );
	int initialised;
	colour_type cells[32][32];
	unsigned int start_x, start_y;
#ifdef XD_MOTIF_MFC
	Pixel *colours[8];
	GC gc;
#else
	CBrush *colours[8];
	CDC *dc;
#endif
 ';
	codeStruct = 4;
	preInstantiation = '	colours[black]=&pixel_resources.black;
	colours[white]=&pixel_resources.white;
	colours[red]=&pixel_resources.red;
	colours[green]=&pixel_resources.green;
	colours[blue]=&pixel_resources.blue;
	colours[yellow]=&pixel_resources.yellow;
	colours[cyan]=&pixel_resources.cyan;
	colours[magenta]=&pixel_resources.magenta;
	initialised = FALSE;    
	for ( unsigned char y = 0; y < 32; y++ )
		for ( unsigned char x = 0; x < 32; )
			for ( unsigned char c = (unsigned char)black; c <= (unsigned char)magenta; c++, x++ )
				cells [x][y] = (colour_type)c; 

';
	XmNwidth = 250;
	XmNheight = 250;
	XmNmfcEvents = 'PAINT,LBUTTONDOWN,LBUTTONUP,';
	};
	methods {
	XmNexposeCallback = {
		'DoExpose', 1  not_windows;
	};
	xdDeclareOnly = {
		'DoInput', 1  not_windows;
		'DoExpose', 1  not_windows;
	};
	XmNinputCallback = {
		'DoInput', 1  not_windows;
	};
	};
};
object '' : XmRowColumn {
	arguments {
	};
object 'tool_box' : XmRadioBox {
	arguments {
	publicMethod = '	tool_type tool;';
	codeStruct = 4;
	accessControl = 0;
	preInstantiation = 'tool = pencil;';
	XmNnumColumns = 2;
	XmNpacking = 2;
	};
	methods {
	xdDeclareOnly = {
		'Fill', 0  ;
		'Rectangle', 0  ;
		'Line', 0  ;
		'Pencil', 0  ;
	};
	};
object '' : XmToggleButton GADGET {
	arguments {
	XmNlabelString = 'Pencil';
	XmNset = true;
	};
	methods {
	XmNvalueChangedCallback = {
		'Pencil', 0  ;
	};
	};
};
object '' : XmToggleButton GADGET {
	arguments {
	XmNlabelString = 'Line';
	};
	methods {
	XmNvalueChangedCallback = {
		'Line', 0  ;
	};
	};
};
object '' : XmToggleButton GADGET {
	arguments {
	XmNlabelString = 'Rect';
	};
	methods {
	XmNvalueChangedCallback = {
		'Rectangle', 0  ;
	};
	};
};
object '' : XmToggleButton GADGET {
	arguments {
	XmNlabelString = 'Fill';
	};
	methods {
	XmNvalueChangedCallback = {
		'Fill', 0  ;
	};
	};
};
};
object '' : XmSeparator {
	arguments {
	};
};
object 'colour_box' : XmRowColumn {
	arguments {
	publicMethod = '	colour_type colour;
';
	codeStruct = 4;
	accessControl = 0;
	preInstantiation = 'colour = black;';
	XmNnumColumns = 2;
	XmNpacking = 2;
	XmNradioBehavior = true;
	};
	methods {
	xdDeclareOnly = {
		'Magenta', 1  ;
		'Cyan', 1  ;
		'Yellow', 1  ;
		'Blue', 1  ;
		'Green', 1  ;
		'Red', 1  ;
		'White', 1  ;
		'Black', 1  ;
	};
	};
object '' : XmToggleButton {
	arguments {
	XmNforeground = 'white';
	XmNbackground = 'black';
	XmNlabelString = 'Black';
	XmNindicatorType = 2;
	XmNset = true;
	};
	methods {
	XmNvalueChangedCallback = {
		'Black', 0  ;
	};
	};
};
object '' : XmToggleButton {
	arguments {
	XmNbackground = 'white';
	XmNlabelString = 'White';
	XmNindicatorType = 2;
	};
	methods {
	XmNvalueChangedCallback = {
		'White', 0  ;
	};
	};
};
object '' : XmToggleButton {
	arguments {
	XmNbackground = 'red';
	XmNlabelString = 'Red';
	XmNindicatorType = 2;
	};
	methods {
	XmNvalueChangedCallback = {
		'Red', 0  ;
	};
	};
};
object '' : XmToggleButton {
	arguments {
	XmNbackground = 'green';
	XmNlabelString = 'Green';
	XmNindicatorType = 2;
	};
	methods {
	XmNvalueChangedCallback = {
		'Green', 0  ;
	};
	};
};
object '' : XmToggleButton {
	arguments {
	XmNforeground = 'white';
	XmNbackground = 'blue';
	XmNlabelString = 'Blue';
	XmNindicatorType = 2;
	};
	methods {
	XmNvalueChangedCallback = {
		'Blue', 0  ;
	};
	};
};
object '' : XmToggleButton {
	arguments {
	XmNbackground = 'yellow';
	XmNlabelString = 'Yellow';
	XmNindicatorType = 2;
	};
	methods {
	XmNvalueChangedCallback = {
		'Yellow', 0  ;
	};
	};
};
object '' : XmToggleButton {
	arguments {
	XmNbackground = 'cyan';
	XmNlabelString = 'Cyan';
	XmNindicatorType = 2;
	};
	methods {
	XmNvalueChangedCallback = {
		'Cyan', 0  ;
	};
	};
};
object '' : XmToggleButton {
	arguments {
	XmNbackground = 'magenta';
	XmNlabelString = 'Magenta';
	XmNindicatorType = 2;
	};
	methods {
	XmNvalueChangedCallback = {
		'Magenta', 0  ;
	};
	};
};
};
};
    attachments {
    attachment {
	XmNrightAttachment = 1 0 5;
	XmNleftAttachment = 1 0 5;
	XmNbottomAttachment = 0 0 0;
	XmNtopAttachment = 1 0 5;
    };
    attachment {
	XmNrightAttachment = 1 0 5;
	XmNleftAttachment = 3 3 5;
	XmNbottomAttachment = 1 0 5;
	XmNtopAttachment = 3 1 5;
    };
    attachment {
	XmNrightAttachment = 0 0 0;
	XmNleftAttachment = 1 0 5;
	XmNbottomAttachment = 0 0 0;
	XmNtopAttachment = 3 1 5;
    };
    };
};
};
end module;
