#include "cinder/Cinder.h"
#include "cinder/app/Renderer.h"
#include "cinder/app/Window.h"
#include "cinder/Vector.h"
#include "cinder/app/MouseEvent.h"
#include "cinder/app/KeyEvent.h"
#include "cinder/app/FileDropEvent.h"
#include "cinder/Display.h"
#include "cinder/DataSource.h"
#include "cinder/Timer.h"
#include "cinder/Function.h"
#include "cinder/Thread.h"
#include <vector>
#include <algorithm>
Go to the source code of this file.
Classes | |
struct | cinder::app::BooleanOrEventCombiner |
Returns true if any slots return true, else false. Does not short-circuit. Returns true if there are no slots. More... | |
struct | cinder::app::BooleanAndEventCombiner |
Returns true if all slots return true, else false. Does not short-circuit. Returns true if there are no slots. More... | |
struct | cinder::app::BitwiseAndEventCombiner< T > |
Returns a bitmask where in order for the bit in type T to be be 1, it has to be 1 from all slot. Returns 0 if there are no slots. More... | |
class | cinder::app::App |
class | cinder::app::App::Settings |
class | cinder::app::ResourceLoadExc |
Exception for failed resource loading. More... | |
class | cinder::app::AssetLoadExc |
Exception for failed asset loading. More... | |
Namespaces | |
cinder | |
boost | |
boost::asio | |
cinder::app | |
Functions | |
App Free Functions | |
Convenience methods which mirror App member-functions and apply to the active application | |
WindowRef | cinder::app::getWindow () |
Returns the number of Windows the app has open. More... | |
size_t | cinder::app::getNumWindows () |
Returns the number of Windows the app has open. More... | |
WindowRef | cinder::app::getWindowIndex (size_t index) |
Gets a Window by index, in the range [0, getNumWindows()). More... | |
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. More... | |
void | cinder::app::setWindowPos (const Vec2i &windowPos) |
Sets the position of the active App's window measured in points. Ignored in full-screen mode. More... | |
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. More... | |
int | cinder::app::getWindowHeight () |
Returns the height of the active App's window measured in points, or the screen when in full-screen mode. More... | |
void | cinder::app::setWindowSize (int windowWidth, int windowHeight) |
Sets the size of the active App's window in points. Ignored in full-screen mode. More... | |
Vec2f | cinder::app::getWindowCenter () |
Returns the center of the active App's window in pixels or of the screen in full-screen mode. More... | |
Vec2i | cinder::app::getWindowSize () |
Returns the size of the active App's window or the screen in full-screen mode measured in points. More... | |
Vec2i | cinder::app::getWindowPos () |
Returns the position of the active App's window measured in points. More... | |
float | cinder::app::getWindowAspectRatio () |
Returns the aspect ratio of the active App's window or the screen in full-screen mode. More... | |
Area | cinder::app::getWindowBounds () |
Returns the bounding area of the active App's window or the screen in full-screen mode measured in points. More... | |
float | cinder::app::getWindowContentScale () |
Returns the contentScale of the active App's window, which is the multiplier that maps points to pixels. More... | |
float | cinder::app::getFrameRate () |
Returns the maximum frame-rate the active App will attempt to maintain. More... | |
void | cinder::app::setFrameRate (float frameRate) |
Sets the maximum frame-rate the active App will attempt to maintain. More... | |
bool | cinder::app::isFullScreen () |
Returns whether the active App is in full-screen mode or not. More... | |
void | cinder::app::setFullScreen (bool fullScreen=true) |
Sets whether the active App is in full-screen mode based on fullScreen. More... | |
float | cinder::app::toPixels (float s) |
Returns a scalar mapped from points to pixels for the current Window. More... | |
Vec2f | cinder::app::toPixels (Vec2f s) |
Returns a Vec2f mapped from points to pixels for the current Window. More... | |
Vec2i | cinder::app::toPixels (Vec2i s) |
Returns a Vec2i mapped from points to pixels for the current Window. More... | |
Area | cinder::app::toPixels (const Area &a) |
Returns an Area mapped from points to pixels for the current Window. More... | |
Rectf | cinder::app::toPixels (const Rectf &a) |
Returns a Rectf mapped from points to pixels for the current Window. More... | |
float | cinder::app::toPoints (float s) |
Returns a scalar mapped from pixels to points for the current Window. More... | |
Vec2f | cinder::app::toPoints (Vec2f s) |
Returns a Vec2f mapped from pixels to points for the current Window. More... | |
Vec2i | cinder::app::toPoints (Vec2i s) |
Returns a Vec2i mapped from pixels to points for the current Window. More... | |
Area | cinder::app::toPoints (const Area &a) |
Returns an Area mapped from pixels to points for the current Window. More... | |
Rectf | cinder::app::toPoints (const Rectf &a) |
Returns a Rectf mapped from pixels to points for the current Window. More... | |
double | cinder::app::getElapsedSeconds () |
Returns the number seconds which have elapsed since the active App launched. More... | |
uint32_t | cinder::app::getElapsedFrames () |
Returns the number of animation frames which have elapsed since the active App launched. More... | |
DataSourceRef | cinder::app::loadResource (const std::string &macPath, int mswID, const std::string &mswType) |
Returns a DataSource 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). More... | |
DataSourceRef | cinder::app::loadAsset (const fs::path &relativePath) |
Returns a DataSourceRef to the active App's's asset. Throws a AssetLoadExc on failure. More... | |
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. More... | |
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. More... | |
fs::path | cinder::app::getAppPath () |
Returns the path to the active App on disk. More... | |
fs::path | cinder::app::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. More... | |
fs::path | cinder::app::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. More... | |
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. More... | |
Timeline & | cinder::app::timeline () |
Returns a reference to the active App's Timeline. More... | |
Surface | cinder::app::copyWindowSurface () |
Returns a copy of the current window's contents as a Surface8u. More... | |
Surface | cinder::app::copyWindowSurface (const Area &area) |
Returns a copy of the Area area from the current window's contents as a Surface8u. More... | |
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. More... | |