#include <AppBasic.h>
Inherits cinder::app::App.
Classes | |
class | Settings |
Public Member Functions | |
AppBasic () | |
virtual | ~AppBasic () |
virtual void | prepareSettings (Settings *settings) |
virtual void | touchesBegan (TouchEvent event) |
Override to respond to the beginning of a multitouch sequence. | |
virtual void | touchesMoved (TouchEvent event) |
Override to respond to movement (drags) during a multitouch sequence. | |
virtual void | touchesEnded (TouchEvent event) |
Override to respond to the end of a multitouch sequence. | |
const std::vector < TouchEvent::Touch > & | getActiveTouches () const |
Returns a std::vector of all active touches. | |
CallbackId | registerTouchesBegan (std::function< bool(TouchEvent)> callback) |
Registers a callback for touchesBegan events. Returns a unique identifier which can be used as a parameter to unregisterTouchesBegan(). | |
template<typename T > | |
CallbackId | registerTouchesBegan (T *obj, bool(T::*callback)(TouchEvent)) |
Registers a callback for touchesBegan events. Returns a unique identifier which can be used as a parameter to unregisterTouchesBegan(). | |
void | unregisterTouchesBegan (CallbackId id) |
Unregisters a callback for touchesBegan events. | |
CallbackId | registerTouchesMoved (std::function< bool(TouchEvent)> callback) |
Registers a callback for touchesMoved events. Returns a unique identifier which can be used as a parameter to unregisterTouchesMoved(). | |
template<typename T > | |
CallbackId | registerTouchesMoved (T *obj, bool(T::*callback)(TouchEvent)) |
Registers a callback for touchesMoved events. Returns a unique identifier which can be used as a parameter to unregisterTouchesMoved(). | |
void | unregisterTouchesMoved (CallbackId id) |
Unregisters a callback for touchesMoved events. | |
CallbackId | registerTouchesEnded (std::function< bool(TouchEvent)> callback) |
Registers a callback for touchesEnded events. Returns a unique identifier which can be used as a parameter to unregisterTouchesEnded(). | |
template<typename T > | |
CallbackId | registerTouchesEnded (T *obj, bool(T::*callback)(TouchEvent)) |
Registers a callback for touchesEnded events. Returns a unique identifier which can be used as a parameter to unregisterTouchesEnded(). | |
void | unregisterTouchesEnded (CallbackId id) |
Unregisters a callback for touchesEnded events. | |
virtual int | getWindowWidth () const |
Returns the width of the App's window measured in pixels, or the screen when in full-screen mode. | |
void | setWindowWidth (int windowWidth) |
Sets the width of the App's window measured in pixels. Ignored in full-screen mode. | |
virtual int | getWindowHeight () const |
Returns the height of the App's window measured in pixels, or the screen when in full-screen mode. | |
void | setWindowHeight (int windowHeight) |
Sets the height of the App's window measured in pixels. Ignored in full-screen mode. | |
void | setWindowSize (int windowWidth, int windowHeight) |
Sets the size of the App's window. Ignored in full-screen mode. | |
virtual Vec2i | getWindowPos () const |
Returns the X coordinate of the top-left-corner of the window. | |
virtual void | setWindowPos (const Vec2i &windowPos) |
Sets the X & Y coordinates of the top-left corner of the window. | |
virtual float | getFrameRate () const |
Returns the maximum frame-rate the App will attempt to maintain measured in frames-per-second. | |
virtual void | setFrameRate (float frameRate) |
Sets the maximum frame-rate the App will attempt to maintain \ a frameRate frames-per-second. | |
virtual bool | isFullScreen () const |
Returns whether the App is in full-screen mode or not. | |
virtual void | setFullScreen (bool fullScreen) |
Sets whether the active App is in full-screen mode based on fullScreen. | |
virtual bool | isBorderless () const |
Returns whether the has no border (chrome/frame). | |
virtual void | setBorderless (bool borderless=true) |
Sets whether the window has a border (chrome/frame). | |
virtual bool | isAlwaysOnTop () const |
Returns whether the window always remains above all other windows. | |
virtual void | setAlwaysOnTop (bool alwaysOnTop=true) |
Sets whether the window always remains above all other windows. | |
Vec2i | getMousePos () const |
Returns the current location of the mouse. Can be called outside the normal event loop. | |
void | hideCursor () |
Hides the mouse cursor. | |
void | showCursor () |
Shows the mouse cursor. | |
const Settings & | getSettings () const |
const Display & | getDisplay () |
virtual void | quit () |
Ceases execution of the application. | |
const std::vector< std::string > & | getArgs () const |
Returns a vector of the command line arguments passed to the app. | |
virtual fs::path | getAppPath () |
Returns the path to the application on disk. | |
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 (MouseEvent event) |
Override to receive mouse-down events. | |
virtual void | mouseUp (MouseEvent event) |
Override to receive mouse-up events. | |
virtual void | mouseWheel (MouseEvent event) |
Override to receive mouse-wheel events. | |
virtual void | mouseMove (MouseEvent event) |
Override to receive mouse-move events. | |
virtual void | mouseDrag (MouseEvent event) |
Override to receive mouse-drag events. | |
virtual void | keyDown (KeyEvent event) |
Override to receive key-down events. | |
virtual void | keyUp (KeyEvent event) |
Override to receive key-up events. | |
virtual void | resize (ResizeEvent event) |
Override to receive window resize events. | |
virtual void | fileDrop (FileDropEvent event) |
Override to receive file-drop events. | |
CallbackId | registerMouseDown (std::function< bool(MouseEvent)> callback) |
Registers a callback for mouseDown events. Returns a unique identifier which can be used as a parameter to unregisterMouseDown(). | |
template<typename T > | |
CallbackId | registerMouseDown (T *obj, bool(T::*callback)(MouseEvent)) |
Registers a callback for mouseDown events. Returns a unique identifier which can be used as a parameter to unregisterMouseDown(). | |
void | unregisterMouseDown (CallbackId id) |
Unregisters a callback for mouseDown events. | |
CallbackId | registerMouseUp (std::function< bool(MouseEvent)> callback) |
Registers a callback for mouseUp events. Returns a unique identifier which can be used as a parameter to unregisterMouseUp(). | |
template<typename T > | |
CallbackId | registerMouseUp (T *obj, bool(T::*callback)(MouseEvent)) |
Registers a callback for mouseUp events. Returns a unique identifier which can be used as a parameter to unregisterMouseUp(). | |
void | unregisterMouseUp (CallbackId id) |
Unregisters a callback for mouseUp events. | |
CallbackId | registerMouseWheel (std::function< bool(MouseEvent)> callback) |
Registers a callback for mouseWheel events. Returns a unique identifier which can be used as a parameter to unregisterMouseWheel(). | |
template<typename T > | |
CallbackId | registerMouseWheel (T *obj, bool(T::*callback)(MouseEvent)) |
Registers a callback for mouseWheel events. Returns a unique identifier which can be used as a parameter to unregisterMouseWheel(). | |
void | unregisterMouseWheel (CallbackId id) |
Unregisters a callback for mouseWheel events. | |
CallbackId | registerMouseMove (std::function< bool(MouseEvent)> callback) |
Registers a callback for mouseMove events. Returns a unique identifier which can be used as a parameter to unregisterMouseMove(). | |
template<typename T > | |
CallbackId | registerMouseMove (T *obj, bool(T::*callback)(MouseEvent)) |
Registers a callback for mouseMove events. Returns a unique identifier which can be used as a parameter to unregisterMouseMove(). | |
void | unregisterMouseMove (CallbackId id) |
Unregisters a callback for mouseMove events. | |
CallbackId | registerMouseDrag (std::function< bool(MouseEvent)> callback) |
Registers a callback for mouseDrag events. Returns a unique identifier which can be used as a parameter to unregisterMouseDrag(). | |
template<typename T > | |
CallbackId | registerMouseDrag (T *obj, bool(T::*callback)(MouseEvent)) |
Registers a callback for mouseDrag events. Returns a unique identifier which can be used as a parameter to unregisterMouseDrag(). | |
void | unregisterMouseDrag (CallbackId id) |
Unregisters a callback for mouseDrag events. | |
CallbackId | registerKeyDown (std::function< bool(KeyEvent)> callback) |
Registers a callback for keyDown events. Returns a unique identifier which can be used as a parameter to unregisterKeyDown(). | |
template<typename T > | |
CallbackId | registerKeyDown (T *obj, bool(T::*callback)(KeyEvent)) |
Registers a callback for keyDown events. Returns a unique identifier which can be used as a parameter to unregisterKeyDown(). | |
void | unregisterKeyDown (CallbackId id) |
Unregisters a callback for keyDown events. | |
CallbackId | registerKeyUp (std::function< bool(KeyEvent)> callback) |
Registers a callback for keyUp events. Returns a unique identifier which can be used as a parameter to unregisterKeyUp(). | |
template<typename T > | |
CallbackId | registerKeyUp (T *obj, bool(T::*callback)(KeyEvent)) |
Registers a callback for keyUp events. Returns a unique identifier which can be used as a parameter to unregisterKeyUp(). | |
void | unregisterKeyUp (CallbackId id) |
Unregisters a callback for keyUp events. | |
CallbackId | registerResize (std::function< bool(ResizeEvent)> callback) |
Registers a callback for resize events. Returns a unique identifier which can be used as a parameter to unregisterKeyUp(). | |
template<typename T > | |
CallbackId | registerResize (T *obj, bool(T::*callback)(ResizeEvent)) |
Registers a callback for resize events. Returns a unique identifier which can be used as a parameter to unregisterResize(). | |
void | unregisterResize (CallbackId id) |
Unregisters a callback for resize events. | |
CallbackId | registerFileDrop (std::function< bool(FileDropEvent)> callback) |
Registers a callback for fileDrop events. Returns a unique identifier which can be used as a parameter to unregisterKeyUp(). | |
template<typename T > | |
CallbackId | registerFileDrop (T *obj, bool(T::*callback)(FileDropEvent)) |
Registers a callback for fileDrop events. Returns a unique identifier which can be used as a parameter to unregisterFileDrop(). | |
void | unregisterFileDrop (CallbackId id) |
Unregisters a callback for fileDrop events. | |
Renderer * | getRenderer () const |
void | setWindowSize (const Vec2i &size) |
Sets the size of the App's window. Ignored in full-screen mode. | |
Vec2f | getWindowCenter () const |
Returns the center of the App's window or the screen in full-screen mode. | |
Vec2i | getWindowSize () const |
Returns the size of the App's window or the screen in full-screen mode. | |
float | getWindowAspectRatio () const |
Returns the aspect ratio of the App's window or the screen in full-screen mode. | |
Area | getWindowBounds () const |
Returns the bounding area of the App's window or the screen in full-screen mode. | |
int | getWindowPosX () const |
Returns the X coordinate of the top-left-corner of the window contents. | |
int | getWindowPosY () const |
Returns the Y coordinate of the top-left corner of the window contents. | |
void | setWindowPos (int x, int y) |
Sets the X & Y coordinates of the top-left corner of the window contents. | |
float | getAverageFps () const |
Returns the average frame-rate attained by the App as measured in frames-per-second. | |
double | getFpsSampleInterval () const |
Returns the sampling rate in seconds for measuring the average frame-per-second as returned by getAverageFps(). | |
void | setFpsSampleInterval (double sampleInterval) |
Sets the sampling rate in seconds for measuring the average frame-per-second as returned by getAverageFps(). | |
double | getElapsedSeconds () const |
Returns the number of seconds which have elapsed since application launch. | |
uint32_t | getElapsedFrames () const |
Returns the number of animation frames which have elapsed since application launch. | |
DataSourceRef | loadAsset (const fs::path &relativePath) |
Returns a DataSourceRef to an application asset. Throws a AssetLoadExc on failure. | |
fs::path | getAssetPath (const fs::path &relativePath) |
Returns a fs::path to an application asset. Returns an empty path on failure. | |
void | addAssetDirectory (const fs::path &dirPath) |
Adds an absolute path 'dirPath' to the list of directories which are searched for assets. | |
fs::path | getOpenFilePath (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. | |
fs::path | getFolderPath (const fs::path &initialPath="") |
Presents the user with a folder-open dialog and returns the selected folder. | |
fs::path | getSaveFilePath (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. | |
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 (const Area &area) |
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 ()=0 |
virtual bool | receivesEvents () const |
Static Public Member Functions | |
static AppBasic * | get () |
static DataSourceRef | loadResource (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 | loadResource (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 DataSourceRef | loadResource (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). | |
static fs::path | getResourcePath (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 fs::path | getResourcePath () |
Returns the absolute file path to the bundle's resources folder. | |
Friends | |
class | AppImplMswBasic |
cinder::app::AppBasic::AppBasic | ( | ) |
cinder::app::AppBasic::~AppBasic | ( | ) | [virtual] |
virtual void cinder::app::AppBasic::prepareSettings | ( | Settings * | settings | ) | [virtual] |
virtual void cinder::app::AppBasic::touchesBegan | ( | TouchEvent | event | ) | [virtual] |
Override to respond to the beginning of a multitouch sequence.
virtual void cinder::app::AppBasic::touchesMoved | ( | TouchEvent | event | ) | [virtual] |
Override to respond to movement (drags) during a multitouch sequence.
virtual void cinder::app::AppBasic::touchesEnded | ( | TouchEvent | event | ) | [virtual] |
Override to respond to the end of a multitouch sequence.
const std::vector<TouchEvent::Touch>& cinder::app::AppBasic::getActiveTouches | ( | ) | const |
Returns a std::vector of all active touches.
CallbackId cinder::app::AppBasic::registerTouchesBegan | ( | std::function< bool(TouchEvent)> | callback | ) |
Registers a callback for touchesBegan events. Returns a unique identifier which can be used as a parameter to unregisterTouchesBegan().
CallbackId cinder::app::AppBasic::registerTouchesBegan | ( | T * | obj, | |
bool(T::*)(TouchEvent) | callback | |||
) |
Registers a callback for touchesBegan events. Returns a unique identifier which can be used as a parameter to unregisterTouchesBegan().
void cinder::app::AppBasic::unregisterTouchesBegan | ( | CallbackId | id | ) |
Unregisters a callback for touchesBegan events.
CallbackId cinder::app::AppBasic::registerTouchesMoved | ( | std::function< bool(TouchEvent)> | callback | ) |
Registers a callback for touchesMoved events. Returns a unique identifier which can be used as a parameter to unregisterTouchesMoved().
CallbackId cinder::app::AppBasic::registerTouchesMoved | ( | T * | obj, | |
bool(T::*)(TouchEvent) | callback | |||
) |
Registers a callback for touchesMoved events. Returns a unique identifier which can be used as a parameter to unregisterTouchesMoved().
void cinder::app::AppBasic::unregisterTouchesMoved | ( | CallbackId | id | ) |
Unregisters a callback for touchesMoved events.
CallbackId cinder::app::AppBasic::registerTouchesEnded | ( | std::function< bool(TouchEvent)> | callback | ) |
Registers a callback for touchesEnded events. Returns a unique identifier which can be used as a parameter to unregisterTouchesEnded().
CallbackId cinder::app::AppBasic::registerTouchesEnded | ( | T * | obj, | |
bool(T::*)(TouchEvent) | callback | |||
) |
Registers a callback for touchesEnded events. Returns a unique identifier which can be used as a parameter to unregisterTouchesEnded().
void cinder::app::AppBasic::unregisterTouchesEnded | ( | CallbackId | id | ) |
Unregisters a callback for touchesEnded events.
int cinder::app::AppBasic::getWindowWidth | ( | ) | const [virtual] |
Returns the width of the App's window measured in pixels, or the screen when in full-screen mode.
Implements cinder::app::App.
void cinder::app::AppBasic::setWindowWidth | ( | int | windowWidth | ) | [virtual] |
Sets the width of the App's window measured in pixels. Ignored in full-screen mode.
Implements cinder::app::App.
int cinder::app::AppBasic::getWindowHeight | ( | ) | const [virtual] |
Returns the height of the App's window measured in pixels, or the screen when in full-screen mode.
Implements cinder::app::App.
void cinder::app::AppBasic::setWindowHeight | ( | int | windowHeight | ) | [virtual] |
Sets the height of the App's window measured in pixels. Ignored in full-screen mode.
Implements cinder::app::App.
void cinder::app::AppBasic::setWindowSize | ( | int | windowWidth, | |
int | windowHeight | |||
) | [virtual] |
Sets the size of the App's window. Ignored in full-screen mode.
Implements cinder::app::App.
Vec2i cinder::app::AppBasic::getWindowPos | ( | ) | const [virtual] |
Returns the X coordinate of the top-left-corner of the window.
Reimplemented from cinder::app::App.
void cinder::app::AppBasic::setWindowPos | ( | const Vec2i & | windowPos | ) | [virtual] |
Sets the X & Y coordinates of the top-left corner of the window.
Reimplemented from cinder::app::App.
float cinder::app::AppBasic::getFrameRate | ( | ) | const [virtual] |
Returns the maximum frame-rate the App will attempt to maintain measured in frames-per-second.
Implements cinder::app::App.
void cinder::app::AppBasic::setFrameRate | ( | float | frameRate | ) | [virtual] |
Sets the maximum frame-rate the App will attempt to maintain \ a frameRate frames-per-second.
Implements cinder::app::App.
bool cinder::app::AppBasic::isFullScreen | ( | ) | const [virtual] |
Returns whether the App is in full-screen mode or not.
Implements cinder::app::App.
void cinder::app::AppBasic::setFullScreen | ( | bool | fullScreen | ) | [virtual] |
Sets whether the active App is in full-screen mode based on fullScreen.
Implements cinder::app::App.
bool cinder::app::AppBasic::isBorderless | ( | ) | const [virtual] |
Returns whether the has no border (chrome/frame).
Reimplemented from cinder::app::App.
void cinder::app::AppBasic::setBorderless | ( | bool | borderless = true |
) | [virtual] |
Sets whether the window has a border (chrome/frame).
Reimplemented from cinder::app::App.
bool cinder::app::AppBasic::isAlwaysOnTop | ( | ) | const [virtual] |
Returns whether the window always remains above all other windows.
Reimplemented from cinder::app::App.
void cinder::app::AppBasic::setAlwaysOnTop | ( | bool | alwaysOnTop = true |
) | [virtual] |
Sets whether the window always remains above all other windows.
Reimplemented from cinder::app::App.
Vec2i cinder::app::AppBasic::getMousePos | ( | ) | const |
Returns the current location of the mouse. Can be called outside the normal event loop.
void cinder::app::AppBasic::hideCursor | ( | ) |
Hides the mouse cursor.
void cinder::app::AppBasic::showCursor | ( | ) |
Shows the mouse cursor.
const Settings& cinder::app::AppBasic::getSettings | ( | ) | const [virtual] |
Implements cinder::app::App.
const Display & cinder::app::AppBasic::getDisplay | ( | ) |
void cinder::app::AppBasic::quit | ( | ) | [virtual] |
Ceases execution of the application.
Implements cinder::app::App.
const std::vector<std::string>& cinder::app::AppBasic::getArgs | ( | ) | const |
Returns a vector of the command line arguments passed to the app.
fs::path cinder::app::AppBasic::getAppPath | ( | ) | [virtual] |
Returns the path to the application on disk.
Implements cinder::app::App.
static AppBasic* cinder::app::AppBasic::get | ( | ) | [static] |
Returns a pointer to the current global AppBasic
Reimplemented from cinder::app::App.
virtual void cinder::app::App::setup | ( | ) | [virtual, inherited] |
Override to perform any application setup after the Renderer has been initialized.
virtual void cinder::app::App::shutdown | ( | ) | [virtual, inherited] |
Override to perform any application cleanup before exiting.
virtual void cinder::app::App::update | ( | ) | [virtual, inherited] |
Override to perform any once-per-loop computation.
virtual void cinder::app::App::draw | ( | ) | [virtual, inherited] |
Override to perform any rendering once-per-loop or in response to OS-prompted requests for refreshes.
virtual void cinder::app::App::mouseDown | ( | MouseEvent | event | ) | [virtual, inherited] |
Override to receive mouse-down events.
virtual void cinder::app::App::mouseUp | ( | MouseEvent | event | ) | [virtual, inherited] |
Override to receive mouse-up events.
virtual void cinder::app::App::mouseWheel | ( | MouseEvent | event | ) | [virtual, inherited] |
Override to receive mouse-wheel events.
virtual void cinder::app::App::mouseMove | ( | MouseEvent | event | ) | [virtual, inherited] |
Override to receive mouse-move events.
virtual void cinder::app::App::mouseDrag | ( | MouseEvent | event | ) | [virtual, inherited] |
Override to receive mouse-drag events.
virtual void cinder::app::App::keyDown | ( | KeyEvent | event | ) | [virtual, inherited] |
Override to receive key-down events.
virtual void cinder::app::App::keyUp | ( | KeyEvent | event | ) | [virtual, inherited] |
Override to receive key-up events.
virtual void cinder::app::App::resize | ( | ResizeEvent | event | ) | [virtual, inherited] |
Override to receive window resize events.
virtual void cinder::app::App::fileDrop | ( | FileDropEvent | event | ) | [virtual, inherited] |
Override to receive file-drop events.
CallbackId cinder::app::App::registerMouseDown | ( | std::function< bool(MouseEvent)> | callback | ) | [inherited] |
Registers a callback for mouseDown events. Returns a unique identifier which can be used as a parameter to unregisterMouseDown().
CallbackId cinder::app::App::registerMouseDown | ( | T * | obj, | |
bool(T::*)(MouseEvent) | callback | |||
) | [inherited] |
Registers a callback for mouseDown events. Returns a unique identifier which can be used as a parameter to unregisterMouseDown().
void cinder::app::App::unregisterMouseDown | ( | CallbackId | id | ) | [inherited] |
Unregisters a callback for mouseDown events.
CallbackId cinder::app::App::registerMouseUp | ( | std::function< bool(MouseEvent)> | callback | ) | [inherited] |
Registers a callback for mouseUp events. Returns a unique identifier which can be used as a parameter to unregisterMouseUp().
CallbackId cinder::app::App::registerMouseUp | ( | T * | obj, | |
bool(T::*)(MouseEvent) | callback | |||
) | [inherited] |
Registers a callback for mouseUp events. Returns a unique identifier which can be used as a parameter to unregisterMouseUp().
void cinder::app::App::unregisterMouseUp | ( | CallbackId | id | ) | [inherited] |
Unregisters a callback for mouseUp events.
CallbackId cinder::app::App::registerMouseWheel | ( | std::function< bool(MouseEvent)> | callback | ) | [inherited] |
Registers a callback for mouseWheel events. Returns a unique identifier which can be used as a parameter to unregisterMouseWheel().
CallbackId cinder::app::App::registerMouseWheel | ( | T * | obj, | |
bool(T::*)(MouseEvent) | callback | |||
) | [inherited] |
Registers a callback for mouseWheel events. Returns a unique identifier which can be used as a parameter to unregisterMouseWheel().
void cinder::app::App::unregisterMouseWheel | ( | CallbackId | id | ) | [inherited] |
Unregisters a callback for mouseWheel events.
CallbackId cinder::app::App::registerMouseMove | ( | std::function< bool(MouseEvent)> | callback | ) | [inherited] |
Registers a callback for mouseMove events. Returns a unique identifier which can be used as a parameter to unregisterMouseMove().
CallbackId cinder::app::App::registerMouseMove | ( | T * | obj, | |
bool(T::*)(MouseEvent) | callback | |||
) | [inherited] |
Registers a callback for mouseMove events. Returns a unique identifier which can be used as a parameter to unregisterMouseMove().
void cinder::app::App::unregisterMouseMove | ( | CallbackId | id | ) | [inherited] |
Unregisters a callback for mouseMove events.
CallbackId cinder::app::App::registerMouseDrag | ( | std::function< bool(MouseEvent)> | callback | ) | [inherited] |
Registers a callback for mouseDrag events. Returns a unique identifier which can be used as a parameter to unregisterMouseDrag().
CallbackId cinder::app::App::registerMouseDrag | ( | T * | obj, | |
bool(T::*)(MouseEvent) | callback | |||
) | [inherited] |
Registers a callback for mouseDrag events. Returns a unique identifier which can be used as a parameter to unregisterMouseDrag().
void cinder::app::App::unregisterMouseDrag | ( | CallbackId | id | ) | [inherited] |
Unregisters a callback for mouseDrag events.
CallbackId cinder::app::App::registerKeyDown | ( | std::function< bool(KeyEvent)> | callback | ) | [inherited] |
Registers a callback for keyDown events. Returns a unique identifier which can be used as a parameter to unregisterKeyDown().
CallbackId cinder::app::App::registerKeyDown | ( | T * | obj, | |
bool(T::*)(KeyEvent) | callback | |||
) | [inherited] |
Registers a callback for keyDown events. Returns a unique identifier which can be used as a parameter to unregisterKeyDown().
void cinder::app::App::unregisterKeyDown | ( | CallbackId | id | ) | [inherited] |
Unregisters a callback for keyDown events.
CallbackId cinder::app::App::registerKeyUp | ( | std::function< bool(KeyEvent)> | callback | ) | [inherited] |
Registers a callback for keyUp events. Returns a unique identifier which can be used as a parameter to unregisterKeyUp().
CallbackId cinder::app::App::registerKeyUp | ( | T * | obj, | |
bool(T::*)(KeyEvent) | callback | |||
) | [inherited] |
Registers a callback for keyUp events. Returns a unique identifier which can be used as a parameter to unregisterKeyUp().
void cinder::app::App::unregisterKeyUp | ( | CallbackId | id | ) | [inherited] |
Unregisters a callback for keyUp events.
CallbackId cinder::app::App::registerResize | ( | std::function< bool(ResizeEvent)> | callback | ) | [inherited] |
Registers a callback for resize events. Returns a unique identifier which can be used as a parameter to unregisterKeyUp().
CallbackId cinder::app::App::registerResize | ( | T * | obj, | |
bool(T::*)(ResizeEvent) | callback | |||
) | [inherited] |
Registers a callback for resize events. Returns a unique identifier which can be used as a parameter to unregisterResize().
void cinder::app::App::unregisterResize | ( | CallbackId | id | ) | [inherited] |
Unregisters a callback for resize events.
CallbackId cinder::app::App::registerFileDrop | ( | std::function< bool(FileDropEvent)> | callback | ) | [inherited] |
Registers a callback for fileDrop events. Returns a unique identifier which can be used as a parameter to unregisterKeyUp().
CallbackId cinder::app::App::registerFileDrop | ( | T * | obj, | |
bool(T::*)(FileDropEvent) | callback | |||
) | [inherited] |
Registers a callback for fileDrop events. Returns a unique identifier which can be used as a parameter to unregisterFileDrop().
void cinder::app::App::unregisterFileDrop | ( | CallbackId | id | ) | [inherited] |
Unregisters a callback for fileDrop events.
Renderer* cinder::app::App::getRenderer | ( | ) | const [inherited] |
void cinder::app::App::setWindowSize | ( | const Vec2i & | size | ) | [inherited] |
Sets the size of the App's window. Ignored in full-screen mode.
Vec2f cinder::app::App::getWindowCenter | ( | ) | const [inherited] |
Returns the center of the App's window or the screen in full-screen mode.
Equivalent to
Vec2f( getWindowWidth() * 0.5, getWindowHeight() * 0.5 )
Vec2i cinder::app::App::getWindowSize | ( | ) | const [inherited] |
Returns the size of the App's window or the screen in full-screen mode.
float cinder::app::App::getWindowAspectRatio | ( | ) | const [inherited] |
Returns the aspect ratio of the App's window or the screen in full-screen mode.
Area cinder::app::App::getWindowBounds | ( | ) | const [inherited] |
Returns the bounding area of the App's window or the screen in full-screen mode.
Equivalent to
Area( 0, 0, getWindowWidth(), getWindowHeight() );
int cinder::app::App::getWindowPosX | ( | ) | const [inherited] |
Returns the X coordinate of the top-left-corner of the window contents.
int cinder::app::App::getWindowPosY | ( | ) | const [inherited] |
Returns the Y coordinate of the top-left corner of the window contents.
void cinder::app::App::setWindowPos | ( | int | x, | |
int | y | |||
) | [inherited] |
Sets the X & Y coordinates of the top-left corner of the window contents.
float cinder::app::App::getAverageFps | ( | ) | const [inherited] |
Returns the average frame-rate attained by the App as measured in frames-per-second.
double cinder::app::App::getFpsSampleInterval | ( | ) | const [inherited] |
Returns the sampling rate in seconds for measuring the average frame-per-second as returned by getAverageFps().
void cinder::app::App::setFpsSampleInterval | ( | double | sampleInterval | ) | [inherited] |
Sets the sampling rate in seconds for measuring the average frame-per-second as returned by getAverageFps().
double cinder::app::App::getElapsedSeconds | ( | ) | const [inherited] |
Returns the number of seconds which have elapsed since application launch.
Reimplemented in cinder::app::AppCocoaTouch.
uint32_t cinder::app::App::getElapsedFrames | ( | ) | const [inherited] |
Returns the number of animation frames which have elapsed since application launch.
static DataSourceRef cinder::app::App::loadResource | ( | const std::string & | macPath, | |
int | mswID, | |||
const std::string & | mswType | |||
) | [static, inherited] |
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 cinder::app::App::loadResource | ( | const std::string & | macPath | ) | [static, inherited] |
Returns a DataSourceRef to an application resource. macPath is a path relative to the bundle's resources folder. Throws ResourceLoadExc on failure.
static DataSourceRef cinder::app::App::loadResource | ( | int | mswID, | |
const std::string & | mswType | |||
) | [static, inherited] |
Returns a DataSourceRef to an application resource. mswID and mswType identify the resource as defined the application's .rc file(s).
static fs::path cinder::app::App::getResourcePath | ( | const fs::path & | rsrcRelativePath | ) | [static, inherited] |
Returns the absolute file path to a resource located at rsrcRelativePath inside the bundle's resources folder. Throws ResourceLoadExc on failure.
static fs::path cinder::app::App::getResourcePath | ( | ) | [static, inherited] |
Returns the absolute file path to the bundle's resources folder.
DataSourceRef cinder::app::App::loadAsset | ( | const fs::path & | relativePath | ) | [inherited] |
Returns a DataSourceRef to an application asset. Throws a AssetLoadExc on failure.
fs::path cinder::app::App::getAssetPath | ( | const fs::path & | relativePath | ) | [inherited] |
Returns a fs::path to an application asset. Returns an empty path on failure.
void cinder::app::App::addAssetDirectory | ( | const fs::path & | dirPath | ) | [inherited] |
Adds an absolute path 'dirPath' to the list of directories which are searched for assets.
fs::path cinder::app::App::getOpenFilePath | ( | const fs::path & | initialPath = "" , |
|
std::vector< std::string > | extensions = std::vector< std::string >() | |||
) | [inherited] |
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::App::getFolderPath | ( | const fs::path & | initialPath = "" |
) | [inherited] |
Presents the user with a folder-open dialog and returns the selected folder.
fs::path cinder::app::App::getSaveFilePath | ( | const fs::path & | initialPath = "" , |
|
std::vector< std::string > | extensions = std::vector< std::string >() | |||
) | [inherited] |
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::App::console | ( | ) | [inherited] |
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 cinder::app::App::copyWindowSurface | ( | ) | [inherited] |
void cinder::app::App::restoreWindowContext | ( | ) | [inherited] |
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 cinder::app::App::getsWindowsPaintEvents | ( | ) | [pure virtual, inherited] |
Implemented in cinder::app::AppScreenSaver.
virtual bool cinder::app::App::receivesEvents | ( | ) | const [virtual, inherited] |
Reimplemented in cinder::app::AppScreenSaver.
friend class AppImplMswBasic [friend] |