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