Cinder  0.9.1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cinder::app::AppBase::Settings Class Reference

#include <AppBase.h>

Inherited by cinder::app::AppCocoaTouch::Settings, cinder::app::AppMsw::Settings, cinder::app::AppScreenSaver::Settings, and cinder::app::AppWinRt::Settings.

Public Member Functions

 Settings ()
 
virtual ~Settings ()
 
void setWindowSize (int windowSizeX, int windowSizeY)
 
void setWindowSize (const ivec2 &size)
 
ivec2 getWindowSize () const
 
ivec2 getWindowPos () const
 
void setWindowPos (int windowPosX, int windowPosY)
 
void setWindowPos (const ivec2 &windowPos)
 
bool isWindowPosSpecified () const
 
void setWindowPosUnspecified ()
 
void setQuitOnLastWindowCloseEnabled (bool enable=true)
 
bool isQuitOnLastWindowCloseEnabled () const
 
bool isFullScreen ()
 
void setFullScreen (bool fullScreen=true, const FullScreenOptions &options=FullScreenOptions())
 
bool isResizable () const
 
void setResizable (bool resizable=true)
 
bool isBorderless () const
 
void setBorderless (bool borderless=true)
 
bool isAlwaysOnTop () const
 
void setAlwaysOnTop (bool alwaysOnTop=true)
 
DisplayRef getDisplay () const
 
void setDisplay (DisplayRef display)
 
Window::Format getDefaultWindowFormat () const
 
void setDefaultWindowFormat (const Window::Format &format)
 
void setDefaultRenderer (const RendererRef &renderer)
 
RendererRef getDefaultRenderer () const
 
void prepareWindow (const Window::Format &format)
 
std::vector< Window::Format > & getWindowFormats ()
 
const std::vector< Window::Format > & getWindowFormats () const
 
const std::string & getTitle () const
 
void setTitle (const std::string &title)
 
void setHighDensityDisplayEnabled (bool enable=true)
 
bool isHighDensityDisplayEnabled () const
 
void setMultiTouchEnabled (bool enable=true)
 
bool isMultiTouchEnabled () const
 
void setPowerManagementEnabled (bool enable=true)
 
bool isPowerManagementEnabled () const
 
void setFrameRate (float frameRate)
 
void disableFrameRate ()
 
bool isFrameRateEnabled () const
 
float getFrameRate () const
 
const std::vector< std::string > & getCommandLineArgs () const
 
void setShouldQuit (bool shouldQuit=true)
 
bool getShouldQuit () const
 

Protected Member Functions

void init (const RendererRef &defaultRenderer, const char *title, int argc, char *const argv[])
 

Protected Attributes

std::vector< Window::FormatmWindowFormats
 
Window::Format mDefaultWindowFormat
 
RendererRef mDefaultRenderer
 
std::string mTitle
 
std::vector< std::string > mCommandLineArgs
 
bool mFrameRateEnabled
 
float mFrameRate
 
bool mPowerManagementEnabled
 
bool mHighDensityDisplayEnabled
 
bool mMultiTouchEnabled
 
bool mQuitOnLastWindowClose
 
bool mShouldQuit
 
friend AppBase
 

Detailed Description

Startup settings, used during App construction. They are modified before the app is created by passing a SettingsFn to the app instanciation macros.

Constructor & Destructor Documentation

cinder::app::AppBase::Settings::Settings ( )
virtual cinder::app::AppBase::Settings::~Settings ( )
virtual

Member Function Documentation

void cinder::app::AppBase::Settings::setWindowSize ( int  windowSizeX,
int  windowSizeY 
)

Sets the size of the default window measured in pixels.

void cinder::app::AppBase::Settings::setWindowSize ( const ivec2 &  size)

Sets the size of the default window measured in pixels.

ivec2 cinder::app::AppBase::Settings::getWindowSize ( ) const

Gets the size of the default window measured in pixels.

ivec2 cinder::app::AppBase::Settings::getWindowPos ( ) const

Returns the position of the default window in screen coordinates measured in pixels.

void cinder::app::AppBase::Settings::setWindowPos ( int  windowPosX,
int  windowPosY 
)

Sets the position of the default window in screen coordinates measured in pixels.

void cinder::app::AppBase::Settings::setWindowPos ( const ivec2 &  windowPos)

Sets the position of the default window in screen coordinates measured in pixels.

bool cinder::app::AppBase::Settings::isWindowPosSpecified ( ) const

Returns whether a non-default window position has been requested.

void cinder::app::AppBase::Settings::setWindowPosUnspecified ( )

Marks the window position setting as unspecified, effectively requesting the default.

void cinder::app::AppBase::Settings::setQuitOnLastWindowCloseEnabled ( bool  enable = true)

Sets whether the app quits automatically when its last window is closed. Enabled by default.

bool cinder::app::AppBase::Settings::isQuitOnLastWindowCloseEnabled ( ) const

Returns whether the app quits automatically when its last window is closed. Enabled by default.

bool cinder::app::AppBase::Settings::isFullScreen ( )

Returns whether the default window is fullscreen.

void cinder::app::AppBase::Settings::setFullScreen ( bool  fullScreen = true,
const FullScreenOptions options = FullScreenOptions() 
)

Sets whether the default window is fullscreen at startup with FullScreenOptions options. Kiosk Mode is enabled by default.

bool cinder::app::AppBase::Settings::isResizable ( ) const

Returns whether the default window is resizable.

void cinder::app::AppBase::Settings::setResizable ( bool  resizable = true)

Sets the default window to be resizable or not.

bool cinder::app::AppBase::Settings::isBorderless ( ) const

Returns whether the default window will be created without a border (chrome/frame)

void cinder::app::AppBase::Settings::setBorderless ( bool  borderless = true)

Sets the default window to be created without a border (chrome/frame)

bool cinder::app::AppBase::Settings::isAlwaysOnTop ( ) const

Returns whether the default window always remains above all other windows.

void cinder::app::AppBase::Settings::setAlwaysOnTop ( bool  alwaysOnTop = true)

Sets whether the default window always remains above all other windows.

DisplayRef cinder::app::AppBase::Settings::getDisplay ( ) const

Returns the display for the default window.

void cinder::app::AppBase::Settings::setDisplay ( DisplayRef  display)

Sets the display for the default window.

Window::Format cinder::app::AppBase::Settings::getDefaultWindowFormat ( ) const

Returns the Window::Format which will be used if no calls are made to Settings::prepareWindow()

void cinder::app::AppBase::Settings::setDefaultWindowFormat ( const Window::Format format)

Sets the Window::Format which will be used if no calls are made to Settings::prepareWindow()

void cinder::app::AppBase::Settings::setDefaultRenderer ( const RendererRef renderer)

Sets the default Renderer, overridding what was passed in during app instanciation.

RendererRef cinder::app::AppBase::Settings::getDefaultRenderer ( ) const

Returns the default Renderer.

void cinder::app::AppBase::Settings::prepareWindow ( const Window::Format format)
std::vector<Window::Format>& cinder::app::AppBase::Settings::getWindowFormats ( )
const std::vector<Window::Format>& cinder::app::AppBase::Settings::getWindowFormats ( ) const
const std::string& cinder::app::AppBase::Settings::getTitle ( ) const

the title of the app reflected in ways particular to the app type and platform (such as its Window or menu)

void cinder::app::AppBase::Settings::setTitle ( const std::string &  title)

the title of the app reflected in ways particular to the app type and platform (such as its Window or menu)

void cinder::app::AppBase::Settings::setHighDensityDisplayEnabled ( bool  enable = true)

Sets whether Windows created on a high-density (Retina) display will have their resolution doubled. Default is true on iOS and false on other platforms.

bool cinder::app::AppBase::Settings::isHighDensityDisplayEnabled ( ) const

Returns whether Windows created on a high-density (Retina) display will have their resolution doubled. Default is true on iOS and false on other platforms.

void cinder::app::AppBase::Settings::setMultiTouchEnabled ( bool  enable = true)

Registers the app to receive multiTouch events from the operating system. Disabled by default on desktop platforms, enabled on mobile.

bool cinder::app::AppBase::Settings::isMultiTouchEnabled ( ) const

Returns whether the app is registered to receive multiTouch events from the operating system. Disabled by default on desktop platforms, enabled on mobile.

void cinder::app::AppBase::Settings::setPowerManagementEnabled ( bool  enable = true)

a value of true allows screensavers or the system's power management to hide the app. Default value is false on desktop, and true on mobile

bool cinder::app::AppBase::Settings::isPowerManagementEnabled ( ) const

is power management enabled, allowing screensavers and the system's power management to hide the application

void cinder::app::AppBase::Settings::setFrameRate ( float  frameRate)

Sets maximum frameRate the update/draw loop will execute at, specified in frames per second. FrameRate limiting is on by default, at 60 FPS.

void cinder::app::AppBase::Settings::disableFrameRate ( )

Disables the frameRate limiting, which is on by default. Restore using setFrameRate(). See also enableVerticalSync().

bool cinder::app::AppBase::Settings::isFrameRateEnabled ( ) const

Returns whether frameRate limiting is enabled. On by default, at 60 FPS.

float cinder::app::AppBase::Settings::getFrameRate ( ) const

Maximum frameRate of the application specified in frames per second.

const std::vector<std::string>& cinder::app::AppBase::Settings::getCommandLineArgs ( ) const

Returns the command line args passed to the application from its entry point (ex. a main's argc / argv).

void cinder::app::AppBase::Settings::setShouldQuit ( bool  shouldQuit = true)

Set this to true if the app should terminate prior to launching.

bool cinder::app::AppBase::Settings::getShouldQuit ( ) const

Whether or not the app should terminate prior to launching.

void cinder::app::AppBase::Settings::init ( const RendererRef defaultRenderer,
const char *  title,
int  argc,
char *const  argv[] 
)
protected

Member Data Documentation

std::vector<Window::Format> cinder::app::AppBase::Settings::mWindowFormats
protected
Window::Format cinder::app::AppBase::Settings::mDefaultWindowFormat
protected
RendererRef cinder::app::AppBase::Settings::mDefaultRenderer
protected
std::string cinder::app::AppBase::Settings::mTitle
protected
std::vector<std::string> cinder::app::AppBase::Settings::mCommandLineArgs
protected
bool cinder::app::AppBase::Settings::mFrameRateEnabled
protected
float cinder::app::AppBase::Settings::mFrameRate
protected
bool cinder::app::AppBase::Settings::mPowerManagementEnabled
protected
bool cinder::app::AppBase::Settings::mHighDensityDisplayEnabled
protected
bool cinder::app::AppBase::Settings::mMultiTouchEnabled
protected
bool cinder::app::AppBase::Settings::mQuitOnLastWindowClose
protected
bool cinder::app::AppBase::Settings::mShouldQuit
protected
friend cinder::app::AppBase::Settings::AppBase
protected

The documentation for this class was generated from the following files: