OpenCPN Partial API docs
Loading...
Searching...
No Matches
AbstractPlatform Class Referenceabstract
Inheritance diagram for AbstractPlatform:
BasePlatform CliPlatform OCPNPlatform

Public Member Functions

wxString & GetPrivateDataDir ()
 Return dir path for opencpn.log, etc., respecting -c cli option.
 
wxString & DefaultPrivateDataDir ()
 Return dir path for opencpn.log, etc., does not respect -c option.
 
wxString * GetPluginDirPtr ()
 
wxString * GetSharedDataDirPtr ()
 
wxString * GetPrivateDataDirPtr ()
 Legacy compatibility syntactic sugar for GetPrivateDataDir().
 
wxString & GetPluginDir ()
 The original in-tree plugin directory, sometimes not user-writable.
 
wxString GetSupplementalLicenseString ()
 Android license details, otherwise "".
 
wxStandardPaths & GetStdPaths ()
 
wxString GetWinPluginBaseDir ()
 Base directory for user writable windows plugins, reflects winPluginDir option, defaults to LOCALAPPDATA%/opencpn.
 
wxString & GetSharedDataDir ()
 
wxString & GetExePath ()
 
wxString & GetHomeDir ()
 
wxString GetWritableDocumentsDir ()
 
wxString GetPluginDataPath ()
 Return ';'-separated list of base directories for plugin data.
 
wxString & GetConfigFileName ()
 
wxString & GetLogFileName ()
 
bool isFlatpacked ()
 
bool isPlatformCapable (int flag)
 
OCPN_OSDetailGetOSDetail ()
 
void CloseLogFile (void)
 
virtual bool InitializeLogFile (void)=0
 
wxString & GetLargeLogMessage (void)
 
FILE * GetLogFilePtr ()
 
wxString NormalizePath (const wxString &full_path)
 
virtual wxSize getDisplaySize ()
 
virtual double GetDisplaySizeMM ()
 
virtual double GetDisplayDPmm ()
 
virtual unsigned int GetSelectRadiusPix ()
 
double GetDisplayDIPMult (wxWindow *win)
 Get the display scaling factor for DPI-aware rendering.
 
virtual int GetSvgStdIconSize (const wxWindow *w, bool touch)=0
 Return icon size roughly corresponding to height of a char in w, tweaked to be "big enough" for touch screens if touch is true.
 

Static Public Member Functions

static void ShowBusySpinner ()
 
static void HideBusySpinner ()
 

Protected Member Functions

bool DetectOSDetail (OCPN_OSDetail *detail)
 

Protected Attributes

wxString m_default_private_datadir
 
wxString m_PrivateDataDir
 
wxString m_PluginsDir
 
bool m_isFlatpacked
 
wxString m_homeDir
 
wxString m_exePath
 
wxString m_SData_Dir
 
wxString m_config_file_name
 
wxString m_pluginDataPath
 
wxString mlog_file
 
OCPN_OSDetailm_osDetail
 
FILE * flog
 
wxLog * m_old_logger
 
wxString large_log_message
 
std::vector< int > m_displaySizeMMOverride
 
int m_monitorWidth
 
int m_monitorHeight
 
bool m_bdisableWindowsDisplayEnum
 

Static Protected Attributes

static bool m_isBusy = false
 

Detailed Description

Definition at line 85 of file base_platform.h.

Member Function Documentation

◆ CloseLogFile()

void AbstractPlatform::CloseLogFile ( void  )

Definition at line 725 of file base_platform.cpp.

◆ DefaultPrivateDataDir()

wxString & AbstractPlatform::DefaultPrivateDataDir ( )

Return dir path for opencpn.log, etc., does not respect -c option.

Definition at line 334 of file base_platform.cpp.

◆ DetectOSDetail()

bool AbstractPlatform::DetectOSDetail ( OCPN_OSDetail detail)
protected

Definition at line 500 of file base_platform.cpp.

◆ GetConfigFileName()

wxString & AbstractPlatform::GetConfigFileName ( )

Definition at line 601 of file base_platform.cpp.

◆ GetDisplayDIPMult()

double AbstractPlatform::GetDisplayDIPMult ( wxWindow *  win)

Get the display scaling factor for DPI-aware rendering.

Note
Only applies scaling on Windows. Other platforms return 1.0 as they handle DPI scaling differently (e.g., macOS uses logical pixels).

Definition at line 844 of file base_platform.cpp.

◆ GetDisplayDPmm()

virtual double AbstractPlatform::GetDisplayDPmm ( )
inlinevirtual

Definition at line 148 of file base_platform.h.

◆ getDisplaySize()

virtual wxSize AbstractPlatform::getDisplaySize ( )
inlinevirtual

Reimplemented in OCPNPlatform.

Definition at line 146 of file base_platform.h.

◆ GetDisplaySizeMM()

virtual double AbstractPlatform::GetDisplaySizeMM ( )
inlinevirtual

Reimplemented in OCPNPlatform.

Definition at line 147 of file base_platform.h.

◆ GetExePath()

wxString & AbstractPlatform::GetExePath ( )

Definition at line 241 of file base_platform.cpp.

◆ GetHomeDir()

wxString & AbstractPlatform::GetHomeDir ( )

Definition at line 202 of file base_platform.cpp.

◆ GetLargeLogMessage()

wxString & AbstractPlatform::GetLargeLogMessage ( void  )
inline

Definition at line 141 of file base_platform.h.

◆ GetLogFileName()

wxString & AbstractPlatform::GetLogFileName ( )
inline

Definition at line 132 of file base_platform.h.

◆ GetLogFilePtr()

FILE * AbstractPlatform::GetLogFilePtr ( )
inline

Definition at line 142 of file base_platform.h.

◆ GetOSDetail()

OCPN_OSDetail * AbstractPlatform::GetOSDetail ( )
inline

Definition at line 137 of file base_platform.h.

◆ GetPluginDataPath()

wxString AbstractPlatform::GetPluginDataPath ( )

Return ';'-separated list of base directories for plugin data.

The list always includes the main installation directory. Some platforms prepends this with user-writable path(s), each of which ending in "opencpn". All paths are guaranteed to exist.

For Linux, return paths ending in .../share.

Definition at line 732 of file base_platform.cpp.

◆ GetPluginDir()

wxString & AbstractPlatform::GetPluginDir ( )

The original in-tree plugin directory, sometimes not user-writable.

Definition at line 431 of file base_platform.cpp.

◆ GetPluginDirPtr()

wxString * AbstractPlatform::GetPluginDirPtr ( )

Definition at line 456 of file base_platform.cpp.

◆ GetPrivateDataDir()

wxString & AbstractPlatform::GetPrivateDataDir ( )

Return dir path for opencpn.log, etc., respecting -c cli option.

Definition at line 321 of file base_platform.cpp.

◆ GetPrivateDataDirPtr()

wxString * AbstractPlatform::GetPrivateDataDirPtr ( )

Legacy compatibility syntactic sugar for GetPrivateDataDir().

Definition at line 255 of file base_platform.cpp.

◆ GetSelectRadiusPix()

unsigned int AbstractPlatform::GetSelectRadiusPix ( )
virtual

Definition at line 852 of file base_platform.cpp.

◆ GetSharedDataDir()

wxString & AbstractPlatform::GetSharedDataDir ( )

Definition at line 260 of file base_platform.cpp.

◆ GetSharedDataDirPtr()

wxString * AbstractPlatform::GetSharedDataDirPtr ( )

Definition at line 250 of file base_platform.cpp.

◆ GetStdPaths()

wxStandardPaths & AbstractPlatform::GetStdPaths ( )

Definition at line 179 of file base_platform.cpp.

◆ GetSupplementalLicenseString()

wxString AbstractPlatform::GetSupplementalLicenseString ( )

Android license details, otherwise "".

Definition at line 286 of file base_platform.cpp.

◆ GetSvgStdIconSize()

virtual int AbstractPlatform::GetSvgStdIconSize ( const wxWindow *  w,
bool  touch 
)
pure virtual

Return icon size roughly corresponding to height of a char in w, tweaked to be "big enough" for touch screens if touch is true.

Implemented in BasePlatform.

◆ GetWinPluginBaseDir()

wxString AbstractPlatform::GetWinPluginBaseDir ( )

Base directory for user writable windows plugins, reflects winPluginDir option, defaults to LOCALAPPDATA%/opencpn.

Definition at line 372 of file base_platform.cpp.

◆ GetWritableDocumentsDir()

wxString AbstractPlatform::GetWritableDocumentsDir ( )

Definition at line 488 of file base_platform.cpp.

◆ HideBusySpinner()

void AbstractPlatform::HideBusySpinner ( void  )
static

Definition at line 797 of file base_platform.cpp.

◆ isFlatpacked()

bool AbstractPlatform::isFlatpacked ( )
inline

Definition at line 134 of file base_platform.h.

◆ isPlatformCapable()

bool AbstractPlatform::isPlatformCapable ( int  flag)

Definition at line 461 of file base_platform.cpp.

◆ NormalizePath()

wxString AbstractPlatform::NormalizePath ( const wxString &  full_path)

Definition at line 188 of file base_platform.cpp.

◆ ShowBusySpinner()

void AbstractPlatform::ShowBusySpinner ( void  )
static

Definition at line 781 of file base_platform.cpp.

Member Data Documentation

◆ flog

FILE* AbstractPlatform::flog
protected

Definition at line 184 of file base_platform.h.

◆ large_log_message

wxString AbstractPlatform::large_log_message
protected

Definition at line 186 of file base_platform.h.

◆ m_bdisableWindowsDisplayEnum

bool AbstractPlatform::m_bdisableWindowsDisplayEnum
protected

Definition at line 194 of file base_platform.h.

◆ m_config_file_name

wxString AbstractPlatform::m_config_file_name
protected

Definition at line 178 of file base_platform.h.

◆ m_default_private_datadir

wxString AbstractPlatform::m_default_private_datadir
protected

Definition at line 171 of file base_platform.h.

◆ m_displaySizeMMOverride

std::vector<int> AbstractPlatform::m_displaySizeMMOverride
protected

Definition at line 188 of file base_platform.h.

◆ m_exePath

wxString AbstractPlatform::m_exePath
protected

Definition at line 176 of file base_platform.h.

◆ m_homeDir

wxString AbstractPlatform::m_homeDir
protected

Definition at line 175 of file base_platform.h.

◆ m_isBusy

bool AbstractPlatform::m_isBusy = false
staticprotected

Definition at line 195 of file base_platform.h.

◆ m_isFlatpacked

bool AbstractPlatform::m_isFlatpacked
protected

Definition at line 174 of file base_platform.h.

◆ m_monitorHeight

int AbstractPlatform::m_monitorHeight
protected

Definition at line 193 of file base_platform.h.

◆ m_monitorWidth

int AbstractPlatform::m_monitorWidth
protected

Definition at line 193 of file base_platform.h.

◆ m_old_logger

wxLog* AbstractPlatform::m_old_logger
protected

Definition at line 185 of file base_platform.h.

◆ m_osDetail

OCPN_OSDetail* AbstractPlatform::m_osDetail
protected

Definition at line 182 of file base_platform.h.

◆ m_pluginDataPath

wxString AbstractPlatform::m_pluginDataPath
protected

Definition at line 179 of file base_platform.h.

◆ m_PluginsDir

wxString AbstractPlatform::m_PluginsDir
protected

Definition at line 173 of file base_platform.h.

◆ m_PrivateDataDir

wxString AbstractPlatform::m_PrivateDataDir
protected

Definition at line 172 of file base_platform.h.

◆ m_SData_Dir

wxString AbstractPlatform::m_SData_Dir
protected

Definition at line 177 of file base_platform.h.

◆ mlog_file

wxString AbstractPlatform::mlog_file
protected

Definition at line 180 of file base_platform.h.


The documentation for this class was generated from the following files: