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.
 
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 72 of file base_platform.h.

Member Function Documentation

◆ CloseLogFile()

void AbstractPlatform::CloseLogFile ( void  )

Definition at line 706 of file base_platform.cpp.

◆ DefaultPrivateDataDir()

wxString & AbstractPlatform::DefaultPrivateDataDir ( )

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

Definition at line 314 of file base_platform.cpp.

◆ DetectOSDetail()

bool AbstractPlatform::DetectOSDetail ( OCPN_OSDetail detail)
protected

Definition at line 480 of file base_platform.cpp.

◆ GetConfigFileName()

wxString & AbstractPlatform::GetConfigFileName ( )

Definition at line 582 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 825 of file base_platform.cpp.

◆ GetDisplayDPmm()

virtual double AbstractPlatform::GetDisplayDPmm ( )
inlinevirtual

Definition at line 132 of file base_platform.h.

◆ getDisplaySize()

virtual wxSize AbstractPlatform::getDisplaySize ( )
inlinevirtual

Reimplemented in OCPNPlatform.

Definition at line 130 of file base_platform.h.

◆ GetDisplaySizeMM()

virtual double AbstractPlatform::GetDisplaySizeMM ( )
inlinevirtual

Reimplemented in OCPNPlatform.

Definition at line 131 of file base_platform.h.

◆ GetExePath()

wxString & AbstractPlatform::GetExePath ( )

Definition at line 229 of file base_platform.cpp.

◆ GetHomeDir()

wxString & AbstractPlatform::GetHomeDir ( )

Definition at line 190 of file base_platform.cpp.

◆ GetLargeLogMessage()

wxString & AbstractPlatform::GetLargeLogMessage ( void  )
inline

Definition at line 125 of file base_platform.h.

◆ GetLogFileName()

wxString & AbstractPlatform::GetLogFileName ( )
inline

Definition at line 116 of file base_platform.h.

◆ GetLogFilePtr()

FILE * AbstractPlatform::GetLogFilePtr ( )
inline

Definition at line 126 of file base_platform.h.

◆ GetOSDetail()

OCPN_OSDetail * AbstractPlatform::GetOSDetail ( )
inline

Definition at line 121 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 713 of file base_platform.cpp.

◆ GetPluginDir()

wxString & AbstractPlatform::GetPluginDir ( )

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

Definition at line 411 of file base_platform.cpp.

◆ GetPluginDirPtr()

wxString * AbstractPlatform::GetPluginDirPtr ( )

Definition at line 436 of file base_platform.cpp.

◆ GetPrivateDataDir()

wxString & AbstractPlatform::GetPrivateDataDir ( )

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

Definition at line 301 of file base_platform.cpp.

◆ GetPrivateDataDirPtr()

wxString * AbstractPlatform::GetPrivateDataDirPtr ( )

Legacy compatibility syntactic sugar for GetPrivateDataDir().

Definition at line 243 of file base_platform.cpp.

◆ GetSelectRadiusPix()

unsigned int AbstractPlatform::GetSelectRadiusPix ( )
virtual

Definition at line 833 of file base_platform.cpp.

◆ GetSharedDataDir()

wxString & AbstractPlatform::GetSharedDataDir ( )

Definition at line 248 of file base_platform.cpp.

◆ GetSharedDataDirPtr()

wxString * AbstractPlatform::GetSharedDataDirPtr ( )

Definition at line 238 of file base_platform.cpp.

◆ GetStdPaths()

wxStandardPaths & AbstractPlatform::GetStdPaths ( )

Definition at line 167 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 352 of file base_platform.cpp.

◆ GetWritableDocumentsDir()

wxString AbstractPlatform::GetWritableDocumentsDir ( )

Definition at line 468 of file base_platform.cpp.

◆ HideBusySpinner()

void AbstractPlatform::HideBusySpinner ( void  )
static

Definition at line 778 of file base_platform.cpp.

◆ isFlatpacked()

bool AbstractPlatform::isFlatpacked ( )
inline

Definition at line 118 of file base_platform.h.

◆ isPlatformCapable()

bool AbstractPlatform::isPlatformCapable ( int  flag)

Definition at line 441 of file base_platform.cpp.

◆ NormalizePath()

wxString AbstractPlatform::NormalizePath ( const wxString &  full_path)

Definition at line 176 of file base_platform.cpp.

◆ ShowBusySpinner()

void AbstractPlatform::ShowBusySpinner ( void  )
static

Definition at line 762 of file base_platform.cpp.

Member Data Documentation

◆ flog

FILE* AbstractPlatform::flog
protected

Definition at line 168 of file base_platform.h.

◆ large_log_message

wxString AbstractPlatform::large_log_message
protected

Definition at line 170 of file base_platform.h.

◆ m_bdisableWindowsDisplayEnum

bool AbstractPlatform::m_bdisableWindowsDisplayEnum
protected

Definition at line 178 of file base_platform.h.

◆ m_config_file_name

wxString AbstractPlatform::m_config_file_name
protected

Definition at line 162 of file base_platform.h.

◆ m_default_private_datadir

wxString AbstractPlatform::m_default_private_datadir
protected

Definition at line 155 of file base_platform.h.

◆ m_displaySizeMMOverride

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

Definition at line 172 of file base_platform.h.

◆ m_exePath

wxString AbstractPlatform::m_exePath
protected

Definition at line 160 of file base_platform.h.

◆ m_homeDir

wxString AbstractPlatform::m_homeDir
protected

Definition at line 159 of file base_platform.h.

◆ m_isBusy

bool AbstractPlatform::m_isBusy = false
staticprotected

Definition at line 179 of file base_platform.h.

◆ m_isFlatpacked

bool AbstractPlatform::m_isFlatpacked
protected

Definition at line 158 of file base_platform.h.

◆ m_monitorHeight

int AbstractPlatform::m_monitorHeight
protected

Definition at line 177 of file base_platform.h.

◆ m_monitorWidth

int AbstractPlatform::m_monitorWidth
protected

Definition at line 177 of file base_platform.h.

◆ m_old_logger

wxLog* AbstractPlatform::m_old_logger
protected

Definition at line 169 of file base_platform.h.

◆ m_osDetail

OCPN_OSDetail* AbstractPlatform::m_osDetail
protected

Definition at line 166 of file base_platform.h.

◆ m_pluginDataPath

wxString AbstractPlatform::m_pluginDataPath
protected

Definition at line 163 of file base_platform.h.

◆ m_PluginsDir

wxString AbstractPlatform::m_PluginsDir
protected

Definition at line 157 of file base_platform.h.

◆ m_PrivateDataDir

wxString AbstractPlatform::m_PrivateDataDir
protected

Definition at line 156 of file base_platform.h.

◆ m_SData_Dir

wxString AbstractPlatform::m_SData_Dir
protected

Definition at line 161 of file base_platform.h.

◆ mlog_file

wxString AbstractPlatform::mlog_file
protected

Definition at line 164 of file base_platform.h.


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