5 implementations of IKeyboardToolTip
System.Windows.Forms (5)
System\Windows\Forms\Control.cs (1)
48IKeyboardToolTip,
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)
5188ToolStripControlHost is IKeyboardToolTip host 5466=> ((IKeyboardToolTip?)ToolStripControlHost)?.GetNeighboringToolsRectangles() ?? GetOwnNeighboringToolsRectangles(); 12683bool IKeyboardToolTip.CanShowToolTipsNow() => 12684IsHandleCreated && Visible && (ToolStripControlHost is not IKeyboardToolTip toolTip || toolTip.CanShowToolTipsNow()); 12686Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => GetToolNativeScreenRectangle(); 12688IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() => GetNeighboringToolsRectangles(); 12690bool IKeyboardToolTip.IsHoveredWithMouse() => IsHoveredWithMouse(); 12692bool IKeyboardToolTip.HasRtlModeEnabled() => 12695bool IKeyboardToolTip.AllowsToolTip() => 12696(ToolStripControlHost is not IKeyboardToolTip toolTip || toolTip.AllowsToolTip()) && AllowsKeyboardToolTip(); 12698IWin32Window IKeyboardToolTip.GetOwnerWindow() => this; 12700void IKeyboardToolTip.OnHooked(ToolTip toolTip) => OnKeyboardToolTipHook(toolTip); 12702void IKeyboardToolTip.OnUnhooked(ToolTip toolTip) => OnKeyboardToolTipUnhook(toolTip); 12704string? IKeyboardToolTip.GetCaptionForTool(ToolTip toolTip) => GetCaptionForTool(toolTip); 12706bool IKeyboardToolTip.ShowsOwnToolTip() => 12707(ToolStripControlHost is not IKeyboardToolTip toolTip || toolTip.ShowsOwnToolTip()) && ShowsOwnKeyboardToolTip(); 12709bool IKeyboardToolTip.IsBeingTabbedTo() => AreCommonNavigationalKeysDown(); 12711bool IKeyboardToolTip.AllowsChildrenToShowToolTips() => AllowsChildrenToShowToolTips(); 12738neighboringControlsRectangles.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)
3548bool IKeyboardToolTip.CanShowToolTipsNow() 3549=> Visible && _parent is not null && ((IKeyboardToolTip)_parent).AllowsChildrenToShowToolTips(); 3551Rectangle IKeyboardToolTip.GetNativeScreenRectangle() => AccessibilityObject.Bounds; 3553IList<Rectangle> IKeyboardToolTip.GetNeighboringToolsRectangles() 3569neighbors.Add(((IKeyboardToolTip)items[previousIndex]).GetNativeScreenRectangle()); 3575neighbors.Add(((IKeyboardToolTip)items[nextIndex]).GetNativeScreenRectangle()); 3589neighbors.Add(((IKeyboardToolTip)dropDown.OwnerItem).GetNativeScreenRectangle()); 3595bool IKeyboardToolTip.IsHoveredWithMouse() 3596=> ((IKeyboardToolTip)this).GetNativeScreenRectangle().Contains(Control.MousePosition); 3598bool IKeyboardToolTip.HasRtlModeEnabled() 3599=> _parent is not null && ((IKeyboardToolTip)_parent).HasRtlModeEnabled(); 3601bool IKeyboardToolTip.AllowsToolTip() => true; 3603IWin32Window IKeyboardToolTip.GetOwnerWindow() 3609void IKeyboardToolTip.OnHooked(ToolTip toolTip) => OnKeyboardToolTipHook(toolTip); 3611void IKeyboardToolTip.OnUnhooked(ToolTip toolTip) => OnKeyboardToolTipUnhook(toolTip); 3613string? IKeyboardToolTip.GetCaptionForTool(ToolTip toolTip) => ToolTipText; 3615bool IKeyboardToolTip.ShowsOwnToolTip() => true; 3617bool IKeyboardToolTip.IsBeingTabbedTo() => IsBeingTabbedTo(); 3619bool IKeyboardToolTip.AllowsChildrenToShowToolTips() => true;
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (3)
48private readonly WeakReference<IKeyboardToolTip?> _lastFocusedTool = new(null); 167IKeyboardToolTip? lastFocusedTool = KeyboardToolTipStateMachine.Instance.LastFocusedTool; 218if (_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;