Exemplo n.º 1
0
        public void StartHover(MessageBubbleTextMarker marker, double bubbleX, double bubbleY, double bubbleWidth, bool isReduced)
        {
            CancelHoverTimeout();
            if (removedMarker == marker)
            {
                CurrentSelectedTextMarker = marker;
                return;
            }

            hoverTimeout = GLib.Timeout.Add(200, delegate {
                CurrentSelectedTextMarker = marker;
                editor.QueueDraw();

                DestroyPopoverWindow();

                if (marker.Layouts == null || marker.Layouts.Count < 2 && !isReduced)
                {
                    return(false);
                }
                popoverWindow = new MessageBubblePopoverWindow(this, marker);
                popoverWindow.ShowWindowShadow = true;
                popoverWindow.ShowPopup(editor, new Gdk.Rectangle((int)(bubbleX + editor.TextViewMargin.XOffset), (int)bubbleY, (int)bubbleWidth, (int)editor.LineHeight), PopupPosition.Top);
                return(false);
            });
        }
Exemplo n.º 2
0
 internal void DestroyPopoverWindow()
 {
     if (popoverWindow != null)
     {
         popoverWindow.Destroy();
         popoverWindow = null;
     }
 }
Exemplo n.º 3
0
		void DestroyPopoverWindow ()
		{
			if (popoverWindow != null) {
				popoverWindow.Destroy ();
				popoverWindow = null;
			}
		}
Exemplo n.º 4
0
		public void StartHover (MessageBubbleTextMarker marker, double bubbleX, double bubbleY, double bubbleWidth, bool isReduced)
		{
			CancelHoverTimeout ();
			if (removedMarker == marker) {
				CurrentSelectedTextMarker = marker;
				return;
			}

			hoverTimeout = GLib.Timeout.Add (200, delegate {
				CurrentSelectedTextMarker = marker;
				editor.QueueDraw ();

				DestroyPopoverWindow ();

				if (marker.Layouts.Count < 2 && !isReduced)
					return false;
				popoverWindow = new MessageBubblePopoverWindow (this, marker);
				popoverWindow.ShowPopup (editor, new Gdk.Rectangle ((int)(bubbleX + editor.TextViewMargin.XOffset), (int)bubbleY, (int)bubbleWidth, (int)editor.LineHeight) ,PopupPosition.Top);
				return false;
			});
		}