Exemplo n.º 1
0
		public void ShowGotoLineNumberWidget ()
		{
			if (gotoLineNumberWidget == null) {
				DestroyFrames ();
				popupWidgetFrame = new MonoDevelop.Components.RoundedFrame ();
				//searchAndReplaceWidgetFrame.SetFillColor (MonoDevelop.Components.CairoExtensions.GdkColorToCairoColor (widget.TextEditor.ColorStyle.Default.BackgroundColor));
				popupWidgetFrame.SetFillColor (MonoDevelop.Components.CairoExtensions.GdkColorToCairoColor (Style.Background (StateType.Normal)));
				popupWidgetFrame.Show ();
				
				popupWidgetFrame.Child = gotoLineNumberWidget = new GotoLineNumberWidget (inspectEditor, popupWidgetFrame);
				gotoLineNumberWidget.Destroyed += (sender, e) => {
					DestroyFrames ();
					if (inspectEditor.IsRealized)
						inspectEditor.GrabFocus ();
				};
				inspectEditor.AddAnimatedWidget (popupWidgetFrame, 300, Mono.TextEditor.Theatrics.Easing.ExponentialInOut, Blocking.Downstage, inspectEditor.Allocation.Width - 400, -gotoLineNumberWidget.Allocation.Height);
			}
			
			gotoLineNumberWidget.Focus ();
		}
Exemplo n.º 2
0
		void DestroyFrames ()
		{
			if (popupWidgetFrame != null) {
				popupWidgetFrame.Destroy ();
				popupWidgetFrame = null;
				gotoLineNumberWidget = null;
				searchAndReplaceWidget = null;
			}
		}