	module yadman
        version = 'v1.0'
        names = case_sensitive
        objects = {
                separator = gadget ;
                label = gadget ;
                push_button = gadget ;
                toggle_button = gadget ;
                }


!    
!    ------------------------------------------------------------------
!    Copyright (c) 1989 Digital Equipment Corporation.
!    
!    Permission to use, copy, modify and distribute this software for any
!    purpose and without fee is hereby granted, provided the above copyright
!    notice and this permission notice are retained, and the name of Digital
!    Equipment Corporation not be used in advertising or publicity
!    pertaining to this software without specific, written prior permission.
!    This software is provided "as is" without express or implied warranty.
!    
!    Author: Ken Berkun 
!    ------------------------------------------------------------------------
!
!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!
!!!!!
!!!!! LEAVE THE FIRST LINE IN FOR VMS
!!!!! LEAVE THE SECOND LINE IN FOR ULTRIX
!!!!!
!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!
!

include file 'DwtAppl.uil';   !IN FOR VMS
!include file '/usr/include/X11/DECwDwtApplProg.uil';  !IN FOR ULTRIX

!++
!
! Author:
!   Ken Berkun
!
! Date:
!   9 April 1989
!
!--

!++
!
! Skeleton Author:
!   Anders Samuelsson, SWAS/LEG Sweden
!
!--

!
! Here we define labels and other values.
!

    value

	k_MainWindow		: 0;
	k_MenuBar		: 1;
	k_FileDown		: 2;
	k_MenuWidget		: 3;
	k_OpenButton		: 4;
	k_ExitButton		: 5;
	k_FileBox		: 6;
	k_workwidget		: 7;
	k_SaveButton		: 8;
	k_NewButton		: 9;
	k_xdim_label		: 10;
	k_ydim_label		: 11;
	k_length_label		: 12;
	k_pixels_label		: 13;
	k_iterations_label 	: 14;
	k_xdim			: 15;
	k_ydim			: 16;
	k_length		: 17;
	k_pixels		: 18;
	k_iterations		: 19;
	k_DataEntryBox		: 20;
	k_ok_data	  	: 21;
	k_reset_data		: 22;
	k_cancel_data		: 23;
	k_CommandsDown		: 24;
	k_CommandsWidget	: 25;
	k_LaunchButton		: 26;
	k_ResizeButton		: 27;
	k_SaveAsButton		: 28;
	k_CautionBox		: 32;
	k_ColorBox		: 36;
	k_apply_color		: 37;
	k_reset_color		: 38;
	k_dismiss_color		: 39;
	k_red_mult_label	: 40;
	k_green_mult_label	: 41;
	k_blue_mult_label	: 42;
	k_red_mult		: 43;
	k_green_mult		: 44;
	k_blue_mult		: 45;
	k_color_box_label	: 46;
	k_color_button_box	: 47;
	k_OptionsDown		: 48;
	k_OptionsWidget		: 49;
	k_ColorsButton		: 50;
	k_VerticalScroll	: 51;
	k_HorizontalScroll	: 52;
	k_MouseSizeButton	: 53;
	k_AnimateInProgress	: 54;
	k_LaunchInProgress	: 55;
	k_AnimateButton		: 56;
	k_BrainFadeButton	: 57;
	k_launch_data		: 58;
	k_shift			: 59;
	k_mult			: 60;
	k_effects_label		: 61;
	k_progress_box		: 62;
	k_red_up		: 63;
	k_red_down		: 64;
	k_green_up		: 65;
	k_green_down		: 66;
	k_blue_up		: 67;
	k_blue_down		: 68;
	k_inc_label		: 69;
	k_1			: 70;
	k_10			: 71;
	k_HelpBox		: 72;
	k_help_entry		: 73;
	k_HelpDown		: 74;
	k_HelpWidget		: 75;
	k_HelpButton		: 76;

	k_NumFiles		: 10;
	k_Man			: '*.man';
	File_label		: 'File';
	New_label		: 'New...';
	Open_label		: 'Open...';
	Save_label		: 'Save';
	SaveAs_label		: 'Save As...';
	Exit_label		: 'Exit';
	Commands_label		: 'Commands';
	Launch_label		: 'Launch';
	Animate_label		: 'Animate';
	BrainFade_label		: 'Brain Fade';
	Options_label		: 'Options';
	Colors_label		: 'Colors...';
	Help_label		: 'Help';
	AutoResize_label	: exported 'Auto Resize';
	NoAutoResize_label	: exported 'No Auto Resize';

	FileBox_read_title	: exported 'Open File';
	FileBox_save_title	: exported 'Save File';


! Declarations for the data entry dialog box

value

	k_data_entry_title		: 'Image Data';
	k_data_entry_label_text		: 'Enter Parameters';
	k_xdim_label_text		: 'X (Real)';
	k_ydim_label_text		: 'Y (Imaginary)';
	k_length_label_text		: 'Length';
	k_pixels_label_text		: 'Pixels';
	k_iterations_label_text		: 'Iterations';
	k_mouse_size_label_text		: 'Press to Select Area with Mouse';
        k_ok_data_label_text         	: 'Apply';
        k_reset_data_label_text         : 'Reset';
        k_cancel_data_label_text        : 'Dismiss';
	k_launch_data_label_text	: 'Launch';
	k_mouse_size_x			: 40;
	k_mouse_size_y			: 130;
	k_data_entry_label_x		: 65;
	k_data_entry_label_y		: 10;
	k_data_entry_x			: 500;
	k_data_entry_y			: 100;
	k_xdim_label_x			: 40;
	k_xdim_label_y			: 30;
	k_ydim_label_x			: 40;
	k_ydim_label_y			: 50;
	k_length_label_x		: 40;
	k_length_label_y		: 70;
	k_pixels_label_x		: 40;
	k_pixels_label_y		: 90;
	k_iterations_label_x		: 40;
	k_iterations_label_y		: 110;
	k_xdim_x			: 100;
	k_xdim_y			: 30;
	k_ydim_x			: 100;
	k_ydim_y			: 50;
	k_length_x			: 100;
	k_length_y			: 70;
	k_pixels_x			: 100;
	k_pixels_y			: 90;
	k_iterations_x			: 100;
	k_iterations_y			: 110;
	k_xdim_width			: 90;
	k_ydim_width			: 90;
	k_length_width			: 90;
	k_pixels_width			: 20;
	k_iterations_width		: 20;
	k_xdim_max			: 15;
	k_ydim_max			: 15;
	k_length_max			: 15;
	k_pixels_max			: 3;
	k_iterations_max		: 3;
	k_xdim_default			: '-2';
	k_ydim_default			: '-2';
	k_length_default		: '4';
	k_pixels_default		: '800';
	k_iterations_default		: '250';
	k_button_box_x			: 1;
	k_button_box_y			: 155;


! Declarations for the Caution Box

value

	k_caution_label_text    : 'Do you want to save your image first?';
	k_caution_box_x		: 300;
	k_caution_box_y		: 200;
	
! Declarations for the Colors Dialog Box

value

	k_color_box_label_text	: 'Change Factors to Change Image';
	k_red_mult_label_text	: 'Red Factor';
	k_green_mult_label_text	: 'Green Factor';
	k_blue_mult_label_text	: 'Blue Factor';
	k_apply_color_label_text	: 'Apply';
	k_reset_color_label_text	: 'Reset';
	k_dismiss_color_label_text	: 'Dismiss';
	k_effects_label_text	: 'Special Effects';
	k_shift_label_text	: 'Shift';
	k_mult_label_text	: 'Multiply';
	k_inc_label_text	: 'Increment Size';
	k_1_label_text		: ' 1';
	k_10_label_text		: '10';
	k_color_box_x		: 550;	
	k_color_box_y		: 50;
	k_color_box_label_x	: 25;
	k_color_box_label_y	: 5;
	k_red_mult_label_x	: 15;
	k_green_mult_label_x	: 15;
	k_blue_mult_label_x	: 15;
	k_red_mult_label_y	: 30;
	k_green_mult_label_y	: 50;
	k_blue_mult_label_y	: 70;
	k_red_mult_x		: 70; 
	k_green_mult_x		: 70;
	k_blue_mult_x		: 70;
	k_red_mult_y		: 30;
	k_green_mult_y		: 50;
	k_blue_mult_y		: 70;
	k_color_button_box_x	: 1;
	k_color_button_box_y	: 95;
	k_icons_x		: 125;
	k_red_up_icon_y		: 26;
	k_green_up_icon_y	: 46;
	k_blue_up_icon_y	: 66;
	k_red_down_icon_y	: 35;
	k_green_down_icon_y	: 55;
	k_blue_down_icon_y	: 75;
	k_effects_label_x	: 150;
	k_effects_label_y	: 10; 
	k_effects_x		: 150;
	k_effects_y		: 20;
	k_inc_label_x		: 150;
	k_inc_label_y		: 50;
	k_inc_x			: 150;
	k_inc_y			: 60;
	k_mult_max		: 8;
	k_mult_width		: 70;
	k_red_mult_default	: '1';
	k_green_mult_default	: '2';
	k_blue_mult_default	: '4';	

! 
! And for the Work in progress boxes
!

	LaunchInProgress_label	: 'Image Being Generated';
	AnimateInProgress_label : 'Animation in Progress';
	AnimateCancel_label	: 'Stop Animation';
	LaunchInProgress_x	: 320;
	LaunchInProgress_y	: 200;
	LaunchInProgress_width	: 150;
	LaunchInProgress_height : 80;
	AnimateInProgress_x	: 600;
	AnimateInProgress_y	: 100;

!
! For the progress window box
!
	
	progress_x		: 50;
	progress_y		: 10;
	progress_w		: 120;
	progress_h		: 20;

!value
!        red                 : color('red', foreground);
!        green                  : color('green', background);
!                     
!value
!        color_icon_table       : color_table(
!                                            green='o'
!                                           ,red='.'
!                                           ,background color=' ');

value

	color_icon_table  	: color_table(
					 	foreground color = 'o',
						background color = ' ');
!
! Icons for color selection
!

value

	color_up_icon	: icon (color_table=color_icon_table,
			'                 ',
			'        o        ',
			'       ooo       ',
			'      oo oo      ',
			'     oo   oo     ', 
			'    oo     oo    ',
			'   oo       oo   ',
			'  ooooooooooooo  ',
			' ooooooooooooooo ',
			'                 ');

	color_down_icon : icon (color_table=color_icon_table,
			'                 ',
			' ooooooooooooooo ',
			'  ooooooooooooo  ',
			'   oo       oo   ',
			'    oo     oo    ',
			'     oo   oo     ',
			'      oo oo      ',
			'       ooo       ',
			'        o        ',
			'                 ');


!
! help
!
    k_help_label                : exported 'Help';
    k_help_library_spec 	: exported '.';

!
!
! firstTopics for context-sensitive help
!

value

    	k_cs_overview :
       		 compound_string('Overview.txt');
    	k_cs_file :
        	compound_string('Overview.txt file');
    	k_cs_new :
		compound_string('Overview.txt file new');
	k_cs_open :
		compound_string('Overview.txt file open');
    	k_cs_save :
		compound_string('Overview.txt file save');
    	k_cs_save_as :
		compound_string('Overview.txt file save_as');
	k_cs_exit :
		compound_string('Overview.txt file exit');
    
	k_cs_commands :
		compound_string('Overview.txt commands');
	k_cs_launch :
		compound_string('Overview.txt commands launch');
	k_cs_animate :
		compound_string('Overview.txt commands animate');
	k_cs_brain_fade :
		compound_string('Overview.txt commands brain_fade');

	k_cs_options :
		compound_string('Overview.txt options');
	k_cs_colors :
		compound_string('Overview.txt options colors');
	k_cs_auto_resize :
		compound_string('Overview.txt options auto_resize');

!
! What are the names of the callback procedures to be used
!

    procedure
	
	openproc ();
	newproc  ();
	saveproc ();
	saveasproc ();
	exitproc ();
	launchproc (integer);
	animateproc ();
	brainfadeproc ();
	colorsproc ();
	resizeproc ();
	WidgetIDproc (integer);
	Activateproc (integer);
	FileBoxproc (integer);
	CancelFileBoxproc ();
	CautionBoxproc (integer);
	ColorBoxproc (integer);
	VertScrollproc (integer);
	HorScrollproc (integer);
	MouseSizeproc ();
	CancelLaunchproc();
	CancelAnimateproc();
	ColorIconproc(integer);
	Effectsproc(integer);
	Incproc(integer);
	Helpproc(compound_string);
	EndHelpproc();
	MyExpoproc (integer);
!
! Definition of widgets...
!

object

	MainWindow : exported main_window 
	    {
	     arguments {
		x = 0;
		y = 0;
		width = 0;
		height = 0;
	     };
	     callbacks {
		create = procedure WidgetIDproc( k_MainWindow );
	     };
	     controls {
		window     	WorkWindow;
		scroll_bar	VerticalScroll;
		scroll_bar	HorizontalScroll;
 		menu_bar   	MenuBar;
	     };
	};
	
object

	WorkWindow : exported window
	    {
	     arguments {
		x = 0;
		y = 0;
		width = 400;
		height =400;
	    };
	    callbacks {
		create = procedure WidgetIDproc (k_workwidget );
		expose = procedure MyExpoproc ( k_workwidget);
	    };
	};

object

	VerticalScroll : exported scroll_bar
	{
	callbacks 
		{
		create = procedure WidgetIDproc (k_VerticalScroll);
		value_changed= procedure VertScrollproc(k_VerticalScroll);
		};
	};

object

	HorizontalScroll : exported scroll_bar
	{
	arguments
		{
		orientation = DwtOrientationHorizontal;
		};
	callbacks 
		{
		create = procedure WidgetIDproc (k_HorizontalScroll);
		value_changed= procedure HorScrollproc(k_HorizontalScroll);
		};
	};

object

	MenuBar : exported menu_bar 
		{
            arguments 
		{
            	orientation = DwtOrientationHorizontal;
		menu_help_widget = pulldown_entry HelpDown;
		spacing = 15;
        	};
	     callbacks {
		create = procedure WidgetIDproc( k_MenuBar );
	     };
	     controls {
		pulldown_entry	FileDown;
		pulldown_entry  CommandsDown;
		pulldown_entry  OptionsDown;
		pulldown_entry  HelpDown;
	     };
	};

object

	FileDown : exported pulldown_entry 
	    {
	     arguments {
		x = 0;
		y = 0;
		label_label = File_label;
	     };
	     callbacks {
		create = procedure WidgetIDproc( k_FileDown );
		help = procedure Helpproc(k_cs_file);
	     };
	     controls 
		{
		pulldown_menu MenuWidget;
	        };
	};


object

	MenuWidget : exported pulldown_menu 
	    {
	     callbacks {
		create = procedure WidgetIDproc( k_MenuWidget );
	     };
	     controls {
		push_button     NewButton;
		push_button	OpenButton;
		separator	
			{
			arguments
				{
				orientation = DwtOrientationHorizontal;
				};
			};
		push_button	SaveButton;
		push_button	SaveAsButton;
		separator	
			{
			arguments
				{
				orientation = DwtOrientationHorizontal;
				};
			};
		push_button	ExitButton;
	     };
	};

object

	NewButton : exported push_button 
	    {
	     arguments {
		label_label = New_label;
		alignment = DwtAlignmentBeginning;
	     };
	     callbacks {
		create = procedure WidgetIDproc( k_NewButton );
		activate = procedure newproc();
		help = procedure Helpproc(k_cs_new);
	     };
	};

object

	OpenButton : exported push_button 
	    {
	     arguments {
		label_label = Open_label;
		alignment = DwtAlignmentBeginning;
	     };
	     callbacks {
		create = procedure WidgetIDproc( k_OpenButton );
		activate = procedure openproc();
		help = procedure Helpproc(k_cs_open);
	     };
	};

object

	SaveButton : exported push_button
		{
		arguments {
			label_label = Save_label;
			alignment = DwtAlignmentBeginning;
		};
		callbacks {
		   create = procedure WidgetIDproc( k_SaveButton );
		   activate = procedure saveproc();
		   help = procedure Helpproc(k_cs_save);
		};
	};
object

	SaveAsButton : exported push_button
		{
		arguments {
			label_label = SaveAs_label;
			alignment = DwtAlignmentBeginning;
		};
		callbacks {
		   create = procedure WidgetIDproc( k_SaveAsButton );
		   activate = procedure saveasproc();
	       	   help = procedure Helpproc(k_cs_save_as);
		};
	};

object

	ExitButton : exported push_button 
	    {
	     arguments {
		label_label = Exit_label;
		alignment = DwtAlignmentBeginning;
	     };
	     callbacks {
		create = procedure WidgetIDproc( k_ExitButton );
		activate = procedure exitproc();
		help = procedure Helpproc(k_cs_exit);
	     };
	};

object

	CommandsDown : exported pulldown_entry
	   {
	   arguments 
		{
		label_label = Commands_label;
		};
	   callbacks
		{
		create = procedure WidgetIDproc (k_CommandsDown );
		help = procedure Helpproc(k_cs_commands);
		};
	   controls
		{
		pulldown_menu CommandsWidget;
		};
	    };

object

	CommandsWidget : exported pulldown_menu 
	    {
	     callbacks {
		create = procedure WidgetIDproc( k_CommandsWidget );
	     };
	     controls {
		push_button	LaunchButton;
		push_button	AnimateButton;
		push_button	BrainFadeButton;
	     };
	};

object

	LaunchButton : exported push_button 
	    {
	     arguments {
		label_label = Launch_label;
		alignment = DwtAlignmentBeginning;
	     };
	     callbacks {
		create = procedure WidgetIDproc( k_LaunchButton );
		activate = procedure launchproc(k_LaunchButton);
		help = procedure Helpproc(k_cs_launch);
	     };
	};

object

	AnimateButton : exported push_button 
	    {
	     arguments {
		label_label = Animate_label;
		alignment = DwtAlignmentBeginning;
		sensitive = false;
	     };
	     callbacks {
		create = procedure WidgetIDproc( k_AnimateButton );
		activate = procedure animateproc();
		help = procedure Helpproc(k_cs_animate);
	     };
	};

object

	BrainFadeButton : exported push_button 
	    {
	     arguments {
		label_label = BrainFade_label;
		alignment = DwtAlignmentBeginning;
		sensitive = false;
	     };
	     callbacks {
		create = procedure WidgetIDproc( k_BrainFadeButton );
		activate = procedure brainfadeproc();
		help = procedure Helpproc(k_cs_brain_fade);
	     };
	};

object

	OptionsDown : exported pulldown_entry
	   {
	   arguments 
		{
		label_label = Options_label;
		};
	   callbacks
		{
		create = procedure WidgetIDproc (k_OptionsDown );
		help = procedure Helpproc(k_cs_options);
		};
	   controls
		{
		pulldown_menu OptionsWidget;
		};
	    };


object

	OptionsWidget : exported pulldown_menu 
	    {
	     callbacks {
		create = procedure WidgetIDproc( k_OptionsWidget );
	     };
	     controls {
		push_button	ColorsButton;
		push_button	ResizeButton;
	     };
	};

object
	
	HelpDown : exported pulldown_entry
		{
		arguments
			{
			label_label = k_help_label;
			};
		controls
			{
			pulldown_menu HelpWidget;
			};
		callbacks
			{
			create = procedure WidgetIDproc (k_HelpDown);
			};
		};

object

	HelpWidget : exported pulldown_menu 
	    {
	     callbacks {
		create = procedure WidgetIDproc( k_HelpWidget );
	     };
	     controls {
		push_button	HelpButton;
	     };
	};

object

	HelpButton : exported push_button
		{
		arguments
			{
			label_label = Help_label;
			alignment = DwtAlignmentBeginning;
			};
		callbacks
			{
			create = procedure WidgetIDproc (k_HelpButton);
			activate = procedure Helpproc(k_cs_overview);
			};
	};

object

	ColorsButton : exported push_button 
	    {
	     arguments {
		label_label = Colors_label;
		alignment = DwtAlignmentBeginning;
	     };
	     callbacks {
		create = procedure WidgetIDproc( k_ColorsButton );
		activate = procedure colorsproc();
		help = procedure Helpproc(k_cs_colors);
	     };
	};

object

	ResizeButton : exported push_button 
	    {
	     arguments {
		label_label = AutoResize_label;
		alignment = DwtAlignmentBeginning;
	     };
	     callbacks {
		create = procedure WidgetIDproc( k_ResizeButton );
		activate = procedure resizeproc();
		help = procedure Helpproc(k_cs_auto_resize);
	     };
	};

object

	FileBox : exported file_selection
		{
		arguments
			{
			title = FileBox_read_title;
			style = DwtModeless;
			must_match = true;
			dir_mask = k_Man;
			x = 300;
			y = 100;
			};

		callbacks 
			{
			create = procedure WidgetIDproc(k_FileBox);
			activate = procedure FileBoxproc(k_FileBox);
			cancel = procedure CancelFileBoxproc();
			};
		};

object                     	! The Data Entry Dialog box            

    	DataEntryBox: popup_dialog_box 
		{
       	 	arguments 
			{
			title = k_data_entry_title;
            		style = DwtModeless;
            		x = k_data_entry_x;
            		y = k_data_entry_y;
        		};

		controls
			{
			
			label		data_entry_label;

			label		xdim_label;
			simple_text	xdim;
			
			label 		ydim_label;
			simple_text	ydim;

			label		length_label;
			simple_text	length;

			label		pixels_label;
			simple_text	pixels;

			label		iterations_label;
			simple_text	iterations;
		
			push_button	MouseSizeButton;

			work_area_menu	button_box;
			};

		callbacks
			{
			create = procedure WidgetIDproc( k_DataEntryBox );
			};
		};	
	
object

	data_entry_label : label
		{
		arguments
			{
			x = k_data_entry_label_x;
			y = k_data_entry_label_y;
			label_label = k_data_entry_label_text;
			};
		};	        

object

	xdim_label : label
		{
		arguments
			{
			x = k_xdim_label_x;
			y = k_xdim_label_y;
			label_label = k_xdim_label_text;
			};
		};	        

	ydim_label : label
		{
		arguments
			{
			x = k_ydim_label_x;
			y = k_ydim_label_y;
			label_label = k_ydim_label_text;
			};
		};

	length_label : label
		{
		arguments
			{
			x = k_length_label_x;
			y = k_length_label_y;
			label_label = k_length_label_text;
			};
		};

	pixels_label : label
		{
		arguments
			{
			x = k_pixels_label_x;
			y = k_pixels_label_y;
			label_label = k_pixels_label_text;
			};
		};

	iterations_label : label
		{
		arguments
			{
			x = k_iterations_label_x;
			y = k_iterations_label_y;
			label_label = k_iterations_label_text;
			};
		};

object

	xdim : simple_text
		{
		arguments
			{
			x = k_xdim_x;
			y = k_xdim_y;
			width = k_xdim_width;
			max_length = k_xdim_max;
			simple_text_value = k_xdim_default;
			};
		callbacks 
			{
			create = procedure WidgetIDproc(k_xdim);
			};
		};

	ydim : simple_text
		{
		arguments
			{
			x = k_ydim_x;
			y = k_ydim_y;
			width = k_ydim_width;
			max_length = k_ydim_max;
			simple_text_value = k_ydim_default;
			};
		callbacks 
			{
			create = procedure WidgetIDproc(k_ydim);
			};
		};

	length : simple_text
		{
		arguments
			{
			x = k_length_x;
			y = k_length_y;
			width = k_length_width;
			max_length = k_length_max;
			simple_text_value = k_length_default;
			};
		callbacks 
			{
			create = procedure WidgetIDproc(k_length);
			};
		};

	pixels : simple_text
		{
		arguments
			{
			x = k_pixels_x;
			y = k_pixels_y;
			width = k_pixels_width;
			max_length = k_pixels_max;
			simple_text_value = k_pixels_default;
			};
		callbacks 
			{
			create = procedure WidgetIDproc(k_pixels);
			};
		};

	iterations : simple_text
		{
		arguments
			{
			x = k_iterations_x;
			y = k_iterations_y;
			width = k_iterations_width;
			max_length = k_iterations_max;
			simple_text_value = k_iterations_default;
			};
		callbacks 
			{
			create = procedure WidgetIDproc(k_iterations);
			};
		};


object

    MouseSizeButton : push_button {
        arguments {                       
	    sensitive = false;
            label_label = k_mouse_size_label_text;
	    x = k_mouse_size_x;
	    y = k_mouse_size_y;
            };
        callbacks {
            create = procedure WidgetIDproc (k_MouseSizeButton);
            activate = procedure MouseSizeproc ();
        };
    };

object

    button_box : work_area_menu {
        arguments {
            orientation = DwtOrientationHorizontal;
            spacing = 50;
            x = k_button_box_x;
            y = k_button_box_y;
            border_width = 0;
            entry_border_width = 3;
            };
        controls {                                                  
            push_button     ok_data_button;
            push_button     reset_data_button;
            push_button     cancel_data_button;
	    push_button	    launch_data_button;
            };
        };

object

    ok_data_button : push_button { ! The menu positions the buttons
        arguments {                       !  automatically.
            label_label = k_ok_data_label_text;
            };
        callbacks {
            create = procedure WidgetIDproc (k_ok_data);
            activate = procedure Activateproc (k_ok_data);
        };
    };

object
    reset_data_button : push_button {
        arguments {
            label_label = k_reset_data_label_text;
        };
        callbacks {
            create = procedure WidgetIDproc (k_reset_data);
            activate = procedure Activateproc (k_reset_data);
        };
    };

object
    cancel_data_button : push_button {                       
        arguments {
            label_label = k_cancel_data_label_text;
            };
        callbacks {
            create = procedure WidgetIDproc (k_cancel_data);
            activate = procedure Activateproc (k_cancel_data);
        };
    };

object
    launch_data_button : push_button {                       
        arguments {
            label_label = k_launch_data_label_text;
            };
        callbacks {
            create = procedure WidgetIDproc (k_launch_data);
            activate = procedure launchproc(k_launch_data);
        };
    };

object

	CautionBox : caution_box
		{
		arguments
			{
			label_label = k_caution_label_text;
			style = DwtModal;
			x = k_caution_box_x;
			y = k_caution_box_y;
			};
		callbacks
			{
			create = procedure WidgetIDproc (k_CautionBox);
			no =	 procedure CautionBoxproc (DwtNoButton);
			yes =    procedure CautionBoxproc (DwtYesButton);
			cancel = procedure CautionBoxproc (DwtCancelButton);
			};
		};
	

object                  

    	ColorBox: popup_dialog_box 
		{
       	 	arguments 
			{
            		style = DwtModeless;
            		x = k_color_box_x; 	
            		y = k_color_box_y;
        		};

		controls
			{
			label		color_box_label;

			label		red_mult_label;
			simple_text	red_mult;
			
			label 		green_mult_label;
			simple_text	green_mult;

			label		blue_mult_label;
			simple_text	blue_mult;	
		
			push_button	red_up;
			push_button	red_down;

			push_button	green_up;
			push_button	green_down;

			push_button	blue_up;
			push_button	blue_down;

			label		effects_label;
			radio_box	effects_box;

			label		inc_label;
			radio_box	inc_box;

			work_area_menu	color_button_box;
			};

		callbacks
			{
			create = procedure WidgetIDproc( k_ColorBox );
			};
		};	
	
object

	color_box_label : label
		{
		arguments
			{
			x = k_color_box_label_x;
			y = k_color_box_label_y;
			label_label = k_color_box_label_text;
			};
		};

object

	red_mult_label : label
		{
		arguments
			{
			x = k_red_mult_label_x;
			y = k_red_mult_label_y;
			label_label = k_red_mult_label_text;
			};
		};	        
object

	green_mult_label : label
		{
		arguments
			{
			x = k_green_mult_label_x;
			y = k_green_mult_label_y;
			label_label = k_green_mult_label_text;
			};
		};	        
object

	blue_mult_label : label
		{
		arguments
			{
			x = k_blue_mult_label_x;
			y = k_blue_mult_label_y;
			label_label = k_blue_mult_label_text;
			};
		};	
        
object

	red_mult : simple_text
		{
		arguments
			{
			x = k_red_mult_x;
			y = k_red_mult_y;
			max_length = k_mult_max;
			width	= k_mult_width;
			simple_text_value = k_red_mult_default;
			};
		callbacks 
			{
			create = procedure WidgetIDproc(k_red_mult);
			};
		};

object

	green_mult : simple_text
		{
		arguments
			{
			x = k_green_mult_x;
			y = k_green_mult_y;
			max_length = k_mult_max;
			width	= k_mult_width;
			simple_text_value = k_green_mult_default;
			};
		callbacks 
			{
			create = procedure WidgetIDproc(k_green_mult);
			};
		};

object

	blue_mult : simple_text
		{
		arguments
			{
			x = k_blue_mult_x;
			y = k_blue_mult_y;
			max_length = k_mult_max;
			width	= k_mult_width;
			simple_text_value = k_blue_mult_default;
			};
		callbacks 
			{
			create = procedure WidgetIDproc(k_blue_mult);
			};
		};


object

	red_up	: push_button widget
		{
		arguments
			{
			x = k_icons_x;
			y = k_red_up_icon_y;
			shadow = false;
	                label_label_type = DwtPixmap;
       		        label_pixmap = color_up_icon;
			};
		callbacks
			{
			activate = procedure ColorIconproc(k_red_up);
			};
		};

object

	red_down : push_button widget
		{
		arguments
			{
			x = k_icons_x;
			y = k_red_down_icon_y;
			shadow = false;
	                label_label_type = DwtPixmap;
       		        label_pixmap = color_down_icon;
			};
		callbacks
			{
			activate = procedure ColorIconproc(k_red_down);
			};
		};
object

	green_up : push_button widget
		{
		arguments
			{
			x = k_icons_x;
			y = k_green_up_icon_y;
			shadow = false;
	                label_label_type = DwtPixmap;
       		        label_pixmap = color_up_icon;
			};
		callbacks
			{
			activate = procedure ColorIconproc(k_green_up);
			};
		};

object

	green_down : push_button widget
		{
		arguments
			{
			x = k_icons_x;
			y = k_green_down_icon_y;
			shadow = false;
	                label_label_type = DwtPixmap;
       		        label_pixmap = color_down_icon;
			};
		callbacks
			{
			activate = procedure ColorIconproc(k_green_down);
			};
		};
object

	blue_up	: push_button widget
		{
		arguments
			{
			x = k_icons_x;
			y = k_blue_up_icon_y;
			shadow = false;
	                label_label_type = DwtPixmap;
       		        label_pixmap = color_up_icon;
			};
		callbacks
			{
			activate = procedure ColorIconproc(k_blue_up);
			};
		};

object

	blue_down : push_button widget
		{
		arguments
			{
			x = k_icons_x;
			y = k_blue_down_icon_y;
			shadow = false;
	                label_label_type = DwtPixmap;
       		        label_pixmap = color_down_icon;
			};
		callbacks
			{
			activate = procedure ColorIconproc(k_blue_down);
			};
		};

object

	effects_label : label
		{
		arguments
			{
			x = k_effects_label_x;
			y = k_effects_label_y;
			label_label = k_effects_label_text;
			};
		};	

object

	effects_box : radio_box
		{
		arguments
			{
			x = k_effects_x;
			y = k_effects_y;
			};
		controls
			{
			toggle_button	shift_button;
			toggle_button	mult_button;
			};
		};
		
object

    shift_button : toggle_button { 
        arguments {             
	    toggle_value = true;
            label_label = k_shift_label_text;
            };
        callbacks {
            create = procedure WidgetIDproc (k_shift);
            value_changed = procedure Effectsproc (k_shift);
        };
    };

object

    mult_button : toggle_button { 
        arguments {             
            label_label = k_mult_label_text;
            };
        callbacks {
            create = procedure WidgetIDproc (k_mult);
            value_changed = procedure Effectsproc (k_mult);
        };
    };

object

	inc_label : label
		{
		arguments
			{
			x = k_inc_label_x;
			y = k_inc_label_y;
			label_label = k_inc_label_text;
			};
		};	

object

	inc_box : radio_box
		{
		arguments
			{
			x = k_inc_x;
			y = k_inc_y;
			};
		controls
			{
			toggle_button	by_1_button;
			toggle_button	by_10_button;
			};
		};
		
object

    by_1_button : toggle_button { 
        arguments {             
	    toggle_value = true;
            label_label = k_1_label_text;
            };
        callbacks {
            create = procedure WidgetIDproc (k_1);
            value_changed = procedure Incproc (k_1);
        };
    };

object

    by_10_button : toggle_button { 
        arguments {             
            label_label = k_10_label_text;
            };
        callbacks {
            create = procedure WidgetIDproc (k_10);
            value_changed = procedure Incproc (k_10);
        };
    };

object

    color_button_box : work_area_menu {
        arguments {
            orientation = DwtOrientationHorizontal;
            spacing = 100;
            x = k_color_button_box_x;
            y = k_color_button_box_y;
            border_width = 0;
            entry_border_width = 3;
            };
        controls {                                                  
            push_button     apply_color_button;
            push_button     reset_color_button;
            push_button     dismiss_color_button;
            };
        };

object

    apply_color_button : push_button { 
        arguments {             
            label_label = k_apply_color_label_text;
            };
        callbacks {
            create = procedure WidgetIDproc (k_apply_color);
            activate = procedure ColorBoxproc (k_apply_color);
        };
    };

object
    reset_color_button : push_button {
        arguments {
            label_label = k_reset_color_label_text;
        };
        callbacks {
            create = procedure WidgetIDproc (k_reset_color);
            activate = procedure ColorBoxproc (k_reset_color);
        };
    };

object

    dismiss_color_button : push_button {                       
        arguments {
            label_label = k_dismiss_color_label_text;
            };
        callbacks {
            create = procedure WidgetIDproc (k_dismiss_color);
            activate = procedure ColorBoxproc (k_dismiss_color);
        };
    };

object

	AnimateInProgress : work_in_progress_box
		{
		arguments
			{
			label_label = AnimateInProgress_label;
			cancel_label = AnimateCancel_label;
			style = DwtModal;
			x = AnimateInProgress_x;
			y = AnimateInProgress_y;
			};
		callbacks
			{
			create = procedure WidgetIDproc(k_AnimateInProgress);
			cancel = procedure CancelAnimateproc();
			};
		};
object

	LaunchInProgress : work_in_progress_box
		{
		arguments
			{
			label_label = LaunchInProgress_label;
			x = LaunchInProgress_x;
			y = LaunchInProgress_y;
			width = LaunchInProgress_width;
			height = LaunchInProgress_height;
			};
		callbacks
			{
			create = procedure WidgetIDproc(k_LaunchInProgress);
			cancel = procedure CancelLaunchproc();
			};
		};

object

	ProgressBox : window
		{
		arguments
			{
			x = progress_x;
			y = progress_y;
			width = progress_w;
			height = progress_h;
			};
		callbacks
			{
			create = procedure WidgetIDproc(k_progress_box);
			};
		};

!object

    !HelpBox : message_box 
		!{
        	!arguments 
			!{
            		!style = DwtModeless;
            		!no_resize = false;
            		!default_position = true;
			!title = k_help_box_label;
			!label_label = k_help_box_message;
        		!};
        	!callbacks 
			!{
            		!create = procedure WidgetIDproc(k_HelpBox);
            		!yes = procedure EndHelpproc();
        		!};
    		!};


object

    HelpBox : help_box 
		{
        	arguments 
			{
            		application_name = 'Yadman';
            		default_position = true;
            		library_spec = k_help_library_spec;
            		overview_topic = 'Overview.txt';
        		};
        	callbacks 
			{
            		create = procedure WidgetIDproc(k_HelpBox);
        		};
    		};
   
end module /* YADMAN */;
    

