Exemple #1
0
        public Tab(Tabstrip parent, string label, TabPosition tabPosition)
        {
            this.parent = parent;
            this.Label  = label;

            layout = PangoUtil.CreateLayout(parent);
            layout.FontDescription = FontService.SansFont.CopyModified(Styles.FontScale11);
            layout.SetText(label);
            layout.Alignment = Pango.Alignment.Center;
            layout.GetPixelSize(out w, out h);

            if (IsSeparator)
            {
                w = SpacerWidth * 2;
            }

            this.TabPosition = tabPosition;

            if (AccessibilityElementProxy.Enabled)
            {
                Accessible = AccessibilityElementProxy.ButtonElementProxy();
                Accessible.SetRole(AtkCocoa.Roles.AXRadioButton, "tab");
                Accessible.Title         = label;
                Accessible.GtkParent     = parent;
                Accessible.Identifier    = "Tabstrip.Tab";
                Accessible.PerformPress += OnTabPressed;
            }
        }
Exemple #2
0
 PathEntry()
 {
     //Accessible = new AtkCocoaHelper.AccessibilityElementButtonProxy ();
     Accessible               = AccessibilityElementProxy.ButtonElementProxy();
     Accessible.Identifier    = "Breadcrumb";
     Accessible.PerformPress += OnPerformShowMenu;
 }
Exemple #3
0
        internal DockNotebookTab(DockNotebook notebook, TabStrip strip)
        {
            if (AccessibilityElementProxy.Enabled)
            {
                Accessible = AccessibilityElementProxy.ButtonElementProxy();
                Accessible.PerformPress += OnPressTab;
                // FIXME Should Role descriptions be translated?
                Accessible.SetRole(AtkCocoa.Roles.AXRadioButton, "tab");
                Accessible.GtkParent        = strip;
                Accessible.PerformShowMenu += OnShowMenu;
                Accessible.Identifier       = "DockNotebook.Tab";

                CloseButtonAccessible = AccessibilityElementProxy.ButtonElementProxy();
                CloseButtonAccessible.PerformPress += OnPressCloseButton;
                CloseButtonAccessible.SetRole(AtkCocoa.Roles.AXButton);
                CloseButtonAccessible.GtkParent        = strip;
                CloseButtonAccessible.PerformShowMenu += OnCloseButtonShowMenu;
                CloseButtonAccessible.Title            = Core.GettextCatalog.GetString("Close document");
                CloseButtonAccessible.Identifier       = "DockNotebook.Tab.CloseButton";
                Accessible.AddAccessibleChild(CloseButtonAccessible);
            }

            this.notebook = notebook;
            this.strip    = strip;
        }
Exemple #4
0
            public AuthorSectionAccessible(BlameRenderer widget, int line, Annotation ann, double y1, double y2)
            {
                if (widget is null)
                {
                    throw new ArgumentNullException(nameof(widget));
                }
                if (ann is null)
                {
                    throw new ArgumentNullException(nameof(ann));
                }

                Accessible           = AccessibilityElementProxy.ButtonElementProxy();
                Accessible.GtkParent = widget;

                Accessible.SetRole(AtkCocoa.Roles.AXMenuButton);
                Accessible.Title = GettextCatalog.GetString("Authors Overview");

                string msg = widget.GetCommitMessage(line, false);

                Accessible.Label         = GettextCatalog.GetString("Author {0} Date {1} Revision {2} Message {3}", ann.Author, ann.Date, widget.TruncRevision(ann.Text), msg);
                Accessible.PerformPress += Accessible_PerformPress;
                int y = (int)y1;
                int h = (int)(y2 - y1);

                Accessible.FrameInGtkParent = new Rectangle(0, y, widget.Allocation.Width, h);
                var cocoaY = widget.Allocation.Height - y - h;

                Accessible.FrameInParent = new Rectangle(0, cocoaY, widget.Allocation.Width, h);
                this.widget     = widget;
                this.annotation = ann;
                this.y          = (int)y2;
            }
Exemple #5
0
        public void Dispose()
        {
            margin  = null;
            editor  = null;
            segment = null;

            Accessible.PerformPress -= PerformPress;
            Accessible = null;
        }
Exemple #6
0
 public void Dispose()
 {
     if (Accessible == null)
     {
         return;
     }
     Accessible.PerformPress -= Accessible_PerformPress;
     Accessible = null;
 }
Exemple #7
0
        public AccessibilityMarkerProxy(TextLineMarker marker, MonoTextEditor editor, Margin margin)
        {
            Accessible = AccessibilityElementProxy.ButtonElementProxy();
            Accessible.PerformPress += PerformPress;
            Accessible.GtkParent     = margin.Accessible.GtkParent;

            this.marker = marker;
            this.editor = editor;
            this.margin = margin;
        }
            QuickTaskAccessible(QuickTaskStrip parent, QuickTaskOverviewMode parentMode)
            {
                Accessible           = AccessibilityElementProxy.ButtonElementProxy();
                strip                = parent;
                Accessible.GtkParent = parent;

                mode = parentMode;

                Accessible.PerformPress += PerformPress;
            }
Exemple #9
0
        public FoldingAccessible(FoldSegment segment, FoldMarkerMargin margin, MonoTextEditor editor)
        {
            Accessible = AccessibilityElementProxy.ButtonElementProxy();
            Accessible.PerformPress += PerformPress;
            Accessible.GtkParent     = margin.Accessible.GtkParent;

            this.segment = segment;
            this.margin  = margin;
            this.editor  = editor;

            UpdateAccessibility();
        }
            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 #11
0
 public TableRow(PropertyGrid parentGrid)
 {
     this.parentGrid = parentGrid;
     Accessible      = new AccessibilityElementProxy();
     Accessible.SetRole(AtkCocoa.Roles.AXRow);
 }