Implements gui_lib.h.
More...
#include <wx/artprov.h>
#include <wx/dialog.h>
#include <wx/sizer.h>
#include <wx/statbmp.h>
#include <wx/statline.h>
#include "model/gui_events.h"
#include "gui_lib.h"
#include "timers.h"
#include "FontMgr.h"
#include "OCPNPlatform.h"
#include "ocpn_plugin.h"
#include "displays.h"
Go to the source code of this file.
|
wxFont * | GetOCPNScaledFont (wxString item, int default_size) |
| Retrieves a font from FontMgr, optionally scaled for physical readability.
|
|
wxFont | GetOCPNGUIScaledFont (wxString item) |
| Retrieves a font optimized for touch and high-resolution interfaces.
|
|
int | OCPNMessageBox (wxWindow *parent, const wxString &message, const wxString &caption, int style, int timeout_sec, int x, int y) |
|
Implements gui_lib.h.
Definition in file gui_lib.cpp.
◆ GetOCPNGUIScaledFont()
wxFont GetOCPNGUIScaledFont |
( |
wxString |
item | ) |
|
Retrieves a font optimized for touch and high-resolution interfaces.
Generates a font specifically tuned for responsive and touch-friendly interfaces, with more aggressive scaling than standard font methods.
- Parameters
-
item | UI element identifier (e.g., "AISTargetAlert", "StatusBar") |
- Returns
- A wxFont object scaled for touch and high-resolution interfaces
- Note
- Ensures minimum physical font size for improved readability
-
Particularly suitable for toolbars, buttons, and touch controls
Definition at line 85 of file gui_lib.cpp.
◆ GetOCPNScaledFont()
wxFont * GetOCPNScaledFont |
( |
wxString |
item, |
|
|
int |
default_size = 0 |
|
) |
| |
Retrieves a font from FontMgr, optionally scaled for physical readability.
Returns a font configured for a specific UI context, scaling based on system settings and preserving readability across different displays.
- Parameters
-
item | UI element identifier (e.g., "AISTargetAlert", "StatusBar") |
default_size | Optional base font size in points. 0 uses platform default. |
- Returns
- Pointer to a dynamically scaled wxFont
- Note
- Font is managed by OpenCPN's central font cache
-
Pointer is shared and should not be deleted by caller
Definition at line 56 of file gui_lib.cpp.
◆ OCPNMessageBox()
int OCPNMessageBox |
( |
wxWindow * |
parent, |
|
|
const wxString & |
message, |
|
|
const wxString & |
caption, |
|
|
int |
style, |
|
|
int |
timeout_sec, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
◆ g_bresponsive
◆ g_GUIScaleFactor
◆ g_Platform