#import <App.h>
Inherited by cinder::app::AppCocoaTouch.
Classes | |
class | Settings |
Public Member Functions | |
() | - App |
(virtual) | - ~App |
(virtual void) | - setup |
Override to perform any application setup after the Renderer has been initialized. | |
(virtual void) | - shutdown |
Override to perform any application cleanup before exiting. | |
(virtual void) | - update |
Override to perform any once-per-loop computation. | |
(virtual void) | - draw |
Override to perform any rendering once-per-loop or in response to OS-prompted requests for refreshes. | |
(virtual void) | - mouseDown |
Override to receive mouse-down events. | |
(virtual void) | - mouseUp |
Override to receive mouse-up events. | |
(virtual void) | - mouseWheel |
Override to receive mouse-wheel events. | |
(virtual void) | - mouseMove |
Override to receive mouse-move events. | |
(virtual void) | - mouseDrag |
Override to receive mouse-drag events. | |
(virtual void) | - keyDown |
Override to receive key-down events. | |
(virtual void) | - keyUp |
Override to receive key-up events. | |
(virtual void) | - resize |
Override to receive window resize events. | |
(virtual void) | - fileDrop |
Override to receive file-drop events. | |
(virtual void) | - quit |
Quits the application gracefully. | |
(CallbackId) | - registerMouseDown |
Registers a callback for mouseDown events. Returns a unique identifier which can be used as a parameter to unregisterMouseDown. | |
template<typename T > | |
(CallbackId) | - registerMouseDown |
Registers a callback for mouseDown events. Returns a unique identifier which can be used as a parameter to unregisterMouseDown. | |
(void) | - unregisterMouseDown |
Unregisters a callback for mouseDown events. | |
(CallbackId) | - registerMouseUp |
Registers a callback for mouseUp events. Returns a unique identifier which can be used as a parameter to unregisterMouseUp. | |
template<typename T > | |
(CallbackId) | - registerMouseUp |
Registers a callback for mouseUp events. Returns a unique identifier which can be used as a parameter to unregisterMouseUp. | |
(void) | - unregisterMouseUp |
Unregisters a callback for mouseUp events. | |
(CallbackId) | - registerMouseWheel |
Registers a callback for mouseWheel events. Returns a unique identifier which can be used as a parameter to unregisterMouseWheel. | |
template<typename T > | |
(CallbackId) | - registerMouseWheel |
Registers a callback for mouseWheel events. Returns a unique identifier which can be used as a parameter to unregisterMouseWheel. | |
(void) | - unregisterMouseWheel |
Unregisters a callback for mouseWheel events. | |
(CallbackId) | - registerMouseMove |
Registers a callback for mouseMove events. Returns a unique identifier which can be used as a parameter to unregisterMouseMove. | |
template<typename T > | |
(CallbackId) | - registerMouseMove |
Registers a callback for mouseMove events. Returns a unique identifier which can be used as a parameter to unregisterMouseMove. | |
(void) | - unregisterMouseMove |
Unregisters a callback for mouseMove events. | |
(CallbackId) | - registerMouseDrag |
Registers a callback for mouseDrag events. Returns a unique identifier which can be used as a parameter to unregisterMouseDrag. | |
template<typename T > | |
(CallbackId) | - registerMouseDrag |
Registers a callback for mouseDrag events. Returns a unique identifier which can be used as a parameter to unregisterMouseDrag. | |
(void) | - unregisterMouseDrag |
Unregisters a callback for mouseDrag events. | |
(CallbackId) | - registerKeyDown |
Registers a callback for keyDown events. Returns a unique identifier which can be used as a parameter to unregisterKeyDown. | |
template<typename T > | |
(CallbackId) | - registerKeyDown |
Registers a callback for keyDown events. Returns a unique identifier which can be used as a parameter to unregisterKeyDown. | |
(void) | - unregisterKeyDown |
Unregisters a callback for keyDown events. | |
(CallbackId) | - registerKeyUp |
Registers a callback for keyUp events. Returns a unique identifier which can be used as a parameter to unregisterKeyUp. | |
template<typename T > | |
(CallbackId) | - registerKeyUp |
Registers a callback for keyUp events. Returns a unique identifier which can be used as a parameter to unregisterKeyUp. | |
(void) | - unregisterKeyUp |
Unregisters a callback for keyUp events. | |
(CallbackId) | - registerResize |
Registers a callback for resize events. Returns a unique identifier which can be used as a parameter to unregisterKeyUp. | |
template<typename T > | |
(CallbackId) | - registerResize |
Registers a callback for resize events. Returns a unique identifier which can be used as a parameter to unregisterResize. | |
(void) | - unregisterResize |
Unregisters a callback for resize events. | |
(CallbackId) | - registerFileDrop |
Registers a callback for fileDrop events. Returns a unique identifier which can be used as a parameter to unregisterKeyUp. | |
template<typename T > | |
(CallbackId) | - registerFileDrop |
Registers a callback for fileDrop events. Returns a unique identifier which can be used as a parameter to unregisterFileDrop. | |
(void) | - unregisterFileDrop |
Unregisters a callback for fileDrop events. | |
(virtual const Settings &) | - getSettings |
(Renderer *) | - getRenderer |
(virtual int) | - getWindowWidth |
Returns the width of the App's window measured in pixels, or the screen when in full-screen mode. | |
(virtual void) | - setWindowWidth |
Sets the width of the App's window measured in pixels. Ignored in full-screen mode. | |
(virtual int) | - getWindowHeight |
Returns the height of the App's window measured in pixels, or the screen when in full-screen mode. | |
(virtual void) | - setWindowHeight |
Sets the height of the App's window measured in pixels. Ignored in full-screen mode. | |
(virtual void) | - setWindowSize |
Sets the size of the App's window. Ignored in full-screen mode. | |
(void) | - setWindowSize |
Sets the size of the App's window. Ignored in full-screen mode. | |
(Vec2f) | - getWindowCenter |
Returns the center of the App's window or the screen in full-screen mode. | |
(Vec2i) | - getWindowSize |
Returns the size of the App's window or the screen in full-screen mode. | |
(float) | - getWindowAspectRatio |
Returns the aspect ratio of the App's window or the screen in full-screen mode. | |
(Area) | - getWindowBounds |
Returns the bounding area of the App's window or the screen in full-screen mode. | |
(virtual Vec2i) | - getWindowPos |
Returns the X & Y coordinate of the top-left-corner of the window contents. | |
(int) | - getWindowPosX |
Returns the X coordinate of the top-left-corner of the window contents. | |
(int) | - getWindowPosY |
Returns the Y coordinate of the top-left corner of the window contents. | |
(void) | - setWindowPos |
Sets the X & Y coordinates of the top-left corner of the window contents. | |
(virtual void) | - setWindowPos |
Sets the X & Y coordinates of the top-left corner of the window's contents. | |
(virtual float) | - getFrameRate |
Returns the maximum frame-rate the App will attempt to maintain. | |
(virtual void) | - setFrameRate |
Sets the maximum frame-rate the App will attempt to maintain. | |
(float) | - getAverageFps |
Returns the average frame-rate attained by the App as measured in frames-per-second. | |
(double) | - getFpsSampleInterval |
Returns the sampling rate in seconds for measuring the average frame-per-second as returned by getAverageFps | |
(void) | - setFpsSampleInterval |
Sets the sampling rate in seconds for measuring the average frame-per-second as returned by getAverageFps | |
(virtual bool) | - isFullScreen |
Returns whether the App is in full-screen mode or not. | |
(virtual void) | - setFullScreen |
Sets whether the active App is in full-screen mode based on fullScreen. | |
(virtual bool) | - isBorderless |
Returns whether the has no border (chrome/frame) | |
(virtual void) | - setBorderless |
Sets whether the window has a border (chrome/frame) | |
(virtual bool) | - isAlwaysOnTop |
Returns whether the window always remains above all other windows. | |
(virtual void) | - setAlwaysOnTop |
Sets whether the window always remains above all other windows. | |
(double) | - getElapsedSeconds |
Returns the number of seconds which have elapsed since application launch. | |
(uint32_t) | - getElapsedFrames |
Returns the number of animation frames which have elapsed since application launch. | |
(DataSourceRef) | - loadAsset |
Returns a DataSourceRef to an application asset. Throws a AssetLoadExc on failure. | |
(fs::path) | - getAssetPath |
Returns a fs::path to an application asset. Returns an empty path on failure. | |
(void) | - addAssetDirectory |
Adds an absolute path 'dirPath' to the list of directories which are searched for assets. | |
(virtual fs::path) | - getAppPath |
Returns the path to the application on disk. | |
(fs::path) | - getOpenFilePath |
Presents the user with a file-open dialog and returns the selected file path. | |
(fs::path) | - getFolderPath |
Presents the user with a folder-open dialog and returns the selected folder. | |
(fs::path) | - getSaveFilePath |
Presents the user with a file-save dialog and returns the selected file path. | |
(std::ostream &) | - 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. | |
(Timeline &) | - timeline |
Returns a reference to the App's Timeline. | |
(Surface) | - copyWindowSurface |
(Surface) | - copyWindowSurface |
(void) | - 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 displayed a dialog box or some other external window. | |
(virtual bool) | - getsWindowsPaintEvents |
(virtual bool) | - receivesEvents |
Static Public Member Functions | |
(static DataSourceRef) | + loadResource |
Returns a DataSourceRef to an application resource. On Mac OS X, macPath is a path relative to the bundle's resources folder. On Windows, mswID and mswType identify the resource as defined the application's .rc file(s). Throws ResourceLoadExc on failure. | |
(static DataSourceRef) | + loadResource |
Returns a DataSourceRef to an application resource. macPath is a path relative to the bundle's resources folder. Throws ResourceLoadExc on failure. | |
(static fs::path) | + getResourcePath |
Returns the absolute file path to a resource located at rsrcRelativePath inside the bundle's resources folder. Throws ResourceLoadExc on failure. | |
(static fs::path) | + getResourcePath |
Returns the absolute file path to the bundle's resources folder. | |
(static DataSourceRef) | + loadResource |
Returns a DataSourceRef to an application resource. mswID and mswType identify the resource as defined the application's .rc file(s). | |
(static App *) | + get |
Returns a pointer to the active App. | |
Friends | |
class | AppImplMsw |
- cinder: |
- (virtual) app: |
- (virtual void) app: |
Override to perform any application setup after the Renderer has been initialized.
- (virtual void) app: |
Override to perform any application cleanup before exiting.
- (virtual void) app: |
Override to perform any once-per-loop computation.
- (virtual void) app: |
Override to perform any rendering once-per-loop or in response to OS-prompted requests for refreshes.
- (virtual void) app: | (MouseEvent) | event |
Override to receive mouse-down events.
- (virtual void) app: | (MouseEvent) | event |
Override to receive mouse-up events.
- (virtual void) app: | (MouseEvent) | event |
Override to receive mouse-wheel events.
- (virtual void) app: | (MouseEvent) | event |
Override to receive mouse-move events.
- (virtual void) app: | (MouseEvent) | event |
Override to receive mouse-drag events.
- (virtual void) app: | (KeyEvent) | event |
Override to receive key-down events.
- (virtual void) app: | (KeyEvent) | event |
Override to receive key-up events.
- (virtual void) app: | (ResizeEvent) | event |
Override to receive window resize events.
- (virtual void) app: | (FileDropEvent) | event |
Override to receive file-drop events.
- (virtual void) app: |
Quits the application gracefully.
Implemented in cinder::app::AppCocoaTouch.
- (CallbackId) app: | (std::function< bool(MouseEvent)>) | callback |
Registers a callback for mouseDown events. Returns a unique identifier which can be used as a parameter to unregisterMouseDown.
- (CallbackId) app: | (T *) | obj | |
(bool(T::*)(MouseEvent)) | callback | ||
Registers a callback for mouseDown events. Returns a unique identifier which can be used as a parameter to unregisterMouseDown.
- (void) app: | (CallbackId) | id |
Unregisters a callback for mouseDown events.
- (CallbackId) app: | (std::function< bool(MouseEvent)>) | callback |
Registers a callback for mouseUp events. Returns a unique identifier which can be used as a parameter to unregisterMouseUp.
- (CallbackId) app: | (T *) | obj | |
(bool(T::*)(MouseEvent)) | callback | ||
Registers a callback for mouseUp events. Returns a unique identifier which can be used as a parameter to unregisterMouseUp.
- (void) app: | (CallbackId) | id |
Unregisters a callback for mouseUp events.
- (CallbackId) app: | (std::function< bool(MouseEvent)>) | callback |
Registers a callback for mouseWheel events. Returns a unique identifier which can be used as a parameter to unregisterMouseWheel.
- (CallbackId) app: | (T *) | obj | |
(bool(T::*)(MouseEvent)) | callback | ||
Registers a callback for mouseWheel events. Returns a unique identifier which can be used as a parameter to unregisterMouseWheel.
- (void) app: | (CallbackId) | id |
Unregisters a callback for mouseWheel events.
- (CallbackId) app: | (std::function< bool(MouseEvent)>) | callback |
Registers a callback for mouseMove events. Returns a unique identifier which can be used as a parameter to unregisterMouseMove.
- (CallbackId) app: | (T *) | obj | |
(bool(T::*)(MouseEvent)) | callback | ||
Registers a callback for mouseMove events. Returns a unique identifier which can be used as a parameter to unregisterMouseMove.
- (void) app: | (CallbackId) | id |
Unregisters a callback for mouseMove events.
- (CallbackId) app: | (std::function< bool(MouseEvent)>) | callback |
Registers a callback for mouseDrag events. Returns a unique identifier which can be used as a parameter to unregisterMouseDrag.
- (CallbackId) app: | (T *) | obj | |
(bool(T::*)(MouseEvent)) | callback | ||
Registers a callback for mouseDrag events. Returns a unique identifier which can be used as a parameter to unregisterMouseDrag.
- (void) app: | (CallbackId) | id |
Unregisters a callback for mouseDrag events.
- (CallbackId) app: | (std::function< bool(KeyEvent)>) | callback |
Registers a callback for keyDown events. Returns a unique identifier which can be used as a parameter to unregisterKeyDown.
- (CallbackId) app: | (T *) | obj | |
(bool(T::*)(KeyEvent)) | callback | ||
Registers a callback for keyDown events. Returns a unique identifier which can be used as a parameter to unregisterKeyDown.
- (void) app: | (CallbackId) | id |
Unregisters a callback for keyDown events.
- (CallbackId) app: | (std::function< bool(KeyEvent)>) | callback |
Registers a callback for keyUp events. Returns a unique identifier which can be used as a parameter to unregisterKeyUp.
- (CallbackId) app: | (T *) | obj | |
(bool(T::*)(KeyEvent)) | callback | ||
Registers a callback for keyUp events. Returns a unique identifier which can be used as a parameter to unregisterKeyUp.
- (void) app: | (CallbackId) | id |
Unregisters a callback for keyUp events.
- (CallbackId) app: | (std::function< bool(ResizeEvent)>) | callback |
Registers a callback for resize events. Returns a unique identifier which can be used as a parameter to unregisterKeyUp.
- (CallbackId) app: | (T *) | obj | |
(bool(T::*)(ResizeEvent)) | callback | ||
Registers a callback for resize events. Returns a unique identifier which can be used as a parameter to unregisterResize.
- (void) app: | (CallbackId) | id |
Unregisters a callback for resize events.
- (CallbackId) app: | (std::function< bool(FileDropEvent)>) | callback |
Registers a callback for fileDrop events. Returns a unique identifier which can be used as a parameter to unregisterKeyUp.
- (CallbackId) app: | (T *) | obj | |
(bool(T::*)(FileDropEvent)) | callback | ||
Registers a callback for fileDrop events. Returns a unique identifier which can be used as a parameter to unregisterFileDrop.
- (void) app: | (CallbackId) | id |
Unregisters a callback for fileDrop events.
- (virtual const Settings&) app: | const |
Implemented in cinder::app::AppCocoaTouch.
- (Renderer*) app: | const |
- (virtual int) app: | const |
Returns the width of the App's window measured in pixels, or the screen when in full-screen mode.
Implemented in cinder::app::AppCocoaTouch.
- (virtual void) app: | (int) | windowWidth |
Sets the width of the App's window measured in pixels. Ignored in full-screen mode.
Implemented in cinder::app::AppCocoaTouch.
- (virtual int) app: | const |
Returns the height of the App's window measured in pixels, or the screen when in full-screen mode.
Implemented in cinder::app::AppCocoaTouch.
- (virtual void) app: | (int) | windowHeight |
Sets the height of the App's window measured in pixels. Ignored in full-screen mode.
Implemented in cinder::app::AppCocoaTouch.
- (virtual void) app: | (int) | windowWidth | |
(int) | windowHeight | ||
Sets the size of the App's window. Ignored in full-screen mode.
Implemented in cinder::app::AppCocoaTouch.
- (Vec2f) app: | const |
Returns the center of the App's window or the screen in full-screen mode.
Equivalent to
Vec2f( getWindowWidth() * 0.5, getWindowHeight() * 0.5 )
- (float) app: | const |
Returns the aspect ratio of the App's window or the screen in full-screen mode.
- (Area) app: | const |
Returns the bounding area of the App's window or the screen in full-screen mode.
Equivalent to
Area( 0, 0, getWindowWidth(), getWindowHeight() );
- (virtual Vec2i) app: | const |
Returns the X & Y coordinate of the top-left-corner of the window contents.
- (int) app: | const |
Returns the X coordinate of the top-left-corner of the window contents.
- (int) app: | const |
Returns the Y coordinate of the top-left corner of the window contents.
- (void) app: | (int) | x | |
(int) | y | ||
Sets the X & Y coordinates of the top-left corner of the window contents.
- (virtual void) app: | (const Vec2i &) | windowPos |
Sets the X & Y coordinates of the top-left corner of the window's contents.
- (virtual float) app: | const |
Returns the maximum frame-rate the App will attempt to maintain.
Implemented in cinder::app::AppCocoaTouch.
- (virtual void) app: | (float) | aFrameRate |
Sets the maximum frame-rate the App will attempt to maintain.
Implemented in cinder::app::AppCocoaTouch.
- (float) app: | const |
Returns the average frame-rate attained by the App as measured in frames-per-second.
- (double) app: | const |
Returns the sampling rate in seconds for measuring the average frame-per-second as returned by getAverageFps
- (void) app: | (double) | sampleInterval |
Sets the sampling rate in seconds for measuring the average frame-per-second as returned by getAverageFps
- (virtual bool) app: | const |
Returns whether the App is in full-screen mode or not.
Implemented in cinder::app::AppCocoaTouch.
- (virtual void) app: | (bool) | aFullScreen |
Sets whether the active App is in full-screen mode based on fullScreen.
Implemented in cinder::app::AppCocoaTouch.
- (virtual bool) app: | const |
Returns whether the has no border (chrome/frame)
- (virtual void) app: | (bool) | borderless = true |
Sets whether the window has a border (chrome/frame)
- (virtual bool) app: | const |
Returns whether the window always remains above all other windows.
- (virtual void) app: | (bool) | alwaysOnTop = true |
Sets whether the window always remains above all other windows.
- (double) app: | const |
Returns the number of seconds which have elapsed since application launch.
Reimplemented in cinder::app::AppCocoaTouch.
- (uint32_t) app: | const |
Returns the number of animation frames which have elapsed since application launch.
+ (static DataSourceRef) app: | (const std::string &) | macPath | |
(int) | mswID | ||
(const std::string &) | mswType | ||
Returns a DataSourceRef to an application resource. On Mac OS X, macPath is a path relative to the bundle's resources folder. On Windows, mswID and mswType identify the resource as defined the application's .rc file(s). Throws ResourceLoadExc on failure.
+ (static DataSourceRef) app: | (const std::string &) | macPath |
Returns a DataSourceRef to an application resource. macPath is a path relative to the bundle's resources folder. Throws ResourceLoadExc on failure.
+ (static path) cinder: | (const fs::path &) | rsrcRelativePath |
Returns the absolute file path to a resource located at rsrcRelativePath inside the bundle's resources folder. Throws ResourceLoadExc on failure.
+ (static path) cinder: |
Returns the absolute file path to the bundle's resources folder.
+ (static DataSourceRef) app: | (int) | mswID | |
(const std::string &) | mswType | ||
Returns a DataSourceRef to an application resource. mswID and mswType identify the resource as defined the application's .rc file(s).
- (DataSourceRef) app: | (const fs::path &) | relativePath |
Returns a DataSourceRef to an application asset. Throws a AssetLoadExc on failure.
- fs: | (const fs::path &) | relativePath |
Returns a fs::path to an application asset. Returns an empty path on failure.
- (void) app: | (const fs::path &) | dirPath |
Adds an absolute path 'dirPath' to the list of directories which are searched for assets.
- (virtual path) cinder: |
Returns the path to the application on disk.
Implemented in cinder::app::AppCocoaTouch.
- fs: | (const fs::path &) | initialPath = "" |
|
(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: | (const fs::path &) | initialPath = "" |
Presents the user with a folder-open dialog and returns the selected folder.
- fs: | (const fs::path &) | initialPath = "" |
|
(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: |
Returns a reference to an output console, which is an alias to std::cout on the mac, and a wrapper around OutputDebugString on MSW.
- (Surface) app: |
- (void) app: |
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 displayed a dialog box or some other external window.
- (virtual bool) app: |
- (virtual bool) app: | const |
+ (static App*) app: |
Returns a pointer to the active App.
Reimplemented in cinder::app::AppCocoaTouch.
- (friend class) AppImplMsw [friend] |