#include <PlatformMsw.h>
Inherits cinder::app::Platform.
cinder::app::PlatformMsw::PlatformMsw |
( |
| ) |
|
DataSourceRef cinder::app::PlatformMsw::loadResource |
( |
const fs::path & |
resourcePath, |
|
|
int |
mswID, |
|
|
const std::string & |
mswType |
|
) |
| |
|
overridevirtual |
(MSW only) Returns a DataSource to an application resource. mswID and mswType identify the resource as defined the application's .rc file(s).
- See also
- CinderResources
Implements cinder::app::Platform.
fs::path cinder::app::PlatformMsw::getResourceDirectory |
( |
| ) |
const |
|
overridevirtual |
Returns the absolute file path to the resources folder. Returns an empty fs::path on windows.
- See also
- CinderResources
Implements cinder::app::Platform.
fs::path cinder::app::PlatformMsw::getResourcePath |
( |
const fs::path & |
rsrcRelativePath | ) |
const |
|
overridevirtual |
Returns the absolute file path to a resource located at rsrcRelativePath inside the bundle's resources folder. Returns an empty fs::path on windows. Throws ResourceLoadExc on failure.
- See also
- CinderResources
Implements cinder::app::Platform.
fs::path cinder::app::PlatformMsw::getOpenFilePath |
( |
const fs::path & |
initialPath, |
|
|
const std::vector< std::string > & |
extensions |
|
) |
| |
|
overridevirtual |
Presents the user with an open-file dialog and returns the selected file path. The dialog optionally begins at the path initialPath and can be limited to allow selection of files ending in the extensions enumerated in extensions.
- Returns
- the selected file path, or an empty fs::path if the user cancelled or this operation isn't supported on the current platform.
Implements cinder::app::Platform.
fs::path cinder::app::PlatformMsw::getFolderPath |
( |
const fs::path & |
initialPath | ) |
|
|
overridevirtual |
Presents the user with an open-folder dialog.
- Returns
- the selected file path, or an empty fs::path if the user cancelled or this operation isn't supported on the current platform.
Implements cinder::app::Platform.
fs::path cinder::app::PlatformMsw::getSaveFilePath |
( |
const fs::path & |
initialPath, |
|
|
const std::vector< std::string > & |
extensions |
|
) |
| |
|
overridevirtual |
Presents the user with a save-file dialog and returns the selected file path. The dialog optionally begins at the path initialPath and can be limited to allow selection of files ending in the extensions enumerated in extensions.
- Returns
- the selected file path, or an empty fs::path if the user cancelled or this operation isn't supported on the current platform.
Implements cinder::app::Platform.
map< string, string > cinder::app::PlatformMsw::getEnvironmentVariables |
( |
| ) |
|
|
overridevirtual |
Returns a std::map of the system's environment variables. Empty on WinRT.
Implements cinder::app::Platform.
fs::path cinder::app::PlatformMsw::expandPath |
( |
const fs::path & |
path | ) |
|
|
overridevirtual |
Returns a canonical version of path. Collapses '.', ".." and "//". Converts '~' on Cocoa. Expands environment variables on MSW.
Implements cinder::app::Platform.
fs::path cinder::app::PlatformMsw::getHomeDirectory |
( |
| ) |
const |
|
overridevirtual |
fs::path cinder::app::PlatformMsw::getDocumentsDirectory |
( |
| ) |
const |
|
overridevirtual |
fs::path cinder::app::PlatformMsw::getDefaultExecutablePath |
( |
| ) |
const |
|
overridevirtual |
std::ostream & cinder::app::PlatformMsw::console |
( |
| ) |
|
|
overridevirtual |
Returns a reference to an output console, which is by default an alias to std::cout. Other platforms may override to use other necessary console mechanisms.
Reimplemented from cinder::app::Platform.
void cinder::app::PlatformMsw::directConsoleToCout |
( |
bool |
shouldDirect | ) |
|
void cinder::app::PlatformMsw::launchWebBrowser |
( |
const Url & |
url | ) |
|
|
overridevirtual |
void cinder::app::PlatformMsw::sleep |
( |
float |
milliseconds | ) |
|
|
overridevirtual |
Suspends the execution of the current thread until milliseconds have passed. Supports sub-millisecond precision only on OS X.
Implements cinder::app::Platform.
vector< string > cinder::app::PlatformMsw::stackTrace |
( |
| ) |
|
|
overridevirtual |
const std::vector< DisplayRef > & cinder::app::PlatformMsw::getDisplays |
( |
| ) |
|
|
overridevirtual |
void cinder::app::PlatformMsw::refreshDisplays |
( |
| ) |
|
Returns the Display which corresponds to hMonitor. Returns main display on failure.
void cinder::app::Platform::set |
( |
Platform * |
platform | ) |
|
|
staticinherited |
virtual void cinder::app::Platform::prepareLaunch |
( |
| ) |
|
|
virtualinherited |
Called at the beginning of a launch, can be overridden for platform-specifc preparation.
Reimplemented in cinder::app::PlatformCocoa.
virtual void cinder::app::Platform::cleanupLaunch |
( |
| ) |
|
|
virtualinherited |
DataSourceRef cinder::app::Platform::loadAsset |
( |
const fs::path & |
relativePath | ) |
|
|
inherited |
Returns a DataSourceRef to an application asset. Throws a AssetLoadExc on failure.
fs::path cinder::app::Platform::getAssetPath |
( |
const fs::path & |
relativePath | ) |
const |
|
inherited |
Returns a fs::path to an application asset. Returns an empty path on failure.
void cinder::app::Platform::addAssetDirectory |
( |
const fs::path & |
directory | ) |
|
|
inherited |
Adds an absolute path to the list of directories which are searched for assets.
- Note
- Not thread-safe, e.g. you should not call this when loadAsset() or getAssetPath() can occur from a different thread.
const vector< fs::path > & cinder::app::Platform::getAssetDirectories |
( |
| ) |
const |
|
inherited |
Returns a vector of directories that are searched when looking up an asset path.
fs::path cinder::app::Platform::getExecutablePath |
( |
| ) |
const |
|
inherited |
Returns the path to the associated executable.
void cinder::app::Platform::setExecutablePath |
( |
const fs::path & |
execPath | ) |
|
|
inherited |
Sets the path to the associated executable, overriding the default.
virtual void cinder::app::Platform::prepareAssetLoading |
( |
| ) |
|
|
protectedvirtualinherited |
void cinder::app::Platform::findAndAddDefaultAssetPath |
( |
| ) |
|
|
protectedvirtualinherited |
Called to add the default assets folder by walking up the path from the executable until a folder named 'assets' is found. Subclasses can override this method to disable this functionality.
The documentation for this class was generated from the following files: