コード例 #1
0
ファイル: BaseWidgetAccessible.cs プロジェクト: dufoli/hyena
 public BaseWidgetAccessible(Gtk.Widget widget)
 {
     this.widget = widget;
     widget.SizeAllocated += OnAllocated;
     widget.Mapped += OnMap;
     widget.Unmapped += OnMap;
     widget.FocusInEvent += OnFocus;
     widget.FocusOutEvent += OnFocus;
     widget.AddNotification ("sensitive", (o, a) => NotifyStateChange (StateType.Sensitive, widget.Sensitive));
     widget.AddNotification ("visible",   (o, a) => NotifyStateChange (StateType.Visible, widget.Visible));
 }
コード例 #2
0
 public BaseWidgetAccessible(Gtk.Widget widget)
 {
     this.widget           = widget;
     widget.SizeAllocated += OnAllocated;
     widget.Mapped        += OnMap;
     widget.Unmapped      += OnMap;
     widget.FocusInEvent  += OnFocus;
     widget.FocusOutEvent += OnFocus;
     widget.AddNotification("sensitive", (o, a) => NotifyStateChange(StateType.Sensitive, widget.Sensitive));
     widget.AddNotification("visible", (o, a) => NotifyStateChange(StateType.Visible, widget.Visible));
 }
コード例 #3
0
        public override void EnableNativeTooltip(GtkWidget widget)
        {
            Xwt.Mac.NSApplicationInitializer.Initialize();

            if (nativeTooltips == null)
            {
                nativeTooltips = new Dictionary <GtkWidget, TooltipData>();
            }

            if (nativeTooltips.ContainsKey(widget))
            {
                return;
            }

            widget.AddNotification("tooltip-text", HandleTooltipTextChanged);
            widget.SizeAllocated += UpdateNativeTooltipText;
            widget.Realized      += UpdateNativeTooltipText;
            widget.Unrealized    += RemoveNativeTooltipOnUnrealized;
            widget.Destroyed     += HandleWidgetDestroyed;
            if (!string.IsNullOrEmpty(widget.TooltipText))
            {
                HandleTooltipTextChanged(widget, EventArgs.Empty);
            }
        }