#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

//#include "Control_GUI.h"
#include "Control_Include.h"

struct ObjApp * CreateApp(void)
{
	struct ObjApp * Object;

	APTR	MainWindow_Root_Group, MainWindow_Layout_Group, Task_Page_Group, Vectors_Page_Group;
	APTR	Windows_Page_Group, Ports_Page_Group, Semaphores_Page_Group, MainWindow_Buttons;
	APTR	TaskInfo_Root_Group, TaskInfo_Register_Group, TaskInfo_Structure_Page_Group;
	APTR	TaskInfo_Struct_Buttons_Group, TaskInfo_Window_Page_Group, TaskInfo_Windows_Buttons_Group;
	APTR	TaskInfo_Ports_Page_Group, TaskInfo_Ports_Buttons_Group, TaskInfo_Interrupts_Page_Group;
	APTR	TaskInfo_Interrupt_Buttons_Group, TaskInfo_Trace_Page_Group, TaskInfo_Trace_Buttons_Group;
	APTR	Dissassembler_Root_Group, Dissassembler_Layout_Group, Dissassembler_Button_Group;
	APTR	Diss_Req_Root_Group, Diss_Req_Layout_Group, Diss_Req_Ranges_Group;
	APTR	Diss_Req_StartAddress_Label, Diss_Req_EndAddress_Label, Diss_Req_Slider_Group;
	APTR	Diss_Req_Simple_Scale, Diss_Req_Output_Group, Diss_Req_SaveFile_Group;
	APTR	Diss_Req_SaveFile_SaveLabel, Diss_Req_PrintFile_Group, Diss_Req_PrintFile_Image;
	APTR	Diss_Req_SetRange_Group, Diss_Req_Search_Group, Diss_Req_Search_String_Label;

	if (!(Object = AllocVec(sizeof(struct ObjApp), MEMF_PUBLIC|MEMF_CLEAR)))
		return(NULL);

	Object->STR_MainWindow_Task_StatusBar = "Well Hello.";
	Object->STR_TaskInfo_Status_Bar = "$100000 Power Snap By Bender";
	Object->STR_Dissassembler_Status_Bar = NULL;

	Object->STR_Registered_Pages_Group[0] = "Tasks";
	Object->STR_Registered_Pages_Group[1] = "Vectors";
	Object->STR_Registered_Pages_Group[2] = "Windows";
	Object->STR_Registered_Pages_Group[3] = "Ports";
	Object->STR_Registered_Pages_Group[4] = "Semaphores";
	Object->STR_Registered_Pages_Group[5] = NULL;
	Object->STR_TaskInfo_Register_Group[0] = "Structure";
	Object->STR_TaskInfo_Register_Group[1] = "Windows";
	Object->STR_TaskInfo_Register_Group[2] = "Ports";
	Object->STR_TaskInfo_Register_Group[3] = "Interrupts";
	Object->STR_TaskInfo_Register_Group[4] = "Tracer";
	Object->STR_TaskInfo_Register_Group[5] = NULL;
	Object->Diss_Req_Amount_RadioContent[0] = "Ranged Data";
	Object->Diss_Req_Amount_RadioContent[1] = "Screen Data";
	Object->Diss_Req_Amount_RadioContent[2] = NULL;

	Object->MainWindow_Task_List = ListObject,
		MUIA_Frame, MUIV_Frame_InputList,
		MUIA_List_Format, ",W=200 P=\332,,,P=\33r,,P=\33r,P=\33r",
		MUIA_List_ConstructHook, &Task_Construct_CodeHook,
		MUIA_List_DestructHook, &Task_Destruct_CodeHook,
		MUIA_List_DisplayHook, &Task_Display_CodeHook,
	End;

	Object->MainWindow_Task_List = ListviewObject,
		MUIA_HelpNode, "MainWindow_Task_List",
		MUIA_Listview_DoubleClick, TRUE,
		MUIA_Listview_Input, TRUE,
		MUIA_Listview_List, Object->MainWindow_Task_List,
	End;

	Object->MainWindow_Task_StatusBar = TextObject,
		MUIA_Background, MUII_TextBack,
		MUIA_Frame, MUIV_Frame_Text,
		MUIA_Text_Contents, Object->STR_MainWindow_Task_StatusBar,
		MUIA_Text_SetMin, TRUE,
	End;

	Task_Page_Group = GroupObject,
		MUIA_HelpNode, "Task_Page_Group",
		Child, Object->MainWindow_Task_List,
		Child, Object->MainWindow_Task_StatusBar,
	End;

	Vectors_Page_Group = GroupObject,
		MUIA_HelpNode, "Vectors_Page_Group",
	End;

	Windows_Page_Group = GroupObject,
		MUIA_HelpNode, "Windows_Page_Group",
	End;

	Ports_Page_Group = GroupObject,
		MUIA_HelpNode, "Ports_Page_Group",
	End;

	Semaphores_Page_Group = GroupObject,
		MUIA_HelpNode, "Semaphores_Page_Group",
	End;

	Object->Registered_Pages_Group = RegisterObject,
		MUIA_Register_Titles, Object->STR_Registered_Pages_Group,
		MUIA_HelpNode, "Registered_Pages_Group",
		Child, Task_Page_Group,
		Child, Vectors_Page_Group,
		Child, Windows_Page_Group,
		Child, Ports_Page_Group,
		Child, Semaphores_Page_Group,
	End;

	Object->MainWindow_Pause_Task = SimpleButton("Pause");

	Object->MainWindow_Terminate_Task = SimpleButton("Terminate");

	Object->MainWindow_Signal_Task = SimpleButton("Signal");

	Object->MainWindow_Trace_Task = SimpleButton("Trace");

	Object->MainWindow_Information_Task = SimpleButton("Information");

	MainWindow_Buttons = GroupObject,
		MUIA_HelpNode, "MainWindow_Buttons",
		MUIA_Weight, 20,
		MUIA_Frame, MUIV_Frame_Group,
		MUIA_FrameTitle, "Input Buttons",
		MUIA_Group_Columns, 5,
		MUIA_Group_SameSize, TRUE,
		Child, Object->MainWindow_Pause_Task,
		Child, Object->MainWindow_Terminate_Task,
		Child, Object->MainWindow_Signal_Task,
		Child, Object->MainWindow_Trace_Task,
		Child, Object->MainWindow_Information_Task,
	End;

	MainWindow_Layout_Group = GroupObject,
		MUIA_HelpNode, "MainWindow_Layout_Group",
		MUIA_Frame, MUIV_Frame_Group,
		MUIA_FrameTitle, "Main Display",
		Child, Object->Registered_Pages_Group,
		Child, MainWindow_Buttons,
	End;

	MainWindow_Root_Group = GroupObject,
		Child, MainWindow_Layout_Group,
	End;

	Object->Main_Window = WindowObject,
		MUIA_Window_Title, "Cray-1's Control",
		MUIA_HelpNode, "Main_Window",
		MUIA_Window_ID, MAKE_ID('0', 'W', 'I', 'N'),
		WindowContents, MainWindow_Root_Group,
	End;

	Object->TaskInfo_Status_Bar = TextObject,
		MUIA_Background, MUII_TextBack,
		MUIA_Frame, MUIV_Frame_Text,
		MUIA_Text_Contents, Object->STR_TaskInfo_Status_Bar,
		MUIA_Text_SetMin, TRUE,
	End;

	Object->TaskInfo_Struct_List = FloattextObject,
		MUIA_Frame, MUIV_Frame_InputList,
	End;

	Object->TaskInfo_Struct_List = ListviewObject,
		MUIA_HelpNode, "TaskInfo_Struct_List",
		MUIA_Listview_Input, TRUE,
		MUIA_Listview_List, Object->TaskInfo_Struct_List,
	End;

	Object->TaskInfo_Struct_SaveTask = SimpleButton("Save Task");

	Object->TaskInfo_Struct_HardCopy = SimpleButton("Hard Copy");

	TaskInfo_Struct_Buttons_Group = GroupObject,
		MUIA_HelpNode, "TaskInfo_Struct_Buttons_Group",
		MUIA_Weight, 25,
		MUIA_Group_Columns, 2,
		Child, Object->TaskInfo_Struct_SaveTask,
		Child, Object->TaskInfo_Struct_HardCopy,
	End;

	TaskInfo_Structure_Page_Group = GroupObject,
		MUIA_HelpNode, "TaskInfo_Structure_Page_Group",
		Child, Object->TaskInfo_Struct_List,
		Child, TaskInfo_Struct_Buttons_Group,
	End;

	Object->TaskInfo_Windows_List = ListObject,
		MUIA_Frame, MUIV_Frame_InputList,
	End;

	Object->TaskInfo_Windows_List = ListviewObject,
		MUIA_HelpNode, "TaskInfo_Windows_List",
		MUIA_Listview_MultiSelect, MUIV_Listview_MultiSelect_Default,
		MUIA_Listview_Input, TRUE,
		MUIA_Listview_List, Object->TaskInfo_Windows_List,
	End;

	Object->TaskInfo_Window_Close = SimpleButton("Close Window");

	Object->TaskInfo_Window_Open = SimpleButton("Open Window");

	Object->TaskInfo_Window_Sleep = SimpleButton("Iconifiy Window");

	Object->TaskInfo_Window_ChangeAttribs = SimpleButton("Change Attri_butes");

	Object->TaskInfo_Window_Move = SimpleButton("Move Window");

	Object->TaskInfo_Window_HardCopy = SimpleButton("Hard Copy");

	TaskInfo_Windows_Buttons_Group = GroupObject,
		MUIA_HelpNode, "TaskInfo_Windows_Buttons_Group",
		MUIA_Weight, 25,
		MUIA_Group_Columns, 2,
		Child, Object->TaskInfo_Window_Close,
		Child, Object->TaskInfo_Window_Open,
		Child, Object->TaskInfo_Window_Sleep,
		Child, Object->TaskInfo_Window_ChangeAttribs,
		Child, Object->TaskInfo_Window_Move,
		Child, Object->TaskInfo_Window_HardCopy,
	End;

	TaskInfo_Window_Page_Group = GroupObject,
		MUIA_HelpNode, "TaskInfo_Window_Page_Group",
		Child, Object->TaskInfo_Windows_List,
		Child, TaskInfo_Windows_Buttons_Group,
	End;

	Object->TaskInfo_Port_List = ListObject,
		MUIA_Frame, MUIV_Frame_InputList,
	End;

	Object->TaskInfo_Port_List = ListviewObject,
		MUIA_HelpNode, "TaskInfo_Port_List",
		MUIA_Listview_MultiSelect, MUIV_Listview_MultiSelect_Default,
		MUIA_Listview_Input, TRUE,
		MUIA_Listview_List, Object->TaskInfo_Port_List,
	End;

	Object->TaskInfo_Port_Close = SimpleButton("Close Port");

	Object->TaskInfo_Port_Monitor = SimpleButton("Monitor Port");

	TaskInfo_Ports_Buttons_Group = GroupObject,
		MUIA_HelpNode, "TaskInfo_Ports_Buttons_Group",
		MUIA_Group_Columns, 2,
		Child, Object->TaskInfo_Port_Close,
		Child, Object->TaskInfo_Port_Monitor,
	End;

	TaskInfo_Ports_Page_Group = GroupObject,
		MUIA_HelpNode, "TaskInfo_Ports_Page_Group",
		Child, Object->TaskInfo_Port_List,
		Child, TaskInfo_Ports_Buttons_Group,
	End;

	Object->TaskInfo_Interrupt_List = ListObject,
		MUIA_Frame, MUIV_Frame_InputList,
	End;

	Object->TaskInfo_Interrupt_List = ListviewObject,
		MUIA_HelpNode, "TaskInfo_Interrupt_List",
		MUIA_Listview_MultiSelect, MUIV_Listview_MultiSelect_Default,
		MUIA_Listview_Input, TRUE,
		MUIA_Listview_List, Object->TaskInfo_Interrupt_List,
	End;

	Object->TaskInfo_Interrupt_Mask = SimpleButton("Mask Interrupt");

	Object->TaskInfo_Interrupt_Remove = SimpleButton("Remove Interrupt");

	Object->TaskInfo_Interrupt_SaveCode = SimpleButton("Save Interrupt Code");

	Object->TaskInfo_Interrupt_Activate = SimpleButton("Run Interrupt");

	TaskInfo_Interrupt_Buttons_Group = GroupObject,
		MUIA_HelpNode, "TaskInfo_Interrupt_Buttons_Group",
		MUIA_Group_Columns, 2,
		Child, Object->TaskInfo_Interrupt_Mask,
		Child, Object->TaskInfo_Interrupt_Remove,
		Child, Object->TaskInfo_Interrupt_SaveCode,
		Child, Object->TaskInfo_Interrupt_Activate,
	End;

	TaskInfo_Interrupts_Page_Group = GroupObject,
		MUIA_HelpNode, "TaskInfo_Interrupts_Page_Group",
		Child, Object->TaskInfo_Interrupt_List,
		Child, TaskInfo_Interrupt_Buttons_Group,
	End;

	Object->TaskInfo_Trace_List = FloattextObject,
		MUIA_Frame, MUIV_Frame_InputList,
	End;

	Object->TaskInfo_Trace_List = ListviewObject,
		MUIA_HelpNode, "TaskInfo_Trace_List",
		MUIA_Listview_MultiSelect, MUIV_Listview_MultiSelect_Default,
		MUIA_Listview_Input, TRUE,
		MUIA_Listview_List, Object->TaskInfo_Trace_List,
	End;

	Object->TaskInfo_Trace_Start = SimpleButton("Start Trace");

	Object->TaskInfo_Trace_End = SimpleButton("End Trace");

	Object->TaskInfo_Trace_Options = SimpleButton("Trace Options");

	Object->TaskInfo_Trace_HardCopy = SimpleButton("Hard Copy");

	TaskInfo_Trace_Buttons_Group = GroupObject,
		MUIA_HelpNode, "TaskInfo_Trace_Buttons_Group",
		MUIA_Group_Columns, 2,
		Child, Object->TaskInfo_Trace_Start,
		Child, Object->TaskInfo_Trace_End,
		Child, Object->TaskInfo_Trace_Options,
		Child, Object->TaskInfo_Trace_HardCopy,
	End;

	TaskInfo_Trace_Page_Group = GroupObject,
		MUIA_HelpNode, "TaskInfo_Trace_Page_Group",
		Child, Object->TaskInfo_Trace_List,
		Child, TaskInfo_Trace_Buttons_Group,
	End;

	TaskInfo_Register_Group = RegisterObject,
		MUIA_Register_Titles, Object->STR_TaskInfo_Register_Group,
		MUIA_HelpNode, "TaskInfo_Register_Group",
		Child, TaskInfo_Structure_Page_Group,
		Child, TaskInfo_Window_Page_Group,
		Child, TaskInfo_Ports_Page_Group,
		Child, TaskInfo_Interrupts_Page_Group,
		Child, TaskInfo_Trace_Page_Group,
	End;

	TaskInfo_Root_Group = GroupObject,
		Child, Object->TaskInfo_Status_Bar,
		Child, TaskInfo_Register_Group,
	End;

	Object->Task_Info_Window = WindowObject,
		MUIA_Window_Title, "Task Information",
		MUIA_Window_ID, MAKE_ID('1', 'W', 'I', 'N'),
		WindowContents, TaskInfo_Root_Group,
	End;

	Object->Dissassembler_Status_Bar = TextObject,
		MUIA_Background, MUII_TextBack,
		MUIA_Frame, MUIV_Frame_Text,
		MUIA_Text_Contents, Object->STR_Dissassembler_Status_Bar,
		MUIA_Text_SetMin, TRUE,
	End;

	Object->Dissassembler_Output_Float = FloattextObject,
		MUIA_Frame, MUIV_Frame_InputList,
	End;

	Object->Dissassembler_Output_Float = ListviewObject,
		MUIA_HelpNode, "Dissassembler_Output_Float",
		MUIA_Listview_Input, TRUE,
		MUIA_Listview_List, Object->Dissassembler_Output_Float,
	End;

	Object->Dissassembler_Save_ASCII = SimpleButton("Save ASCII");

	Object->Dissassembler_Save_Binary = SimpleButton("Save _Binary");

	Object->Dissassembler_Save_Source = SimpleButton("Save Source");

	Object->Dissassembler_Set_Range = SimpleButton("Set Range");

	Object->Dissassembler_Set_Break = SimpleButton("Set _BreakPoint");

	Object->Dissassembler_Rem_Break = SimpleButton("Remove _BreakPoint");

	Object->Dissassembler_Find_ASCII = SimpleButton("Find ASCII");

	Object->Dissassembler_Hard_Copy = SimpleButton("Hard Copy");

	Dissassembler_Button_Group = GroupObject,
		MUIA_HelpNode, "Dissassembler_Button_Group",
		MUIA_Group_Columns, 4,
		Child, Object->Dissassembler_Save_ASCII,
		Child, Object->Dissassembler_Save_Binary,
		Child, Object->Dissassembler_Save_Source,
		Child, Object->Dissassembler_Set_Range,
		Child, Object->Dissassembler_Set_Break,
		Child, Object->Dissassembler_Rem_Break,
		Child, Object->Dissassembler_Find_ASCII,
		Child, Object->Dissassembler_Hard_Copy,
	End;

	Dissassembler_Layout_Group = GroupObject,
		MUIA_HelpNode, "Dissassembler_Layout_Group",
		Child, Object->Dissassembler_Status_Bar,
		Child, Object->Dissassembler_Output_Float,
		Child, Dissassembler_Button_Group,
	End;

	Dissassembler_Root_Group = GroupObject,
		Child, Dissassembler_Layout_Group,
	End;

	Object->Dissassembler_Window = WindowObject,
		MUIA_Window_Title, "Dissassembler",
		MUIA_Window_ID, MAKE_ID('2', 'W', 'I', 'N'),
		WindowContents, Dissassembler_Root_Group,
	End;

	Diss_Req_StartAddress_Label = TextObject,
		MUIA_Text_PreParse, "\033r",
		MUIA_Text_Contents, "Start Address",
		MUIA_Weight, 20,
		MUIA_InnerLeft, 0,
		MUIA_InnerRight, 0,
	End;

	Object->Diss_Req_Start_Address = StringObject,
		MUIA_Frame, MUIV_Frame_String,
		MUIA_HelpNode, "Diss_Req_Start_Address",
		MUIA_String_Accept, "$10123456789xabcdefABCDEF",
		MUIA_String_MaxLen, 10,
	End;

	Diss_Req_EndAddress_Label = TextObject,
		MUIA_Text_PreParse, "\033r",
		MUIA_Text_Contents, "End Address",
		MUIA_Weight, 20,
		MUIA_InnerLeft, 0,
		MUIA_InnerRight, 0,
	End;

	Object->Diss_Req_End_Address = StringObject,
		MUIA_Frame, MUIV_Frame_String,
		MUIA_HelpNode, "Diss_Req_End_Address",
		MUIA_String_Accept, "$10123456789xabcdefABCDEF",
		MUIA_String_MaxLen, 10,
	End;

	Diss_Req_Ranges_Group = GroupObject,
		MUIA_HelpNode, "Diss_Req_Ranges_Group",
		MUIA_Frame, MUIV_Frame_Group,
		MUIA_FrameTitle, "Ranges",
		MUIA_Group_Columns, 2,
		Child, Diss_Req_StartAddress_Label,
		Child, Object->Diss_Req_Start_Address,
		Child, Diss_Req_EndAddress_Label,
		Child, Object->Diss_Req_End_Address,
	End;

	Object->Diss_Req_Amount_Radio = RadioObject,
		MUIA_Frame, MUIV_Frame_Group,
		MUIA_FrameTitle, "Amount",
		MUIA_HelpNode, "Diss_Req_Amount_Radio",
		MUIA_Radio_Entries, Object->Diss_Req_Amount_RadioContent,
	End;

	Diss_Req_Layout_Group = GroupObject,
		MUIA_HelpNode, "Diss_Req_Layout_Group",
		MUIA_Group_Columns, 2,
		Child, Diss_Req_Ranges_Group,
		Child, Object->Diss_Req_Amount_Radio,
	End;

	Object->Diss_Req_Slider = PropObject,
		PropFrame,
		MUIA_HelpNode, "Diss_Req_Slider",
		MUIA_Prop_Entries, 100,
		MUIA_Prop_First, 0,
		MUIA_Prop_Horiz, TRUE,
		MUIA_Prop_Visible, 10,
		MUIA_FixHeight, 8,
	End;

	Object->Diss_Req_Gauge = GaugeObject,
		GaugeFrame,
		MUIA_ShowMe, FALSE,
		MUIA_HelpNode, "Diss_Req_Gauge",
		MUIA_FixHeight, 10,
		MUIA_Gauge_Horiz, TRUE,
		MUIA_Gauge_Max, 100,
	End;

	Diss_Req_Simple_Scale = ScaleObject,
		MUIA_Scale_Horiz, TRUE,
	End;

	Diss_Req_Slider_Group = GroupObject,
		MUIA_HelpNode, "Diss_Req_Slider_Group",
		MUIA_Frame, MUIV_Frame_Group,
		Child, Object->Diss_Req_Slider,
		Child, Object->Diss_Req_Gauge,
		Child, Diss_Req_Simple_Scale,
	End;

	Diss_Req_SaveFile_SaveLabel = Label("Save File");

	Object->STR_Diss_Req_SaveFile_FileName = String("", 80);

	Object->Diss_Req_SaveFile_FileName = PopButton(MUII_PopFile);

	Object->Diss_Req_SaveFile_FileName = PopaslObject,
		MUIA_HelpNode, "Diss_Req_SaveFile_FileName",
		MUIA_Popasl_Type, 0,
		MUIA_Popstring_String, Object->STR_Diss_Req_SaveFile_FileName,
		MUIA_Popstring_Button, Object->Diss_Req_SaveFile_FileName,
	End;

	Object->Diss_Req_SaveFile_Cancel = TextObject,
		ButtonFrame,
		MUIA_Weight, 10,
		MUIA_ControlChar, 'b',
		MUIA_Text_Contents, "Cancel",
		MUIA_Text_PreParse, "\033c",
		MUIA_Text_HiChar, 'b',
		MUIA_HelpNode, "Diss_Req_SaveFile_Cancel",
		MUIA_InputMode, MUIV_InputMode_RelVerify,
	End;

	Object->Diss_Req_SaveFile_Save = SimpleButton("Save");

	Diss_Req_SaveFile_Group = GroupObject,
		MUIA_HelpNode, "Diss_Req_SaveFile_Group",
		MUIA_ShowMe, FALSE,
		MUIA_Group_Columns, 2,
		Child, Diss_Req_SaveFile_SaveLabel,
		Child, Object->Diss_Req_SaveFile_FileName,
		Child, Object->Diss_Req_SaveFile_Cancel,
		Child, Object->Diss_Req_SaveFile_Save,
	End;

	Diss_Req_PrintFile_Image = ImageObject,
		MUIA_Image_Spec, 23,
		MUIA_Frame, MUIV_Frame_ImageButton,
		MUIA_Image_FreeVert, TRUE,
		MUIA_Image_FreeHoriz, TRUE,
		MUIA_FixHeight, 10,
		MUIA_FixWidth, 8,
	End;

	Object->Diss_Req_PrintFile_Print = SimpleButton("Print Out");

	Diss_Req_PrintFile_Group = GroupObject,
		MUIA_HelpNode, "Diss_Req_PrintFile_Group",
		MUIA_ShowMe, FALSE,
		MUIA_Group_Columns, 2,
		Child, Diss_Req_PrintFile_Image,
		Child, Object->Diss_Req_PrintFile_Print,
	End;

	Object->Diss_Req_SetRange_Set = SimpleButton("Cancel");

	Object->Diss_Req_SetRange_Cancel = SimpleButton("Ranges Set");

	Diss_Req_SetRange_Group = GroupObject,
		MUIA_HelpNode, "Diss_Req_SetRange_Group",
		MUIA_ShowMe, FALSE,
		MUIA_Group_Columns, 2,
		Child, Object->Diss_Req_SetRange_Set,
		Child, Object->Diss_Req_SetRange_Cancel,
	End;

	Diss_Req_Search_String_Label = Label("Search String");

	Object->Diss_Req_Search_String_Input = StringObject,
		MUIA_Frame, MUIV_Frame_String,
		MUIA_HelpNode, "Diss_Req_Search_String_Input",
	End;

	Object->Diss_Req_Search_Cancel = TextObject,
		ButtonFrame,
		MUIA_Weight, 20,
		MUIA_ControlChar, 'b',
		MUIA_Text_Contents, "Cancel",
		MUIA_Text_PreParse, "\033c",
		MUIA_Text_HiChar, 'b',
		MUIA_HelpNode, "Diss_Req_Search_Cancel",
		MUIA_InputMode, MUIV_InputMode_RelVerify,
	End;

	Object->Diss_Req_Search_Search = SimpleButton("Search");

	Diss_Req_Search_Group = GroupObject,
		MUIA_HelpNode, "Diss_Req_Search_Group",
		MUIA_ShowMe, FALSE,
		MUIA_Group_Columns, 2,
		Child, Diss_Req_Search_String_Label,
		Child, Object->Diss_Req_Search_String_Input,
		Child, Object->Diss_Req_Search_Cancel,
		Child, Object->Diss_Req_Search_Search,
	End;

	Diss_Req_Output_Group = GroupObject,
		MUIA_HelpNode, "Diss_Req_Output_Group",
		MUIA_Frame, MUIV_Frame_Group,
		Child, Diss_Req_SaveFile_Group,
		Child, Diss_Req_PrintFile_Group,
		Child, Diss_Req_SetRange_Group,
		Child, Diss_Req_Search_Group,
	End;

	Diss_Req_Root_Group = GroupObject,
		Child, Diss_Req_Layout_Group,
		Child, Diss_Req_Slider_Group,
		Child, Diss_Req_Output_Group,
	End;

	Object->Diss_Req_Window = WindowObject,
		MUIA_Window_Title, "Dissassembler Requester",
		MUIA_Window_ID, MAKE_ID('3', 'W', 'I', 'N'),
		WindowContents, Diss_Req_Root_Group,
	End;

	Object->App = ApplicationObject,
		MUIA_Application_Author, "Cray - 1 / A((eSS",
		MUIA_Application_Base, "CRAY",
		MUIA_Application_Title, "Cray-1's Control",
		MUIA_Application_Version, "$VER: Control  01.00 (05.12.95)",
		MUIA_Application_Copyright, "None",
		MUIA_Application_Description, "A System Control Thing",
		MUIA_HelpFile, "Control.guide",
		SubWindow, Object->Main_Window,
		SubWindow, Object->Task_Info_Window,
		SubWindow, Object->Dissassembler_Window,
		SubWindow, Object->Diss_Req_Window,
	End;


	if (!Object->App)
	{
		FreeVec(Object);
		return(NULL);
	}

	DoMethod(Object->Main_Window,
		MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, ID_MainWindow_CloseRequest
		);

	DoMethod(Object->Registered_Pages_Group,
		MUIM_Notify, MUIA_Group_ActivePage, MUIV_EveryTime,
		Object->App,
		2,
		MUIM_Application_ReturnID, MainWindow_PageChange
		);

	DoMethod(Task_Page_Group,
		MUIM_Notify, MUIA_Group_ActivePage, MUIV_EveryTime,
		Object->App,
		2,
		MUIM_Application_ReturnID, MainWindow_ActTaskPage
		);

	DoMethod(Object->MainWindow_Task_List,
		MUIM_Notify, MUIA_Listview_DoubleClick, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, MainWindow_Doubled
		);

	DoMethod(Object->MainWindow_Task_List,
		MUIM_Notify, MUIA_List_Active, MUIV_EveryTime,
		Object->App,
		2,
		MUIM_Application_ReturnID, MainWindow_ChangeActive
		);

	DoMethod(Vectors_Page_Group,
		MUIM_Notify, MUIA_Group_ActivePage, MUIV_EveryTime,
		Object->App,
		2,
		MUIM_Application_ReturnID, MainWindow_ActVectorPage
		);

	DoMethod(Windows_Page_Group,
		MUIM_Notify, MUIA_Group_ActivePage, MUIV_EveryTime,
		Object->App,
		2,
		MUIM_Application_ReturnID, MainWindow_ActWindowPage
		);

	DoMethod(Ports_Page_Group,
		MUIM_Notify, MUIA_Group_ActivePage, MUIV_EveryTime,
		Object->App,
		2,
		MUIM_Application_ReturnID, MainWindow_ActPortPage
		);

	DoMethod(Semaphores_Page_Group,
		MUIM_Notify, MUIA_Group_ActivePage, MUIV_EveryTime,
		Object->App,
		2,
		MUIM_Application_ReturnID, MainWindow_ActSemaphorePage
		);

	DoMethod(Object->MainWindow_Pause_Task,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, MainWindow_PauseTask
		);

	DoMethod(Object->MainWindow_Terminate_Task,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, MainWindow_TerminateTask
		);

	DoMethod(Object->MainWindow_Signal_Task,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, MainWindow_SignalTask
		);

	DoMethod(Object->MainWindow_Trace_Task,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, MainWindow_TraceTask
		);

	DoMethod(Object->MainWindow_Information_Task,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, MainWindow_InfoTask
		);

	DoMethod(Object->Main_Window,
		MUIM_Window_SetCycleChain, Object->Registered_Pages_Group,
		Object->MainWindow_Task_List,
		Object->MainWindow_Pause_Task,
		Object->MainWindow_Terminate_Task,
		Object->MainWindow_Signal_Task,
		Object->MainWindow_Trace_Task,
		Object->MainWindow_Information_Task,
		0
		);

	DoMethod(Object->Task_Info_Window,
		MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
		Object->Task_Info_Window,
		3,
		MUIM_Set, MUIA_Window_Open, FALSE
		);

	DoMethod(Object->TaskInfo_Struct_SaveTask,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_SaveTask
		);

	DoMethod(Object->TaskInfo_Struct_HardCopy,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_HardcopyTask
		);

	DoMethod(Object->TaskInfo_Window_Close,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_CloseWin
		);

	DoMethod(Object->TaskInfo_Window_Open,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_OpenWin
		);

	DoMethod(Object->TaskInfo_Window_Sleep,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_SleepWindow
		);

	DoMethod(Object->TaskInfo_Window_ChangeAttribs,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_ChangeAttrs
		);

	DoMethod(Object->TaskInfo_Window_Move,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_MoveWindow
		);

	DoMethod(Object->TaskInfo_Window_HardCopy,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_HardCopyWin
		);

	DoMethod(Object->TaskInfo_Port_Close,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_ClosePort
		);

	DoMethod(Object->TaskInfo_Port_Monitor,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_MonitorPort
		);

	DoMethod(Object->TaskInfo_Interrupt_Mask,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_MaskInterrupt
		);

	DoMethod(Object->TaskInfo_Interrupt_Remove,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_RemoveInterrupt
		);

	DoMethod(Object->TaskInfo_Interrupt_SaveCode,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_SaveInterrupt
		);

	DoMethod(Object->TaskInfo_Interrupt_Activate,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_RunInterrupt
		);

	DoMethod(Object->TaskInfo_Trace_Start,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_StartTrace
		);

	DoMethod(Object->TaskInfo_Trace_End,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_EndTrace
		);

	DoMethod(Object->TaskInfo_Trace_Options,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_TraceOptions
		);

	DoMethod(Object->TaskInfo_Trace_HardCopy,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, TaskInfo_HardCopyTrace
		);

	DoMethod(Object->Task_Info_Window,
		MUIM_Window_SetCycleChain, Object->TaskInfo_Struct_List,
		Object->TaskInfo_Struct_SaveTask,
		Object->TaskInfo_Struct_HardCopy,
		Object->TaskInfo_Windows_List,
		Object->TaskInfo_Window_Close,
		Object->TaskInfo_Window_Open,
		Object->TaskInfo_Window_Sleep,
		Object->TaskInfo_Window_ChangeAttribs,
		Object->TaskInfo_Window_Move,
		Object->TaskInfo_Window_HardCopy,
		Object->TaskInfo_Port_List,
		Object->TaskInfo_Port_Close,
		Object->TaskInfo_Port_Monitor,
		Object->TaskInfo_Interrupt_List,
		Object->TaskInfo_Interrupt_Mask,
		Object->TaskInfo_Interrupt_Remove,
		Object->TaskInfo_Interrupt_SaveCode,
		Object->TaskInfo_Interrupt_Activate,
		Object->TaskInfo_Trace_List,
		Object->TaskInfo_Trace_Start,
		Object->TaskInfo_Trace_End,
		Object->TaskInfo_Trace_Options,
		Object->TaskInfo_Trace_HardCopy,
		0
		);

	DoMethod(Object->Dissassembler_Window,
		MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
		Object->Diss_Req_Window,
		3,
		MUIM_Set, MUIA_Window_Open, FALSE
		);

	DoMethod(Object->Dissassembler_Window,
		MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
		Object->Dissassembler_Window,
		3,
		MUIM_Set, MUIA_Window_Open, FALSE
		);

	DoMethod(Object->Dissassembler_Save_ASCII,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Diss_Req_SaveFile_Group,
		3,
		MUIM_Set, MUIA_ShowMe, TRUE
		);

	DoMethod(Object->Dissassembler_Save_ASCII,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->Diss_Req_Window,
		3,
		MUIM_Set, MUIA_Window_Open, TRUE
		);

	DoMethod(Object->Dissassembler_Save_ASCII,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->Dissassembler_Window,
		3,
		MUIM_Set, MUIA_Window_Open, FALSE
		);

	DoMethod(Object->Dissassembler_Save_ASCII,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, DissWin_SaveASCII
		);

	DoMethod(Object->Dissassembler_Save_Binary,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Diss_Req_SaveFile_Group,
		3,
		MUIM_Set, MUIA_ShowMe, TRUE
		);

	DoMethod(Object->Dissassembler_Save_Binary,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->Diss_Req_Window,
		3,
		MUIM_Set, MUIA_Window_Open, TRUE
		);

	DoMethod(Object->Dissassembler_Save_Binary,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->Dissassembler_Window,
		3,
		MUIM_Set, MUIA_Window_Open, FALSE
		);

	DoMethod(Object->Dissassembler_Save_Binary,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, DissWin_SaveBinary
		);

	DoMethod(Object->Dissassembler_Save_Source,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Diss_Req_SaveFile_Group,
		3,
		MUIM_Set, MUIA_ShowMe, TRUE
		);

	DoMethod(Object->Dissassembler_Save_Source,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->Diss_Req_Window,
		3,
		MUIM_Set, MUIA_Window_Open, TRUE
		);

	DoMethod(Object->Dissassembler_Save_Source,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->Dissassembler_Window,
		3,
		MUIM_Set, MUIA_Window_Open, FALSE
		);

	DoMethod(Object->Dissassembler_Save_Source,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, DissWin_SaveSource
		);

	DoMethod(Object->Dissassembler_Set_Range,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Diss_Req_SetRange_Group,
		3,
		MUIM_Set, MUIA_ShowMe, TRUE
		);

	DoMethod(Object->Dissassembler_Set_Range,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->Diss_Req_Window,
		3,
		MUIM_Set, MUIA_Window_Open, TRUE
		);

	DoMethod(Object->Dissassembler_Set_Range,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->Dissassembler_Window,
		3,
		MUIM_Set, MUIA_Window_Open, FALSE
		);

	DoMethod(Object->Dissassembler_Set_Range,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, DissWin_SetRange
		);

	DoMethod(Object->Dissassembler_Find_ASCII,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->Dissassembler_Window,
		3,
		MUIM_Set, MUIA_Window_Open, FALSE
		);

	DoMethod(Object->Dissassembler_Find_ASCII,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Diss_Req_Search_Group,
		3,
		MUIM_Set, MUIA_ShowMe, TRUE
		);

	DoMethod(Object->Dissassembler_Find_ASCII,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->Diss_Req_Slider,
		3,
		MUIM_Set, MUIA_ShowMe, FALSE
		);

	DoMethod(Object->Dissassembler_Find_ASCII,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->Diss_Req_Gauge,
		3,
		MUIM_Set, MUIA_ShowMe, TRUE
		);

	DoMethod(Object->Dissassembler_Find_ASCII,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->Diss_Req_Window,
		3,
		MUIM_Set, MUIA_Window_Open, TRUE
		);

	DoMethod(Object->Dissassembler_Find_ASCII,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, DissWin_FindASCII
		);

	DoMethod(Object->Dissassembler_Hard_Copy,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Diss_Req_PrintFile_Group,
		3,
		MUIM_Set, MUIA_ShowMe, TRUE
		);

	DoMethod(Object->Dissassembler_Hard_Copy,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->Diss_Req_Window,
		3,
		MUIM_Set, MUIA_Window_Open, TRUE
		);

	DoMethod(Object->Dissassembler_Hard_Copy,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, DissWin_HardCopy
		);

	DoMethod(Object->Dissassembler_Window,
		MUIM_Window_SetCycleChain, Object->Dissassembler_Output_Float,
		Object->Dissassembler_Save_ASCII,
		Object->Dissassembler_Save_Binary,
		Object->Dissassembler_Save_Source,
		Object->Dissassembler_Set_Range,
		Object->Dissassembler_Set_Break,
		Object->Dissassembler_Rem_Break,
		Object->Dissassembler_Find_ASCII,
		Object->Dissassembler_Hard_Copy,
		0
		);

	DoMethod(Object->Diss_Req_Window,
		MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
		Object->Diss_Req_Window,
		3,
		MUIM_Set, MUIA_Window_Open, FALSE
		);

	DoMethod(Object->Diss_Req_Window,
		MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
		Diss_Req_SaveFile_Group,
		3,
		MUIM_Set, MUIA_ShowMe, FALSE
		);

	DoMethod(Object->Diss_Req_Window,
		MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
		Diss_Req_PrintFile_Group,
		3,
		MUIM_Set, MUIA_ShowMe, FALSE
		);

	DoMethod(Object->Diss_Req_Window,
		MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
		Diss_Req_SetRange_Group,
		3,
		MUIM_Set, MUIA_ShowMe, FALSE
		);

	DoMethod(Object->Diss_Req_Window,
		MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
		Diss_Req_Search_Group,
		3,
		MUIM_Set, MUIA_ShowMe, FALSE
		);

	DoMethod(Object->Diss_Req_Window,
		MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
		Diss_Req_Simple_Scale,
		3,
		MUIM_Set, MUIA_ShowMe, TRUE
		);

	DoMethod(Object->Diss_Req_Window,
		MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
		Object->Diss_Req_Slider,
		3,
		MUIM_Set, MUIA_ShowMe, TRUE
		);

	DoMethod(Object->Diss_Req_Window,
		MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
		Object->Diss_Req_Gauge,
		3,
		MUIM_Set, MUIA_ShowMe, FALSE
		);

	DoMethod(Object->Diss_Req_Window,
		MUIM_Notify, MUIA_Window_CloseRequest, TRUE,
		Object->Dissassembler_Window,
		3,
		MUIM_Set, MUIA_Window_Open, TRUE
		);

	DoMethod(Object->Diss_Req_Amount_Radio,
		MUIM_Notify, MUIA_Radio_Active, MUIV_EveryTime,
		Object->App,
		2,
		MUIM_Application_ReturnID, DissReq_RadioChanged
		);

	DoMethod(Object->Diss_Req_Gauge,
		MUIM_Notify, MUIA_Gauge_Current, MUIV_EveryTime,
		Object->App,
		2,
		MUIM_Application_ReturnID, DissReq_SliderValue
		);

	DoMethod(Object->Diss_Req_PrintFile_Print,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, DissReq_PrintoutRequested
		);

	DoMethod(Object->Diss_Req_SetRange_Set,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, DissReq_SetCanceled
		);

	DoMethod(Object->Diss_Req_SetRange_Cancel,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, DissReq_RangesSet
		);

	DoMethod(Object->Diss_Req_Search_Cancel,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, DissReq_CancelASCII
		);

	DoMethod(Object->Diss_Req_Search_Search,
		MUIM_Notify, MUIA_Pressed, TRUE,
		Object->App,
		2,
		MUIM_Application_ReturnID, DissReq_StartASCII
		);

	DoMethod(Object->Diss_Req_Window,
		MUIM_Window_SetCycleChain, Object->Diss_Req_Start_Address,
		Object->Diss_Req_End_Address,
		Object->Diss_Req_Amount_Radio,
		Object->Diss_Req_Slider,
		Object->Diss_Req_SaveFile_FileName,
		Object->Diss_Req_SaveFile_Cancel,
		Object->Diss_Req_SaveFile_Save,
		Object->Diss_Req_PrintFile_Print,
		Object->Diss_Req_SetRange_Set,
		Object->Diss_Req_SetRange_Cancel,
		Object->Diss_Req_Search_String_Input,
		Object->Diss_Req_Search_Cancel,
		Object->Diss_Req_Search_Search,
		0
		);

	set(Object->Main_Window,
		MUIA_Window_Open, TRUE
		);


	return(Object);
}

void DisposeApp(struct ObjApp * Object)
{
	MUI_DisposeObject(Object->App);
	FreeVec(Object);
}
