5 implementations of IKeyboardToolTip
System.Windows.Forms (5)
System\Windows\Forms\Control.cs (1)
47IKeyboardToolTip,
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
17public abstract partial class DataGridViewCell : DataGridViewElement, ICloneable, IDisposable, IKeyboardToolTip
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (1)
8public partial class ListViewItem : IKeyboardToolTip
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
27IKeyboardToolTip
System\Windows\Forms\Controls\TreeView\TreeNode.IKeyboardToolTip.cs (1)
8public partial class TreeNode : IKeyboardToolTip
108 references to IKeyboardToolTip
System.Windows.Forms (108)
System\Windows\Forms\Control.cs (19)
5227ToolStripControlHost is IKeyboardToolTip host 5505=> ((IKeyboardToolTip?)ToolStripControlHost)?.GetNeighboringToolsRectangles() ?? GetOwnNeighboringToolsRectangles(); 12713bool IKeyboardToolTip.CanShowToolTipsNow() => 12714IsHandleCreated && Visible && (ToolStripControlHost is not IKeyboardToolTip toolTip || toolTip.CanShowToolTipsNow()); 12716Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => GetToolNativeScreenRectangle(); 12718IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() => GetNeighboringToolsRectangles(); 12720bool IKeyboardToolTip.IsHoveredWithMouse() => IsHoveredWithMouse(); 12722bool IKeyboardToolTip.HasRtlModeEnabled() => 12725bool IKeyboardToolTip.AllowsToolTip() => 12726(ToolStripControlHost is not IKeyboardToolTip toolTip || toolTip.AllowsToolTip()) && AllowsKeyboardToolTip(); 12728IWin32Window IKeyboardToolTip.GetOwnerWindow() => this; 12730void IKeyboardToolTip.OnHooked(ToolTip toolTip) => OnKeyboardToolTipHook(toolTip); 12732void IKeyboardToolTip.OnUnhooked(ToolTip toolTip) => OnKeyboardToolTipUnhook(toolTip); 12734string? IKeyboardToolTip.GetCaptionForTool(ToolTip toolTip) => GetCaptionForTool(toolTip); 12736bool IKeyboardToolTip.ShowsOwnToolTip() => 12737(ToolStripControlHost is not IKeyboardToolTip toolTip || toolTip.ShowsOwnToolTip()) && ShowsOwnKeyboardToolTip(); 12739bool IKeyboardToolTip.IsBeingTabbedTo() => AreCommonNavigationalKeysDown(); 12741bool IKeyboardToolTip.AllowsChildrenToShowToolTips() => AllowsChildrenToShowToolTips(); 12768neighboringControlsRectangles.Add(((IKeyboardToolTip)control).GetNativeScreenRectangle());
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (14)
51/// Used in <see cref="IKeyboardToolTip.GetNeighboringToolsRectangles"/> method. 289bool IKeyboardToolTip.CanShowToolTipsNow() => Visible && DataGridView is not null; 291Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => AccessibilityObject.Bounds; 302IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() 333bool IKeyboardToolTip.IsHoveredWithMouse() => false; 335bool IKeyboardToolTip.HasRtlModeEnabled() => DataGridView is not null && DataGridView.RightToLeft == RightToLeft.Yes; 337bool IKeyboardToolTip.AllowsToolTip() => true; 339IWin32Window? IKeyboardToolTip.GetOwnerWindow() => DataGridView; 341void IKeyboardToolTip.OnHooked(ToolTip toolTip) => OnKeyboardToolTipHook(toolTip); 345void IKeyboardToolTip.OnUnhooked(ToolTip toolTip) => OnKeyboardToolTipUnhook(toolTip); 349string? IKeyboardToolTip.GetCaptionForTool(ToolTip toolTip) 359bool IKeyboardToolTip.ShowsOwnToolTip() => true; 361bool IKeyboardToolTip.IsBeingTabbedTo() => IsBeingTabbedTo(); 365bool IKeyboardToolTip.AllowsChildrenToShowToolTips() => true;
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (13)
12bool IKeyboardToolTip.AllowsChildrenToShowToolTips() => AllowsToolTips; 14bool IKeyboardToolTip.AllowsToolTip() => true; 16bool IKeyboardToolTip.CanShowToolTipsNow() => AllowsToolTips; 18string IKeyboardToolTip.GetCaptionForTool(ToolTip toolTip) => ToolTipText; 20Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => GetNativeRectangle(Index); 22IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() 64IWin32Window? IKeyboardToolTip.GetOwnerWindow() => _listView; 66bool IKeyboardToolTip.HasRtlModeEnabled() => _listView?.RightToLeft == RightToLeft.Yes; 68bool IKeyboardToolTip.IsBeingTabbedTo() => Control.AreCommonNavigationalKeysDown(); 70bool IKeyboardToolTip.IsHoveredWithMouse() => _listView?.AccessibilityObject.Bounds.Contains(Control.MousePosition) ?? false; 72void IKeyboardToolTip.OnHooked(ToolTip toolTip) => OnKeyboardToolTipHook(toolTip); 74void IKeyboardToolTip.OnUnhooked(ToolTip toolTip) => OnKeyboardToolTipUnhook(toolTip); 76bool IKeyboardToolTip.ShowsOwnToolTip() => AllowsToolTips;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (19)
3542bool IKeyboardToolTip.CanShowToolTipsNow() 3543=> Visible && _parent is not null && ((IKeyboardToolTip)_parent).AllowsChildrenToShowToolTips(); 3545Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => AccessibilityObject.Bounds; 3547IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() 3563neighbors.Add(((IKeyboardToolTip)items[previousIndex]).GetNativeScreenRectangle()); 3569neighbors.Add(((IKeyboardToolTip)items[nextIndex]).GetNativeScreenRectangle()); 3583neighbors.Add(((IKeyboardToolTip)dropDown.OwnerItem).GetNativeScreenRectangle()); 3589bool IKeyboardToolTip.IsHoveredWithMouse() 3590=> ((IKeyboardToolTip)this).GetNativeScreenRectangle().Contains(Control.MousePosition); 3592bool IKeyboardToolTip.HasRtlModeEnabled() 3593=> _parent is not null && ((IKeyboardToolTip)_parent).HasRtlModeEnabled(); 3595bool IKeyboardToolTip.AllowsToolTip() => true; 3597IWin32Window IKeyboardToolTip.GetOwnerWindow() 3603void IKeyboardToolTip.OnHooked(ToolTip toolTip) => OnKeyboardToolTipHook(toolTip); 3605void IKeyboardToolTip.OnUnhooked(ToolTip toolTip) => OnKeyboardToolTipUnhook(toolTip); 3607string? IKeyboardToolTip.GetCaptionForTool(ToolTip toolTip) => ToolTipText; 3609bool IKeyboardToolTip.ShowsOwnToolTip() => true; 3611bool IKeyboardToolTip.IsBeingTabbedTo() => IsBeingTabbedTo(); 3613bool IKeyboardToolTip.AllowsChildrenToShowToolTips() => true;
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (3)
46private readonly WeakReference<IKeyboardToolTip?> _lastFocusedTool = new(null); 165IKeyboardToolTip? lastFocusedTool = KeyboardToolTipStateMachine.Instance.LastFocusedTool; 216if (_lastFocusedTool.TryGetTarget(out IKeyboardToolTip? tool) && tool is not null)
System\Windows\Forms\Controls\TreeView\TreeNode.IKeyboardToolTip.cs (13)
10bool IKeyboardToolTip.AllowsChildrenToShowToolTips() => AllowToolTips; 12bool IKeyboardToolTip.AllowsToolTip() => true; 14bool IKeyboardToolTip.CanShowToolTipsNow() => AllowToolTips; 16string IKeyboardToolTip.GetCaptionForTool(ToolTip toolTip) => ToolTipText; 18Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => RectangleToScreen(Bounds); 20IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() 39IWin32Window? IKeyboardToolTip.GetOwnerWindow() => TreeView; 41bool IKeyboardToolTip.HasRtlModeEnabled() => TreeView?.RightToLeft == RightToLeft.Yes; 43bool IKeyboardToolTip.IsBeingTabbedTo() => Control.AreCommonNavigationalKeysDown(); 45bool IKeyboardToolTip.IsHoveredWithMouse() => TreeView?.AccessibilityObject.Bounds.Contains(Control.MousePosition) ?? false; 47void IKeyboardToolTip.OnHooked(ToolTip toolTip) => OnKeyboardToolTipHook(toolTip); 49void IKeyboardToolTip.OnUnhooked(ToolTip toolTip) => OnKeyboardToolTipUnhook(toolTip); 51bool IKeyboardToolTip.ShowsOwnToolTip() => AllowToolTips;
System\Windows\Forms\ToolTip\KeyboardToolTipStateMachine.cs (20)
45private IKeyboardToolTip? _currentTool; 49private readonly WeakReference<IKeyboardToolTip?> _lastFocusedTool = new(null); 55private SmState Transition(IKeyboardToolTip tool, ToolTip tooltip, SmEvent @event) 85public void Hook(IKeyboardToolTip tool, ToolTip toolTip) 94public void NotifyAboutMouseEnter(IKeyboardToolTip sender) 102private bool IsToolTracked(IKeyboardToolTip sender) 107public void NotifyAboutLostFocus(IKeyboardToolTip sender) 119public void NotifyAboutGotFocus(IKeyboardToolTip sender) 131public void Unhook(IKeyboardToolTip tool, ToolTip toolTip) 145internal IKeyboardToolTip? LastFocusedTool 149if (_lastFocusedTool.TryGetTarget(out IKeyboardToolTip? tool)) 158private SmState HideAndStartWaitingForRefocus(IKeyboardToolTip tool, ToolTip toolTip) 168private SmState StartWaitingForRefocus(IKeyboardToolTip tool) 177Transit(SmEvent.RefocusWaitDelayExpired, (IKeyboardToolTip)toolObject); 184private SmState SetupReshowTimer(IKeyboardToolTip tool, ToolTip toolTip) 193private SmState ShowToolTip(IKeyboardToolTip tool, ToolTip toolTip) 221private SmState SetupInitShowTimer(IKeyboardToolTip tool, ToolTip toolTip) 250private void Transit(SmEvent @event, IKeyboardToolTip source) 328private void StartTracking(IKeyboardToolTip tool, ToolTip toolTip) 333private void StopTracking(IKeyboardToolTip tool, ToolTip toolTip)
System\Windows\Forms\ToolTip\KeyboardToolTipStateMachine.ToolToTipDictionary.cs (3)
12private readonly ConditionalWeakTable<IKeyboardToolTip, WeakReference<ToolTip?>> _table = []; 14public ToolTip? this[IKeyboardToolTip tool] 43public void Remove(IKeyboardToolTip tool, ToolTip toolTip)
System\Windows\Forms\ToolTip\ToolTip.cs (4)
123internal void HideToolTip(IKeyboardToolTip currentTool) 1474internal void ShowKeyboardToolTip(string? text, IKeyboardToolTip tool, int duration) 1547private Point GetOptimalToolTipPosition(IKeyboardToolTip tool, Rectangle toolRectangle, int width, int height) 1595Rectangle topContainerBounds = ((IKeyboardToolTip?)TopLevelControl)?.GetNativeScreenRectangle() ?? Rectangle.Empty;