Inheritance: Gtk.DrawingArea, IMapMode
 public PreviewPopup(QuickTaskOverviewMode strip, TextSegment segment, int w, int y)
 {
     this.strip   = strip;
     this.segment = segment;
     this.w       = w;
     this.y       = y;
 }
        void SetupMode()
        {
            if (adj == null || textEditor == null)
            {
                return;
            }

            if (mapMode != null)
            {
                mapMode.Destroy();
                mapMode      = null;
                overviewMode = null;
            }
            if (EnableFancyFeatures)
            {
                switch (ScrollBarMode)
                {
                case ScrollBarMode.Overview:
                    mapMode = overviewMode = new QuickTaskOverviewMode(this);
                    PackStart(mapMode, true, true, 0);
                    break;

                case ScrollBarMode.Minimap:
                    mapMode      = new QuickTaskMiniMapMode(this);
                    overviewMode = null;
                    PackStart(mapMode, true, true, 0);
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }
            ShowAll();
        }
		public QuickTaskMiniMapMode (QuickTaskStrip parent)
		{
			var minimap = new Minimpap (parent);
			PackStart (minimap, true, true, 0);
			
			rightMap = new QuickTaskOverviewMode (parent);
			PackStart (rightMap, true, true, 0);
		}
Exemple #4
0
        public QuickTaskMiniMapMode(QuickTaskStrip parent)
        {
            minimap = new Minimpap(parent);
            PackStart(minimap, true, true, 0);

            rightMap = new QuickTaskOverviewMode(parent);
            PackStart(rightMap, true, true, 0);
        }
            QuickTaskAccessible(QuickTaskStrip parent, QuickTaskOverviewMode parentMode)
            {
                Accessible           = AccessibilityElementProxy.ButtonElementProxy();
                strip                = parent;
                Accessible.GtkParent = parent;

                mode = parentMode;

                Accessible.PerformPress += PerformPress;
            }
        public QuickTaskMiniMapMode(QuickTaskStrip parent)
        {
            minimap = new Minimpap(parent);
            PackStart(minimap, true, true, 0);

            rightMap = new QuickTaskOverviewMode(parent);
            PackStart(rightMap, true, true, 0);
            vadjustment = parent.VAdjustment;

            vadjustment.ValueChanged += RedrawOnVAdjustmentChange;
        }
		public QuickTaskMiniMapMode (QuickTaskStrip parent)
		{
			minimap = new Minimpap (parent);
			PackStart (minimap, true, true, 0);
			
			rightMap = new QuickTaskOverviewMode (parent);
			PackStart (rightMap, true, true, 0);
			vadjustment = parent.VAdjustment;

			vadjustment.ValueChanged += RedrawOnVAdjustmentChange;

		}
            public QuickTaskOverviewAccessible(QuickTaskStrip parentStrip, QuickTaskOverviewMode parentMode)
            {
                Accessible = AccessibilityElementProxy.ButtonElementProxy();

                // Set the accessibility parent as the strip to make the A11y tree easier.
                strip = parentStrip;
                Accessible.GtkParent = parentStrip;

                mode = parentMode;

                var frameInParent = new Gdk.Rectangle(0, 0, strip.Allocation.Width, (int)mode.IndicatorHeight);

                Accessible.FrameInGtkParent = frameInParent;
                Accessible.FrameInParent    = new Gdk.Rectangle(0, strip.Allocation.Height - (int)mode.IndicatorHeight, strip.Allocation.Width, (int)mode.IndicatorHeight);

                Accessible.Identifier = "MainWindow.QuickTaskStrip.Indicator";
                UpdateAccessibilityDetails();

                Accessible.PerformPress += PerformPress;
            }
Exemple #9
0
            public QuickTaskAccessible(QuickTaskStrip parent, QuickTaskOverviewMode parentMode, Usage u) : this(parent, parentMode)
            {
                usage = u;
                task  = null;

                Accessible.Title = u.UsageType.ToString();
                Accessible.Help  = string.Format(GettextCatalog.GetString("Jump to line {0}"), strip.TextEditor.OffsetToLineNumber(u.Offset));

                var line          = mode.TextEditor.OffsetToLineNumber(u.Offset);
                var y             = mode.LineToY(line) - 3.0;
                var frameInParent = new Gdk.Rectangle(0, (int)y, 5, 6);

                Accessible.FrameInGtkParent = frameInParent;

                int   halfParentHeight = strip.Allocation.Height / 2;
                float dy = (float)y - halfParentHeight;

                y = (int)(halfParentHeight - dy);
                Accessible.FrameInParent = new Gdk.Rectangle(0, (int)y, mode.Allocation.Width, 6);
            }
Exemple #10
0
            public QuickTaskAccessible(QuickTaskStrip parent, QuickTaskOverviewMode parentMode, QuickTask t) : this(parent, parentMode)
            {
                task  = t;
                usage = null;

                Accessible.Title = t.Description;
                Accessible.Help  = string.Format(GettextCatalog.GetString("Jump to line {0}"), strip.TextEditor.OffsetToLineNumber(t.Location));

                var line          = mode.TextEditor.OffsetToLineNumber(t.Location);
                var y             = mode.LineToY(line);
                var frameInParent = new Gdk.Rectangle(0, (int)y, mode.Allocation.Width, 2);

                Accessible.FrameInGtkParent = frameInParent;

                int   halfParentHeight = strip.Allocation.Height / 2;
                float dy = (float)y - halfParentHeight;

                y = (int)(halfParentHeight - dy);
                Accessible.FrameInParent = new Gdk.Rectangle(0, (int)y, mode.Allocation.Width, 2);
            }
			public PreviewPopup (QuickTaskOverviewMode strip, TextSegment segment, int w, int y)
			{
				this.strip = strip;
				this.segment = segment;
				this.w = w;
				this.y = y;
			}
 public IdleUpdater(QuickTaskOverviewMode mode, System.Threading.CancellationToken token)
 {
     this.mode  = mode;
     this.token = token;
 }
			public IdleUpdater (QuickTaskOverviewMode mode, System.Threading.CancellationToken token)
			{
				this.mode = mode;
				this.token = token;
			}