Cinder  0.9.1
Functions | Variables
AppImplCocoaTouch.mm File Reference
#import "cinder/app/cocoa/AppImplCocoaTouch.h"
#include "cinder/app/cocoa/PlatformCocoa.h"

Functions

 if (!mDisplay) mDisplay
 
 if (mDisplay==cinder::Display::getMainDisplay())[mUiWindow makeKeyAndVisible]
 
 return ((supportedOrientations &orientation)!=0)
 
 switch (options.getType())
 
mAppImpl mApp emitKeyboardWillHide ()
 
 for (NSUInteger i=0;i< n;i++)
 
 if ([text length]==0)
 
else if (mKeyboardClosesOnReturn &&[text isEqualToString:@"\n"])
 
 if (utf8KeyboardChar) mAppImpl-> mKeyboardString=std::string(utf8KeyboardChar)
 
 if (mAppImpl->mUpdateHasFired) mWindowRef-> emitDraw()
 
event setWindow (mWindowRef)
 
mWindowRef emitMouseDown (event)
 
mWindowRef emitMouseDrag (event)
 
mWindowRef emitMouseUp (event)
 
mWindowRef emitTouchesBegan (event)
 
mWindowRef emitTouchesMoved (event)
 
mWindowRef emitTouchesEnded (event)
 
mWindowRef emitKeyDown (event)
 
event setHandled (false)
 
mWindowRef emitKeyUp (event)
 

Variables

WindowImplCocoaTouchinitWithFormat
 
self wantsFullScreenLayout = YES
 
 mAppImpl = appImpl
 
 mResizeHasFired = NO
 
 mKeyboardVisible = NO
 
 mUiWindow = NULL
 
 mRootViewController = format.getRootViewController() ? format.getRootViewController() : self
 
 mDisplay = format.getDisplay()
 
cinder::Area screenBounds = mDisplay->getBounds()
 
CGRect screenBoundsCgRect
 
screenBoundsCgRect origin x = 0
 
screenBoundsCgRect origin y = 0
 
screenBoundsCgRect size width = screenBounds.getWidth()
 
screenBoundsCgRect size height = screenBounds.getHeight()
 
 mCinderView = [[CinderViewCocoaTouch alloc] initWithFrame:screenBoundsCgRect app:mAppImpl->mApp renderer:format.getRenderer() sharedRenderer:sharedRenderer]
 
 mSize = cinder::ivec2( screenBoundsCgRect.size.width, screenBoundsCgRect.size.height )
 
 mPos = cinder::ivec2( 0, 0 )
 
 mWindowRef = Window::privateCreate__( self, mAppImpl->mApp )
 
return self
 
void finishLoad
 
mUiWindow screen = screen
 
mUiWindow rootViewController = mRootViewController
 
else mUiWindow hidden = NO
 
void dealloc
 
void loadView
 
self view = mCinderView
 
BOOL prefersStatusBarHidden
 
BOOL shouldAutorotateToInterfaceOrientation
 
InterfaceOrientation orientation = [mAppImpl convertInterfaceOrientation:toInterfaceOrientation]
 
uint32_t supportedOrientations = mAppImpl->mApp->emitSupportedOrientations()
 
void willAnimateRotationToInterfaceOrientation
 
void didRotateFromInterfaceOrientation
 
void showKeyboard
 
 mKeyboardClosesOnReturn = options.getCloseOnReturn()
 
void hideKeyboard
 
bool isKeyboardVisible
 
void setKeyboardString
 
void keyboardWillShow
 
void keyboardWillHide
 
UITextView * keyboardTextView
 
bool canBecomeFirstResponder
 
void insertText
 
void r
 
void return
 
NSUInteger n = [text length]
 
void deleteBackward
 
BOOL hasText
 
BOOL textView
 
 else [currentString replaceCharactersInRange:range withString:text]
 
const char * utf8KeyboardChar = [currentString UTF8String]
 
bool isFullScreen
 
void setFullScreen
 
void setSize
 
void setPos
 
RendererRef getRenderer
 
void * getNative
 
UIViewController * getNativeViewController
 
const std::vector< TouchEvent::Touch > & getActiveTouches
 
void draw
 
void resize
 
void mouseDown
 
void mouseDrag
 
void mouseUp
 
void touchesBegan
 
void touchesMoved
 
void touchesEnded
 
WindowRef getWindowRef
 
void keyDown
 

Function Documentation

if ( mDisplay)
return ( (supportedOrientations &orientation)!  = 0)
switch ( options.  getType())
mAppImpl mApp emitKeyboardWillHide ( )
for ( )
if ( )
else if ( mKeyboardClosesOnReturn &&  [text isEqualToString:@"\n"])
if ( utf8KeyboardChar  ) -> mKeyboardString=std::string(utf8KeyboardChar)
if ( mAppImpl->  mUpdateHasFired) -> emitDraw()
event setWindow ( mWindowRef  )
mWindowRef emitMouseDown ( event  )
mWindowRef emitMouseDrag ( event  )
mWindowRef emitMouseUp ( event  )
mWindowRef emitTouchesBegan ( event  )
mWindowRef emitTouchesMoved ( event  )
mWindowRef emitTouchesEnded ( event  )
mWindowRef emitKeyDown ( event  )
event setHandled ( false  )
mWindowRef emitKeyUp ( event  )

Variable Documentation

WindowImplCocoaTouch* initWithFormat
self wantsFullScreenLayout = YES
mAppImpl = appImpl
mResizeHasFired = NO
mKeyboardVisible = NO
mUiWindow = NULL
mRootViewController = format.getRootViewController() ? format.getRootViewController() : self
mDisplay = format.getDisplay()
cinder::Area screenBounds = mDisplay->getBounds()
CGRect screenBoundsCgRect
mSize x = 0
mSize y = 0
screenBoundsCgRect size width = screenBounds.getWidth()
screenBoundsCgRect size height = screenBounds.getHeight()
mCinderView = [[CinderViewCocoaTouch alloc] initWithFrame:screenBoundsCgRect app:mAppImpl->mApp renderer:format.getRenderer() sharedRenderer:sharedRenderer]
mPos = cinder::ivec2( 0, 0 )
mWindowRef = Window::privateCreate__( self, mAppImpl->mApp )
return self
void finishLoad
Initial value:
{
UIScreen *screen = std::dynamic_pointer_cast<cinder::DisplayCocoaTouch>( mDisplay )->getUiScreen()
mUiWindow screen
Definition: AppImplCocoaTouch.mm:392
mDisplay
Definition: AppImplCocoaTouch.mm:368
Represents a monitor/display on iOS.
Definition: PlatformCocoa.h:165
mUiWindow screen = screen
mUiWindow rootViewController = mRootViewController
else mUiWindow hidden = NO
void dealloc
Initial value:
{
if( mKeyboardTextView ) {
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil];
[mKeyboardTextView release];
}
[mUiWindow release]
mUiWindow
Definition: AppImplCocoaTouch.mm:365
void loadView
Initial value:
{
[super loadView]
void loadView
Definition: AppImplCocoaTouch.mm:415
self view = mCinderView
BOOL prefersStatusBarHidden
Initial value:
{
return mAppImpl->mStatusBarShouldHide
mAppImpl
Definition: AppImplCocoaTouch.mm:362
BOOL shouldAutorotateToInterfaceOrientation
InterfaceOrientation orientation = [mAppImpl convertInterfaceOrientation:toInterfaceOrientation]
uint32_t supportedOrientations = mAppImpl->mApp->emitSupportedOrientations()
void willAnimateRotationToInterfaceOrientation
void didRotateFromInterfaceOrientation
void showKeyboard
mKeyboardClosesOnReturn = options.getCloseOnReturn()
void hideKeyboard
Initial value:
{
return
mKeyboardVisible
Definition: AppImplCocoaTouch.mm:364
bool isKeyboardVisible
Initial value:
{
mKeyboardVisible
Definition: AppImplCocoaTouch.mm:364
void setKeyboardString
void keyboardWillShow
void keyboardWillHide
UITextView* keyboardTextView
Initial value:
{
if( ! mKeyboardTextView ) {
mKeyboardTextView = [[UITextView alloc] initWithFrame:CGRectZero];
mKeyboardTextView.hidden = YES;
mKeyboardTextView.delegate = self;
mKeyboardTextView.autocapitalizationType = UITextAutocapitalizationTypeNone;
mKeyboardTextView.autocorrectionType = UITextAutocorrectionTypeNo;
[mCinderView addSubview:mKeyboardTextView];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
}
return mKeyboardTextView
mCinderView
Definition: AppImplCocoaTouch.mm:379
void keyboardWillShow
Definition: AppImplCocoaTouch.mm:518
void keyboardWillHide
Definition: AppImplCocoaTouch.mm:524
bool canBecomeFirstResponder
Initial value:
{
return NO
void insertText
void r
void return
NSUInteger n = [text length]
void deleteBackward
Initial value:
{
KeyEvent keyEvent( mWindowRef, KeyEvent::KEY_BACKSPACE, '\b', '\b', 0, 0 )
mWindowRef
Definition: AppImplCocoaTouch.mm:383
Represents a keyboard event.
Definition: KeyEvent.h:32
BOOL hasText
Initial value:
{
return YES
BOOL textView
else
Initial value:
{
for( int i = 0; i < [text length]; i++) {
unichar c = [text characterAtIndex:i];
int keyCode = ( c < 127 ? c : KeyEvent::KEY_UNKNOWN );
KeyEvent keyEvent( mWindowRef, keyCode, c, c, 0, 0 );
[self keyDown:&keyEvent];
}
}
return YES
void keyDown
Definition: AppImplCocoaTouch.mm:804
float length(const ColorT< T > &c)
Definition: Color.h:356
mWindowRef
Definition: AppImplCocoaTouch.mm:383
Represents a keyboard event.
Definition: KeyEvent.h:32
const char* utf8KeyboardChar = [currentString UTF8String]
bool isFullScreen
Initial value:
{
return YES
void setFullScreen
void setSize
Initial value:
{
return mSize
mSize
Definition: AppImplCocoaTouch.mm:381
void setPos
Initial value:
{
return mPos
mPos
Definition: AppImplCocoaTouch.mm:382
RendererRef getRenderer
Initial value:
{
return mDisplay
mDisplay
Definition: AppImplCocoaTouch.mm:368
void* getNative
Initial value:
{
return mCinderView
mCinderView
Definition: AppImplCocoaTouch.mm:379
UIViewController* getNativeViewController
Initial value:
{
return self
const std::vector<TouchEvent::Touch>& getActiveTouches
Initial value:
{
const std::vector< TouchEvent::Touch > & getActiveTouches
Definition: AppImplCocoaTouch.mm:729
mCinderView
Definition: AppImplCocoaTouch.mm:379
void draw
Initial value:
{
[mAppImpl setActiveWindow:self]
mAppImpl
Definition: AppImplCocoaTouch.mm:362
void resize
Initial value:
{
[mAppImpl setActiveWindow:self]
mAppImpl
Definition: AppImplCocoaTouch.mm:362
void mouseDown
void mouseDrag
void mouseUp
void touchesBegan
void touchesMoved
void touchesEnded
WindowRef getWindowRef
Initial value:
{
return mWindowRef
mWindowRef
Definition: AppImplCocoaTouch.mm:383
void keyDown