MCPcopy Create free account
hub / github.com/cinder/Cinder / setup

Method setup

test/windowTest/src/windowTestApp.cpp:69–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69void WindowTestApp::setup()
70{
71 for( auto display : Display::getDisplays() )
72 CI_LOG_V( "display name: '" << display->getName() << "', bounds: " << display->getBounds() );
73
74 getWindow()->setUserData( new WindowData );
75
76 getWindow()->getSignalMouseDown().connect( signals::slot( this, &WindowTestApp::anotherTest ) );
77 getWindow()->getSignalMouseDown().connect( std::bind( &WindowTestApp::mouseDown1, this, std::placeholders::_1 ) );
78// getWindow()->getSignalMouseDown().connect( std::bind( &WindowTestApp::mouseDown2, this, std::placeholders::_1 ) ); // This shouldn't build because it has the wrong signature (<bool( MouseEvent )>) - to note, the reference is not the problem, just the return value is different.
79 getWindow()->getSignalMouseDown().connect( std::bind( &WindowTestApp::mouseDown3, this, std::placeholders::_1 ) );
80 getSignalShouldQuit().connect( std::bind( &WindowTestApp::shouldQuit, this ) );
81
82 getWindow()->getSignalMove().connect( std::bind( &WindowTestApp::windowMove, this ) );
83 getWindow()->getSignalDraw().connect( std::bind( &WindowTestApp::windowDraw, this ) );
84 getWindow()->getSignalDisplayChange().connect( std::bind( &WindowTestApp::displayChange, this ) );
85 getWindow()->getSignalClose().connect( std::bind( &WindowTestApp::windowClose, this ) );
86
87 getSignalDidBecomeActive().connect( [] { CI_LOG_V( "App became active." ); } );
88 getSignalWillResignActive().connect( [] { CI_LOG_V( "App will resign active." ); } );
89}
90
91bool WindowTestApp::shouldQuit()
92{

Callers

nothing calls this directly

Calls 6

slotFunction · 0.85
getWindowFunction · 0.50
bindFunction · 0.50
getNameMethod · 0.45
getBoundsMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected