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