Colobot
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
CSystemUtilsWindows Class Reference
Inheritance diagram for CSystemUtilsWindows:
Inheritance graph
[legend]

Public Member Functions

void Init () override
 Performs platform-specific initialization.
 
SystemDialogResult SystemDialog (SystemDialogType type, const std::string &title, const std::string &message) override
 Displays a system dialog.
 
std::string GetSaveDir () override
 Returns the save dir location.
 
std::string GetEnvVar (const std::string &name) override
 Returns the environment variable with the given name or an empty string if it does not exist.
 
bool OpenPath (const std::string &path) override
 Opens a path with default file browser.
 
bool OpenWebsite (const std::string &url) override
 Opens a website with default web browser.
 
- Public Member Functions inherited from CSystemUtils
TEST_VIRTUAL SystemDialogResult ConsoleSystemDialog (SystemDialogType type, const std::string &title, const std::string &message)
 Displays a fallback system dialog using console.
 
TEST_VIRTUAL TimeUtils::TimeStamp GetCurrentTimeStamp ()
 Returns a time stamp associated with current time.
 
virtual std::string GetBasePath ()
 Returns the path where the executable binary is located (ends with the path separator)
 
virtual std::string GetDataPath ()
 Returns the data path (containing textures, levels, helpfiles, etc)
 
virtual std::string GetLangPath ()
 Returns the translations path.
 
void Usleep (int usecs)
 Sleep for given amount of microseconds.
 

Static Public Member Functions

static std::string UTF8_Encode (const std::wstring &wstr)
 Converts a wide Unicode string to an UTF8 string.
 
static std::wstring UTF8_Decode (const std::string &str)
 Converts an UTF8 string to a wide Unicode String.
 
- Static Public Member Functions inherited from CSystemUtils
static std::unique_ptr< CSystemUtilsCreate ()
 Creates system utils for specific platform.
 

Member Function Documentation

◆ Init()

void CSystemUtilsWindows::Init ( )
overridevirtual

Performs platform-specific initialization.

Implements CSystemUtils.

◆ SystemDialog()

SystemDialogResult CSystemUtilsWindows::SystemDialog ( SystemDialogType  ,
const std::string &  title,
const std::string &  message 
)
overridevirtual

Displays a system dialog.

Implements CSystemUtils.

◆ GetSaveDir()

std::string CSystemUtilsWindows::GetSaveDir ( )
overridevirtual

Returns the save dir location.

Reimplemented from CSystemUtils.

◆ GetEnvVar()

std::string CSystemUtilsWindows::GetEnvVar ( const std::string &  name)
overridevirtual

Returns the environment variable with the given name or an empty string if it does not exist.

Reimplemented from CSystemUtils.

◆ OpenPath()

bool CSystemUtilsWindows::OpenPath ( const std::string &  path)
overridevirtual

Opens a path with default file browser.

Returns
true if successful

Reimplemented from CSystemUtils.

◆ OpenWebsite()

bool CSystemUtilsWindows::OpenWebsite ( const std::string &  url)
overridevirtual

Opens a website with default web browser.

Returns
true if successful

Reimplemented from CSystemUtils.

◆ UTF8_Encode()

std::string CSystemUtilsWindows::UTF8_Encode ( const std::wstring &  wstr)
static

Converts a wide Unicode string to an UTF8 string.

◆ UTF8_Decode()

std::wstring CSystemUtilsWindows::UTF8_Decode ( const std::string &  str)
static

Converts an UTF8 string to a wide Unicode String.


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