public BlackboardStageWidget(MainRecognizerWindow parent)
			: base(parent)
		{
			Glade.XML gladeXml = new XML("mathtextrecognizer.glade",
			                             "unassistedStageWidgetBase");
			
			gladeXml.Autoconnect(this);
			
			gladeXml = new XML("mathtextrecognizer.glade",
			                   "blackboardMenu");
			
			gladeXml.Autoconnect(this);
			
			this.Add(unassistedStageWidgetBase);
			
			ocrController = new OCRController();
			ocrController.MessageLogSent += 
				new MessageLogSentHandler(OnControllerMessageLogSent);
			
			ocrController.ProcessFinished += 
				new EventHandler(OnOCRControllerProcessFinished);
			ocrController.NodeBeingProcessed += 
				new NodeBeingProcessedHandler(OnControllerStepDone);
					
			tokenizingController = new TokenizingController();
			tokenizingController.MessageLogSent += 
				new MessageLogSentHandler(OnControllerMessageLogSent);
			tokenizingController.ProcessFinished += 
				new EventHandler(OnTokenizingControllerProcessFinished);
			tokenizingController.NodeBeingProcessed += 
				new NodeBeingProcessedHandler(OnControllerStepDone);
			
			parsingController = new ParsingController();
			parsingController.MessageLogSent += 
				new MessageLogSentHandler(OnControllerMessageLogSent);
			parsingController.Matching += 
				new MatchingHandler(OnControllerStepDone);
			
			parsingController.ProcessFinished +=
				new EventHandler(OnParsingControllerProcessFinished);
			
			InitializeWidgets();
			
			tokenizingFinished = false;
			
			this.ShowAll();
		}
		/// <summary>
		/// <see cref="ParsingStageWidget"/>'s constructor.
		/// </summary>
		/// <param name="window">
		/// The <see cref="MainRecognizerWindow"/> that contains the widget.
		/// </param>
		public ParsingStageWidget(MainRecognizerWindow window) : base(window)
		{
			Glade.XML gladeXml = new XML("mathtextrecognizer.glade",
			                             "parsingStageBaseWidget");
			
			gladeXml.Autoconnect(this);
			
			this.Add(parsingStageBaseWidget);
			
			
			
			InitializeWidgets();
			
			controller = new ParsingController();
			controller.MessageLogSent += 
				new MessageLogSentHandler(OnControllerMessageLogSent);
			
			controller.ProcessFinished += OnControllerProcessFinishedHandler;
			
			controller.Matching += 
				new MatchingHandler(OnControllerMatching);
			
			controller.MatchingFinished += 
				new MatchingFinishedHandler(OnControllerMatchingFinished);
			
			controller.StepDone += 
				new EventHandler(OnControllerStepDone);
			
			controller.TokenMatching +=
				new TokenMatchingHandler(OnControllerTokenMatching);
			
			controller.TokenMatchingFinished+=
				new TokenMatchingFinishedHandler(OnControllerTokenMatchingFinished);
			
			controller.RuleSequenceRestored += 
				new SequenceSetHandler(OnControllerSequenceRestored);
			
			controller.RelatedSequenceSet += 
				new SequenceSetHandler(OnControllerRelatedSequenceSet);
			
		
			this.ShowAll();
		}