OpenCPN Partial API docs
|
Coordinates tooltip display across OpenCPN components. More...
#include <tooltip.h>
Public Member Functions | |
void | ShowTooltipForWindow (wxWindow *window, const wxString &text, bool hiviz=false) |
Show tooltip for a window using automatic positioning relative to the window. | |
void | ShowTooltipAtPosition (wxWindow *parent, const wxString &text, const wxPoint &position, bool hiviz=false) |
Show tooltip at specified position in absolute screen coordinates (physical pixels). | |
void | HideTooltip () |
Hide the current tooltip. | |
void | HideAllTooltips () |
Hide all tooltips. | |
void | SetColorScheme (ColorScheme cs) |
Set color scheme for all tooltips. | |
void | EnableTooltips (bool enable) |
Enable or disable tooltip system. | |
bool | AreTooltipsEnabled () const |
Check if tooltips are enabled. | |
bool | IsShown () const |
Check if a tooltip is currently shown. | |
void | SetShowDelay (int ms) |
Set delay before showing tooltips. | |
void | SetHideDelay (int ms) |
Set delay before hiding tooltips. | |
Static Public Member Functions | |
static TooltipManager & | Get () |
Get the singleton instance. | |
Coordinates tooltip display across OpenCPN components.
Ensures only one tooltip is shown at a time.
Developer usage:
|
inline |
void TooltipManager::EnableTooltips | ( | bool | enable | ) |
Enable or disable tooltip system.
Definition at line 380 of file tooltip.cpp.
|
static |
Get the singleton instance.
Definition at line 308 of file tooltip.cpp.
void TooltipManager::HideAllTooltips | ( | ) |
Hide all tooltips.
Definition at line 368 of file tooltip.cpp.
void TooltipManager::HideTooltip | ( | ) |
Hide the current tooltip.
Definition at line 362 of file tooltip.cpp.
bool TooltipManager::IsShown | ( | ) | const |
Check if a tooltip is currently shown.
Definition at line 387 of file tooltip.cpp.
void TooltipManager::SetColorScheme | ( | ColorScheme | cs | ) |
Set color scheme for all tooltips.
Definition at line 373 of file tooltip.cpp.
|
inline |
|
inline |
void TooltipManager::ShowTooltipAtPosition | ( | wxWindow * | parent, |
const wxString & | text, | ||
const wxPoint & | position, | ||
bool | hiviz = false |
||
) |
Show tooltip at specified position in absolute screen coordinates (physical pixels).
Position (0,0) represents the top-left corner of the primary display. All coordinates are in physical pixels, which may differ from logical pixels on high-DPI displays. Use this when you need precise control over tooltip placement.
parent | Parent window for the tooltip |
text | Text to display in the tooltip |
position | Absolute screen position in physical pixels where tooltip should appear |
hiviz | Enable high visibility mode for better contrast |
Definition at line 315 of file tooltip.cpp.
void TooltipManager::ShowTooltipForWindow | ( | wxWindow * | window, |
const wxString & | text, | ||
bool | hiviz = false |
||
) |
Show tooltip for a window using automatic positioning relative to the window.
The tooltip is positioned automatically next to the window (typically to the right) with automatic screen boundary detection. This is the recommended method for most use cases.
window | Window to show tooltip for (position calculated automatically) |
text | Text to display in the tooltip |
hiviz | Enable high visibility mode for better contrast |
Definition at line 338 of file tooltip.cpp.