|
OpenCPN Partial API docs
|
#include <wx/artprov.h>#include <wx/dialog.h>#include <wx/sizer.h>#include <wx/statbmp.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.
Functions | |
| 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) |
Variables | |
| bool | g_bresponsive |
| Flag to control adaptive UI scaling. | |
| OCPNPlatform * | g_Platform |
| int | g_GUIScaleFactor |
Implements gui_lib.h.
Definition in file gui_lib.cpp.
| 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.
| item | UI element identifier (e.g., "AISTargetAlert", "StatusBar") |
Definition at line 83 of file gui_lib.cpp.
| 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.
| item | UI element identifier (e.g., "AISTargetAlert", "StatusBar") |
| default_size | Optional base font size in points. 0 uses platform default. |
Definition at line 54 of file gui_lib.cpp.
| int OCPNMessageBox | ( | wxWindow * | parent, |
| const wxString & | message, | ||
| const wxString & | caption, | ||
| int | style, | ||
| int | timeout_sec, | ||
| int | x, | ||
| int | y ) |
Definition at line 110 of file gui_lib.cpp.
|
extern |
Flag to control adaptive UI scaling.
When true, OpenCPN will automatically maximize the application window if the pixel density suggests a touch-friendly device.
This helps ensure better usability on mobile and tablet devices by providing a full-screen interface optimized for touch interaction.
Definition at line 659 of file ocpn_app.cpp.
|
extern |
Definition at line 396 of file ocpn_app.cpp.
|
extern |
Definition at line 253 of file ocpn_app.cpp.