![]() |
Cinder
0.9.1
|
Classes | |
class | AppBase |
class | AppCocoaTouch |
class | AppCocoaView |
class | AppImplMsw |
class | AppImplMswBasic |
class | AppImplMswScreenSaver |
class | AppMac |
class | AppMsw |
class | AppScreenSaver |
class | AppWinRt |
class | AssetLoadExc |
class | BlankingWindow |
struct | CollectorEvent |
class | Event |
class | ExcInvalidWindow |
class | ExcRenderer |
class | ExcRendererAllocation |
class | FileDropEvent |
struct | FullScreenOptions |
class | KeyEvent |
class | MouseEvent |
class | Platform |
class | PlatformCocoa |
class | PlatformMsw |
class | PlatformWinRt |
class | Renderer |
class | Renderer2d |
class | RendererDx |
class | RendererGl |
class | RendererImpl2dGdi |
class | RendererImplDx |
class | RendererImplGlAngle |
class | RendererImplGlMsw |
class | RendererImplMsw |
class | ResourceLoadExc |
class | ResourceLoadExcMsw |
class | TouchEvent |
class | Window |
class | WindowImplMsw |
class | WindowImplMswBasic |
class | WindowImplMswScreenSaver |
class | WindowImplWinRt |
Typedefs | |
typedef AppMsw | App |
typedef std::shared_ptr< class Window > | WindowRef |
typedef std::shared_ptr< class BlankingWindow > | BlankingWindowRef |
typedef std::shared_ptr< class Renderer > | RendererRef |
typedef std::shared_ptr< class Renderer2d > | Renderer2dRef |
typedef std::shared_ptr< class RendererDx > | RendererDxRef |
typedef std::shared_ptr< class RendererGl > | RendererGlRef |
typedef HGLRC | hShareContext |
typedef HGLRC const int * | attribList |
typedef BOOL(__stdcall * | PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats) |
Enumerations | |
enum | InterfaceOrientation { Unknown = 0, Portrait = 1 << 0, PortraitUpsideDown = 1 << 1, LandscapeLeft = 1 << 2, LandscapeRight = 1 << 3, PortraitAll = (Portrait | PortraitUpsideDown), LandscapeAll = (LandscapeLeft | LandscapeRight), All = (PortraitAll | LandscapeAll) } |
Functions | |
std::ostream & | operator<< (std::ostream &lhs, const InterfaceOrientation &rhs) |
float | getOrientationDegrees (InterfaceOrientation orientation) |
std::ostream & | operator<< (std::ostream &os, const FileDropEvent &event) |
std::ostream & | operator<< (std::ostream &out, const TouchEvent::Touch &touch) |
std::ostream & | operator<< (std::ostream &out, const TouchEvent &event) |
LRESULT CALLBACK | WndProc (HWND mWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
LRESULT CALLBACK | BlankingWndProc (HWND mWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) |
unsigned int | prepMouseEventModifiers (WPARAM wParam) |
int | prepNativeKeyCode (WPARAM wParam) |
WCHAR | mapVirtualKey (WPARAM wParam) |
unsigned int | prepKeyEventModifiers () |
typedef | HGLRC (__stdcall *PFNWGLCREATECONTEXTATTRIBSARB)(HDC hDC |
unsigned int | prepPointerEventModifiers (PointerEventArgs^args) |
App Free Functions | |
Convenience methods which mirror App member-functions and apply to the active application | |
WindowRef | getWindow () |
size_t | getNumWindows () |
WindowRef | getWindowIndex (size_t index) |
int | getWindowWidth () |
void | setWindowPos (const ivec2 &windowPos) |
void | setWindowPos (int x, int y) |
int | getWindowHeight () |
void | setWindowSize (ivec2 size) |
void | setWindowSize (int windowSizeX, int windowSizeY) |
vec2 | getWindowCenter () |
ivec2 | getWindowSize () |
ivec2 | getWindowPos () |
float | getWindowAspectRatio () |
Area | getWindowBounds () |
float | getWindowContentScale () |
float | getFrameRate () |
void | setFrameRate (float frameRate) |
bool | isFullScreen () |
void | setFullScreen (bool fullScreen=true) |
float | toPixels (float s) |
vec2 | toPixels (vec2 s) |
ivec2 | toPixels (ivec2 s) |
Area | toPixels (const Area &a) |
Rectf | toPixels (const Rectf &a) |
float | toPoints (float s) |
vec2 | toPoints (vec2 s) |
ivec2 | toPoints (ivec2 s) |
Area | toPoints (const Area &a) |
Rectf | toPoints (const Rectf &a) |
double | getElapsedSeconds () |
uint32_t | getElapsedFrames () |
bool | isMainThread () |
DataSourceRef | loadResource (const fs::path &resourcePath, int mswID, const std::string &mswType) |
DataSourceRef | loadAsset (const fs::path &relativePath) |
fs::path | getAssetPath (const fs::path &relativePath) |
void | addAssetDirectory (const fs::path &dirPath) |
const std::vector< fs::path > & | getAssetDirectories () |
fs::path | getResourceDirectory () |
fs::path | getResourcePath (const fs::path &rsrcRelativePath) |
fs::path | getAppPath () |
fs::path | getOpenFilePath (const fs::path &initialPath=fs::path(), std::vector< std::string > extensions=std::vector< std::string >()) |
fs::path | getSaveFilePath (const fs::path &initialPath=fs::path(), std::vector< std::string > extensions=std::vector< std::string >()) |
std::ostream & | console () |
Timeline & | timeline () |
Surface | copyWindowSurface () |
Surface | copyWindowSurface (const Area &area) |
void | restoreWindowContext () |
inline::CGContextRef | createWindowCgContext () |
Variables | |
__pad0__ | |
__pad1__ | |
CollectorEvent< MouseEvent > | EventSignalMouse |
CollectorEvent< TouchEvent > | EventSignalTouch |
__pad2__ | |
CollectorEvent< KeyEvent > | EventSignalKey |
__pad3__ | |
CollectorEvent< FileDropEvent > | EventSignalFileDrop |
__pad4__ | |
map< int, int > | sKeyTable |
bool | sMultisampleSupported = false |
int | sArbMultisampleFormat |
typedef AppMsw cinder::app::App |
typedef std::shared_ptr< Window > cinder::app::WindowRef |
typedef std::shared_ptr<class BlankingWindow> cinder::app::BlankingWindowRef |
typedef std::shared_ptr<class Renderer> cinder::app::RendererRef |
typedef std::shared_ptr<class Renderer2d> cinder::app::Renderer2dRef |
typedef std::shared_ptr<class RendererDx> cinder::app::RendererDxRef |
typedef std::shared_ptr<class RendererGl> cinder::app::RendererGlRef |
typedef HGLRC cinder::app::hShareContext |
typedef HGLRC const int* cinder::app::attribList |
typedef BOOL(__stdcall * cinder::app::PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats) |
size_t cinder::app::getNumWindows | ( | ) |
Returns the number of Windows the app has open.
WindowRef cinder::app::getWindowIndex | ( | size_t | index | ) |
Gets a Window by index, in the range [0, getNumWindows()).
int cinder::app::getWindowWidth | ( | ) |
Returns the width of the active App's window measured in points, or of the screen when in full-screen mode.
void cinder::app::setWindowPos | ( | const ivec2 & | windowPos | ) |
Sets the position of the active App's window measured in points. Ignored in full-screen mode.
void cinder::app::setWindowPos | ( | int | x, |
int | y | ||
) |
Sets the position of the active App's window measured in points. Ignored in full-screen mode.
int cinder::app::getWindowHeight | ( | ) |
Returns the height of the active App's window measured in points, or the screen when in full-screen mode.
void cinder::app::setWindowSize | ( | ivec2 | size | ) |
Sets the size of the active App's window in points. Ignored in full-screen mode.
void cinder::app::setWindowSize | ( | int | windowSizeX, |
int | windowSizeY | ||
) |
Sets the size of the active App's window in points. Ignored in full-screen mode.
vec2 cinder::app::getWindowCenter | ( | ) |
Returns the center of the active App's window in pixels or of the screen in full-screen mode.
Equivalent to vec2( getWindowWidth() * 0.5, getWindowHeight() * 0.5 )
ivec2 cinder::app::getWindowSize | ( | ) |
Returns the size of the active App's window or the screen in full-screen mode measured in points.
ivec2 cinder::app::getWindowPos | ( | ) |
Returns the position of the active App's window measured in points.
float cinder::app::getWindowAspectRatio | ( | ) |
Returns the aspect ratio of the active App's window or the screen in full-screen mode.
Area cinder::app::getWindowBounds | ( | ) |
Returns the bounding area of the active App's window or the screen in full-screen mode measured in points.
Equivalent to
float cinder::app::getWindowContentScale | ( | ) |
Returns the contentScale of the active App's window, which is the multiplier that maps points to pixels.
float cinder::app::getFrameRate | ( | ) |
Returns the maximum frame-rate the active App will attempt to maintain.
void cinder::app::setFrameRate | ( | float | frameRate | ) |
Sets the maximum frame-rate the active App will attempt to maintain.
bool cinder::app::isFullScreen | ( | ) |
Returns whether the active App is in full-screen mode or not.
void cinder::app::setFullScreen | ( | bool | fullScreen = true | ) |
Sets whether the active App is in full-screen mode based on fullScreen.
float cinder::app::toPixels | ( | float | s | ) |
Returns a scalar mapped from points to pixels for the current Window.
vec2 cinder::app::toPixels | ( | vec2 | s | ) |
Returns a vec2 mapped from points to pixels for the current Window.
ivec2 cinder::app::toPixels | ( | ivec2 | s | ) |
Returns a ivec2 mapped from points to pixels for the current Window.
Returns a Rectf mapped from points to pixels for the current Window.
float cinder::app::toPoints | ( | float | s | ) |
Returns a scalar mapped from pixels to points for the current Window.
vec2 cinder::app::toPoints | ( | vec2 | s | ) |
Returns a vec2 mapped from pixels to points for the current Window.
ivec2 cinder::app::toPoints | ( | ivec2 | s | ) |
Returns a ivec2 mapped from pixels to points for the current Window.
Returns a Rectf mapped from pixels to points for the current Window.
double cinder::app::getElapsedSeconds | ( | ) |
Returns the number seconds which have elapsed since the active App launched.
uint32_t cinder::app::getElapsedFrames | ( | ) |
Returns the number of animation frames which have elapsed since the active App launched.
bool cinder::app::isMainThread | ( | ) |
Returns true
if the calling thread is the Application's main thread (the thread running the main function), false otherwise.
DataSourceRef cinder::app::loadResource | ( | const fs::path & | resourcePath, |
int | mswID, | ||
const std::string & | mswType | ||
) |
(MSW only) Returns a DataSource to an application resource. mswID and mswType identify the resource as defined the application's .rc file(s).
DataSourceRef cinder::app::loadAsset | ( | const fs::path & | relativePath | ) |
Returns a DataSourceRef to the active App's's asset. Throws a AssetLoadExc on failure.
fs::path cinder::app::getAssetPath | ( | const fs::path & | relativePath | ) |
Returns a fs::path to the active App's asset. Returns an empty path on failure.
void cinder::app::addAssetDirectory | ( | const fs::path & | dirPath | ) |
Adds an absolute path dirPath to the active App's list of directories which are searched for assets.
const std::vector<fs::path>& cinder::app::getAssetDirectories | ( | ) |
Returns a vector of directories that are searched when looking up an asset path.
fs::path cinder::app::getResourceDirectory | ( | ) |
Returns the absolute file path to the resources folder. Returns an empty fs::path on windows.
fs::path cinder::app::getResourcePath | ( | const fs::path & | rsrcRelativePath | ) |
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.
fs::path cinder::app::getAppPath | ( | ) |
Returns the path to the active App on disk.
fs::path cinder::app::getOpenFilePath | ( | const fs::path & | initialPath = fs::path() , |
std::vector< std::string > | extensions = std::vector<std::string>() |
||
) |
Presents the user with a file-open 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. If the active app is in full-screen mode it will temporarily switch to windowed-mode to present the dialog.
fs::path cinder::app::getSaveFilePath | ( | const fs::path & | initialPath = fs::path() , |
std::vector< std::string > | extensions = std::vector<std::string>() |
||
) |
Presents the user with a file-save 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. If the active app is in full-screen mode it will temporarily switch to windowed-mode to present the dialog.
std::ostream& cinder::app::console | ( | ) |
Returns a reference to an output console, which is an alias to std::cout on the mac, and a wrapper around OutputDebugString on MSW.
On Mac OS X all output is echoed either to the Debugger Console in XCode or the system console On Windows output is echoed using OutputDebugString, echoed to the Output window of the debugger or to a stream viewable with Dbgview
Surface cinder::app::copyWindowSurface | ( | ) |
Returns a copy of the current window's contents as a Surface8u.
Returns a copy of the Area area from the current window's contents as a Surface8u.
void cinder::app::restoreWindowContext | ( | ) |
Restores the current rendering context to be the App's window or the screen in full-screen mode. Generally this is only necessary if the app has display a dialog box or some other external window.
inline ::CGContextRef cinder::app::createWindowCgContext | ( | ) |
Returns a CGContextRef for drawing to the Window using CoreGraphics under Cocoa & Cocoa Touch. Assumes your App uses a Renderer2d.
std::ostream & cinder::app::operator<< | ( | std::ostream & | lhs, |
const InterfaceOrientation & | rhs | ||
) |
Stream InterfacefaceOrientation enum to std::ostream.
float cinder::app::getOrientationDegrees | ( | InterfaceOrientation | orientation | ) |
returns the degrees rotation from Portrait for the provided orientation
std::ostream& cinder::app::operator<< | ( | std::ostream & | os, |
const FileDropEvent & | event | ||
) |
std::ostream& cinder::app::operator<< | ( | std::ostream & | out, |
const TouchEvent::Touch & | touch | ||
) |
std::ostream& cinder::app::operator<< | ( | std::ostream & | out, |
const TouchEvent & | event | ||
) |
LRESULT CALLBACK cinder::app::BlankingWndProc | ( | HWND | mWnd, |
UINT | uMsg, | ||
WPARAM | wParam, | ||
LPARAM | lParam | ||
) |
unsigned int cinder::app::prepMouseEventModifiers | ( | WPARAM | wParam | ) |
int cinder::app::prepNativeKeyCode | ( | WPARAM | wParam | ) |
WCHAR cinder::app::mapVirtualKey | ( | WPARAM | wParam | ) |
unsigned int cinder::app::prepKeyEventModifiers | ( | ) |
typedef cinder::app::HGLRC | ( | __stdcall * | PFNWGLCREATECONTEXTATTRIBSARB | ) |
unsigned int cinder::app::prepPointerEventModifiers | ( | PointerEventArgs^ | args | ) |
cinder::app::__pad0__ |
Signal used for retrieving the supported orientations. BitwiseAndEventCombiner is used so that any connection can forbid a certain orientation.
cinder::app::__pad1__ |
CollectorEvent<MouseEvent> cinder::app::EventSignalMouse |
CollectorEvent<TouchEvent> cinder::app::EventSignalTouch |
cinder::app::__pad2__ |
CollectorEvent<KeyEvent> cinder::app::EventSignalKey |
cinder::app::__pad3__ |
CollectorEvent<FileDropEvent> cinder::app::EventSignalFileDrop |
cinder::app::__pad4__ |
map<int,int> cinder::app::sKeyTable |
bool cinder::app::sMultisampleSupported = false |
int cinder::app::sArbMultisampleFormat |