5 implementations of IKeyboardToolTip
System.Windows.Forms (5)
System\Windows\Forms\Control.cs (1)
49IKeyboardToolTip,
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)
5229ToolStripControlHost is IKeyboardToolTip host 5507=> ((IKeyboardToolTip?)ToolStripControlHost)?.GetNeighboringToolsRectangles() ?? GetOwnNeighboringToolsRectangles(); 12715bool IKeyboardToolTip.CanShowToolTipsNow() => 12716IsHandleCreated && Visible && (ToolStripControlHost is not IKeyboardToolTip toolTip || toolTip.CanShowToolTipsNow()); 12718Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => GetToolNativeScreenRectangle(); 12720IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() => GetNeighboringToolsRectangles(); 12722bool IKeyboardToolTip.IsHoveredWithMouse() => IsHoveredWithMouse(); 12724bool IKeyboardToolTip.HasRtlModeEnabled() => 12727bool IKeyboardToolTip.AllowsToolTip() => 12728(ToolStripControlHost is not IKeyboardToolTip toolTip || toolTip.AllowsToolTip()) && AllowsKeyboardToolTip(); 12730IWin32Window IKeyboardToolTip.GetOwnerWindow() => this; 12732void IKeyboardToolTip.OnHooked(ToolTip toolTip) => OnKeyboardToolTipHook(toolTip); 12734void IKeyboardToolTip.OnUnhooked(ToolTip toolTip) => OnKeyboardToolTipUnhook(toolTip); 12736string? IKeyboardToolTip.GetCaptionForTool(ToolTip toolTip) => GetCaptionForTool(toolTip); 12738bool IKeyboardToolTip.ShowsOwnToolTip() => 12739(ToolStripControlHost is not IKeyboardToolTip toolTip || toolTip.ShowsOwnToolTip()) && ShowsOwnKeyboardToolTip(); 12741bool IKeyboardToolTip.IsBeingTabbedTo() => AreCommonNavigationalKeysDown(); 12743bool IKeyboardToolTip.AllowsChildrenToShowToolTips() => AllowsChildrenToShowToolTips(); 12770neighboringControlsRectangles.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)
3540bool IKeyboardToolTip.CanShowToolTipsNow() 3541=> Visible && _parent is not null && ((IKeyboardToolTip)_parent).AllowsChildrenToShowToolTips(); 3543Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => AccessibilityObject.Bounds; 3545IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() 3561neighbors.Add(((IKeyboardToolTip)items[previousIndex]).GetNativeScreenRectangle()); 3567neighbors.Add(((IKeyboardToolTip)items[nextIndex]).GetNativeScreenRectangle()); 3581neighbors.Add(((IKeyboardToolTip)dropDown.OwnerItem).GetNativeScreenRectangle()); 3587bool IKeyboardToolTip.IsHoveredWithMouse() 3588=> ((IKeyboardToolTip)this).GetNativeScreenRectangle().Contains(Control.MousePosition); 3590bool IKeyboardToolTip.HasRtlModeEnabled() 3591=> _parent is not null && ((IKeyboardToolTip)_parent).HasRtlModeEnabled(); 3593bool IKeyboardToolTip.AllowsToolTip() => true; 3595IWin32Window IKeyboardToolTip.GetOwnerWindow() 3601void IKeyboardToolTip.OnHooked(ToolTip toolTip) => OnKeyboardToolTipHook(toolTip); 3603void IKeyboardToolTip.OnUnhooked(ToolTip toolTip) => OnKeyboardToolTipUnhook(toolTip); 3605string? IKeyboardToolTip.GetCaptionForTool(ToolTip toolTip) => ToolTipText; 3607bool IKeyboardToolTip.ShowsOwnToolTip() => true; 3609bool IKeyboardToolTip.IsBeingTabbedTo() => IsBeingTabbedTo(); 3611bool 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;