//------------------------------------------------------------------------------ //! DFDrawCircleNode::DFDrawCircleNode(): _color( 1.0f ), _center( 0.0f ), _radius( 16.0f ) { _output.delegate( makeDelegate( this, &DFDrawCircleNode::process ) ); }
//------------------------------------------------------------------------------ //! DFDrawRectNode::DFDrawRectNode(): _color( 1.0f ), _center( 0.0f ), _size( 16.0f ) { _output.delegate( makeDelegate( this, &DFDrawRectNode::process ) ); }
//------------------------------------------------------------------------------ //! void ComboBox::init( VMState* vm ) { VM::get( vm, 1, "itemId", _itemId ); VM::get( vm, 1, "onItemChanged", _onItemChangedRef ); VM::get( vm, 1, "menuOffset", _offset ); VM::get( vm, 1, "menuAbove", _menuAbove ); // Get menu. RCP<Widget> menu; VM::getWidget( vm, 1, "menu", menu ); _menu = static_cast<Menu*>( menu.ptr() ); _menu->addOnItemSelect( makeDelegate( this, &ComboBox::itemSelected ) ); _menu->addOnPopup( makeDelegate( this, &ComboBox::popupped ) ); _item = _menu->findWidget( _itemId ); // Base class init. Widget::init( vm ); }
void disconnect( Y * obj, void (X::*func)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8 ) const ) { _Delegate& eq = makeDelegate( obj, func ); for (DelegateIterator it = delegateList.begin(); it != delegateList.end(); ++it) if( *it == eq ) { delegateList.erase( it ); return; } }
void disconnect( Y * obj, void (X::*func)() const ) { _Delegate& eq = makeDelegate( obj, func ); for (DelegateList::iterator it = delegateList.begin(); it != delegateList.end(); ++it) if( *it == eq ) { delegateList.erase( it ); return; } }
ConsoleUpdater::ConsoleUpdater(int argc, char* argv[]) : _d( new Impl ) { _d->options.reset( argc, argv ); _d->controller.reset( new UpdateController( *this, vfs::Path( argv[0] ), _d->options ) ); _d->done = false; _d->abortSignalHandler = makeDelegate( this, &ConsoleUpdater::onAbort); _d->outcome = ConsoleUpdater::None; _initAbortSignalHandler(); }
void PostponeEvent::_exec(Game& game, unsigned int) { Logger::warning( "Start event name=" + _name + " type=" + _type ); Impl::Worker workers[3] = { makeDelegate( _d.data(), &Impl::executeRequest ), makeDelegate( _d.data(), &Impl::executeEvent ), makeDelegate( _d.data(), &Impl::executeCityService ) }; for( int i=0; i < 3; i++ ) { bool execOk; workers[i]( game, _type, execOk ); if( execOk ) { _executeIncludeEvents(); return; } } _d->mayDelete = true; }
void UpdateController::StartOrContinue() { assert(_synchronizer == NULL); // debug builds take this seriously if( _synchronizer.isNull() ) { ExceptionSafeThreadPtr p( new ExceptionSafeThread( makeDelegate( this, &UpdateController::run )) ); p->SetThreadType( ThreadTypeIntervalDriven ); p->drop(); _synchronizer = p; } }
void connect( Y * obj, void (X::*func)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5, Param6 p6, Param7 p7, Param8 p8 ) const ) { delegateList.push_back( makeDelegate( obj, func ) ); }
void connect( Y * obj, void (X::*func)() const ) { delegateList.push_back( makeDelegate( obj, func ) ); }
void connect( Y * obj, void (X::*func)( Param1 p1, Param2 p2, Param3 p3, Param4 p4, Param5 p5 ) ) { delegateList.push_back( makeDelegate( obj, func ) ); }
void connect( Y * obj, void (X::*func)( Param1 p1 ) ) { delegateList.push_back( makeDelegate( obj, func ) ); }
//------------------------------------------------------------------------------ //! DFImportImageNode::DFImportImageNode() { _output.delegate( makeDelegate( this, &DFImportImageNode::process ) ); }
//------------------------------------------------------------------------------ //! DFMappingNode::DFMappingNode(): _input(this), _scale(1.0f), _offset(0.0f) { _output.delegate( makeDelegate( this, &DFMappingNode::process ) ); }
//------------------------------------------------------------------------------ //! DFFillColorNode::DFFillColorNode(): _color( 0.0f ) { _output.delegate( makeDelegate( this, &DFFillColorNode::process ) ); }
//------------------------------------------------------------------------------ //! DFMaterialIDNode::DFMaterialIDNode(): _input(this), _matID(0) { _output.delegate( makeDelegate( this, &DFMaterialIDNode::process ) ); }
//------------------------------------------------------------------------------ //! DFPolygonNode::DFPolygonNode() { _output.delegate( makeDelegate( this, &DFPolygonNode::process ) ); _polygon = new DFPolygon(); }
void setDrawFunction( Y* obj, void (X::*func)( Tile& ) ) { drawTileFunction = makeDelegate( obj, func ); }
//------------------------------------------------------------------------------ //! DFNoiseImageNode::DFNoiseImageNode(): _type( TYPE_CELL ) { setDefaults(); _output.delegate( makeDelegate( this, &DFNoiseImageNode::process ) ); }