#include <Window.h>
Inherits enable_shared_from_this< Window >.
cinder::app::Window::Window |
( |
| ) |
|
|
protected |
bool cinder::app::Window::isFullScreen |
( |
| ) |
const |
Returns whether the Window is full-screen or not.
Sets the Window to be full-screen or not.
int32_t cinder::app::Window::getWidth |
( |
| ) |
const |
Returns the width of the Window in points.
int32_t cinder::app::Window::getHeight |
( |
| ) |
const |
Returns the height of the Window in points.
float cinder::app::Window::getAspectRatio |
( |
| ) |
const |
Returns the Window aspect ratio, which is its width / height.
Area cinder::app::Window::getBounds |
( |
| ) |
const |
Returns the bounding Area of the Window in points: [0,0]-(width,height)
ivec2 cinder::app::Window::getSize |
( |
| ) |
const |
|
virtual |
Gets the size of the Window measured in points.
void cinder::app::Window::setSize |
( |
int32_t |
width, |
|
|
int32_t |
height |
|
) |
| |
Sets the size of the Window to ( width, height ) measured in points.
void cinder::app::Window::setSize |
( |
const ivec2 & |
size | ) |
|
Sets the size of the Window to size measured in points.
ivec2 cinder::app::Window::getPos |
( |
| ) |
const |
Gets the position of the Window's upper-left corner measured in points, relative to the primary display's upper-left corner.
void cinder::app::Window::setPos |
( |
int32_t |
x, |
|
|
int32_t |
y |
|
) |
| const |
Sets the position of the Window's upper-left corner relative to the primary display's upper-left corner to (x, y) measured in points.
void cinder::app::Window::setPos |
( |
const ivec2 & |
pos | ) |
const |
Sets the position of the Window's upper-left corner relative to the primary display's upper-left to pos measured in points.
vec2 cinder::app::Window::getCenter |
( |
| ) |
const |
Returns the center of the Window in its own coordinate system measured in points.
void cinder::app::Window::spanAllDisplays |
( |
| ) |
|
Sets the position and size of the Window so that it spans all connected displays.
float cinder::app::Window::getContentScale |
( |
| ) |
const |
Returns the multiplier (typically 2 on high-density (Retina) displays, 1 otherwise) mapping points to pixels.
float cinder::app::Window::toPixels |
( |
float |
s | ) |
const |
vec2 cinder::app::Window::toPixels |
( |
vec2 |
s | ) |
const |
ivec2 cinder::app::Window::toPixels |
( |
ivec2 |
s | ) |
const |
Area cinder::app::Window::toPixels |
( |
const Area & |
a | ) |
const |
Rectf cinder::app::Window::toPixels |
( |
const Rectf & |
a | ) |
const |
float cinder::app::Window::toPoints |
( |
float |
s | ) |
const |
vec2 cinder::app::Window::toPoints |
( |
vec2 |
s | ) |
const |
ivec2 cinder::app::Window::toPoints |
( |
ivec2 |
s | ) |
const |
Area cinder::app::Window::toPoints |
( |
const Area & |
a | ) |
const |
Rectf cinder::app::Window::toPoints |
( |
const Rectf & |
a | ) |
const |
std::string cinder::app::Window::getTitle |
( |
| ) |
const |
Returns the Window's title as a UTF-8 string.
void cinder::app::Window::setTitle |
( |
const std::string & |
title | ) |
|
Sets the Window's title as a UTF-8 string.
bool cinder::app::Window::isBorderless |
( |
| ) |
const |
Returns whether the window has a border (chrome/frame)
void cinder::app::Window::setBorderless |
( |
bool |
borderless = true | ) |
|
Sets whether the window has a border (chrome/frame)
bool cinder::app::Window::isAlwaysOnTop |
( |
| ) |
const |
Returns whether the window always remains above all other windows.
void cinder::app::Window::setAlwaysOnTop |
( |
bool |
alwaysOnTop = true | ) |
|
Sets whether the window always remains above all other windows.
void cinder::app::Window::hide |
( |
| ) |
|
Hides the window but does not destroy it.
void cinder::app::Window::show |
( |
| ) |
|
Shows a window that was hidden with hide()
bool cinder::app::Window::isHidden |
( |
| ) |
const |
Returns whether the window has been hidden with hide()
void cinder::app::Window::close |
( |
| ) |
|
Closes and destroys the Window.
DisplayRef cinder::app::Window::getDisplay |
( |
| ) |
const |
void * cinder::app::Window::getNative |
( |
| ) |
const |
Returns the associated NSView on Mac OS X, UIView on iOS, or HWND on MSW.
HDC cinder::app::Window::getDc |
( |
| ) |
const |
void cinder::app::Window::emitMouseDown |
( |
MouseEvent * |
event | ) |
|
void cinder::app::Window::emitMouseDrag |
( |
MouseEvent * |
event | ) |
|
void cinder::app::Window::emitMouseUp |
( |
MouseEvent * |
event | ) |
|
void cinder::app::Window::emitMouseMove |
( |
MouseEvent * |
event | ) |
|
void cinder::app::Window::emitMouseWheel |
( |
MouseEvent * |
event | ) |
|
void cinder::app::Window::emitTouchesBegan |
( |
TouchEvent * |
event | ) |
|
void cinder::app::Window::emitTouchesMoved |
( |
TouchEvent * |
event | ) |
|
void cinder::app::Window::emitTouchesEnded |
( |
TouchEvent * |
event | ) |
|
const std::vector< TouchEvent::Touch > & cinder::app::Window::getActiveTouches |
( |
| ) |
const |
Returns a std::vector of all active touches.
void cinder::app::Window::emitKeyDown |
( |
KeyEvent * |
event | ) |
|
void cinder::app::Window::emitKeyUp |
( |
KeyEvent * |
event | ) |
|
EventSignalWindow& cinder::app::Window::getSignalDraw |
( |
| ) |
|
void cinder::app::Window::emitDraw |
( |
| ) |
|
Fires the 'draw' signal. Note in general this should not be called directly as it doesn't perform all necessary setup.
EventSignalWindow& cinder::app::Window::getSignalPostDraw |
( |
| ) |
|
Returns the signal which is emitted after the draw signal and app's draw() virtual method.
EventSignalWindow& cinder::app::Window::getSignalMove |
( |
| ) |
|
void cinder::app::Window::emitMove |
( |
| ) |
|
EventSignalWindow& cinder::app::Window::getSignalResize |
( |
| ) |
|
void cinder::app::Window::emitResize |
( |
| ) |
|
EventSignalWindow& cinder::app::Window::getSignalDisplayChange |
( |
| ) |
|
void cinder::app::Window::emitDisplayChange |
( |
| ) |
|
EventSignalWindow& cinder::app::Window::getSignalClose |
( |
| ) |
|
Returns the Signal emitted whenever a Window is closing. The WindowRef parameter is still valid at this point but its renderer is not.
void cinder::app::Window::emitClose |
( |
| ) |
|
Fires the 'close' signal.
template<typename T >
T* cinder::app::Window::getUserData |
( |
| ) |
|
Returns the window-specific data associated with this Window.
template<typename T >
void cinder::app::Window::setUserData |
( |
T * |
userData | ) |
|
Sets the window-specific data associated with this Window. The variable is deleted
upon destruction of the Window.
bool cinder::app::Window::isValid |
( |
| ) |
const |
Returns whether this Window is valid. false
means it should no longer be used (neither read nor write)
void cinder::app::Window::setInvalid |
( |
| ) |
|
AppBase* cinder::app::Window::getApp |
( |
| ) |
const |
void cinder::app::Window::testValid |
( |
| ) |
const |
|
protected |
void cinder::app::Window::setApp |
( |
AppBase * |
app | ) |
|
|
protected |
void cinder::app::Window::setImpl |
( |
WindowImplCocoa * |
impl | ) |
|
|
protected |
bool cinder::app::Window::mValid |
|
protected |
std::shared_ptr<void> cinder::app::Window::mUserData |
|
protected |
EventSignalWindow cinder::app::Window::mSignalDraw |
|
protected |
EventSignalWindow cinder::app::Window::mSignalPostDraw |
|
protected |
EventSignalWindow cinder::app::Window::mSignalMove |
|
protected |
EventSignalWindow cinder::app::Window::mSignalResize |
|
protected |
EventSignalWindow cinder::app::Window::mSignalDisplayChange |
|
protected |
EventSignalWindow cinder::app::Window::mSignalClose |
|
protected |
WindowImplCocoa* cinder::app::Window::mImpl |
|
protected |
The documentation for this class was generated from the following files: