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)); }
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)); }
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); } }