Totals runTests( Ptr<Config> const& config ) { Ptr<IConfig const> iconfig = config.get(); Ptr<IStreamingReporter> reporter = makeReporter( config ); reporter = addListeners( iconfig, reporter ); RunContext context( iconfig, reporter ); Totals totals; context.testGroupStarting( config->name(), 1, 1 ); TestSpec testSpec = config->testSpec(); if( !testSpec.hasFilters() ) testSpec = TestSpecParser( ITagAliasRegistry::get() ).parse( "~[.]" ).testSpec(); // All not hidden tests std::vector<TestCase> const& allTestCases = getAllTestCasesSorted( *iconfig ); for( std::vector<TestCase>::const_iterator it = allTestCases.begin(), itEnd = allTestCases.end(); it != itEnd; ++it ) { if( !context.aborting() && matchTest( *it, testSpec, *iconfig ) ) totals += context.runTest( *it ); else reporter->skipTest( *it ); } context.testGroupEnded( iconfig->name(), totals, 1, 1 ); return totals; }
void ofxSimpleGuiToo::setDraw(bool b) { if(doDraw != b) { doDraw = b; if(doDraw) addListeners(); else removeListeners(); if(doAutoSave) saveToXML(); } }
NodeHitbox::NodeHitbox() : Renderable(), mNodeTarget(NULL) { setInteractive(true); addListeners(this); setName("NODE HITBOX"); }
void FboMaskManager::update(){ if(!hasAutoloaded){ editing = false; if(autoload){ mask.load(loadPath); drawToFboBlending(); } hasAutoloaded = true; } //if(drawToOutputs){ // drawToFboBlending(); // drawToOutputs = false; // } if (_editing != editing) { _editing = editing; if (_editing) { addListeners(); } else { removeListeners(); } } if(editing){ if(!blankOutput){ blankOutput = true; drawToFboBlending(); } if(hideMouseWhileEditing){ ofHideCursor(); } else { ofShowCursor(); } if(load){ mask.load(loadPath); load = false; } if(save){ mask.save(loadPath); save = false; } } else { ofShowCursor(); if(blankOutput){ blankOutput = false; drawToFboBlending(); } } }
NodeHitbox::NodeHitbox(Node *node) : mNodeTarget(node) { if (mNodeTarget) { mNodeTarget->retain(); } setInteractive(true); addListeners(this); setName("NODE HITBOX"); }
//-------------------------- ofxGrabCam::ofxGrabCam(bool useMouseListeners) : initialised(true), mouseDown(false), handDown(false), altDown(false), pickCursorFlag(false), drawCursor(false), drawCursorSize(0.1), fixUpwards(true) { this->initialised = false; this->mouseActions = true; this->trackballRadius = 0.5f; this->resetDown = 0; this->mouseWForced = false; ofCamera::setNearClip(0.1); addListeners(); reset(); }
inline bool TestRunner::run(Test* test) { SCOPE_EXIT([=]{ delete test; }); TestResult result; addListeners(result); RepeatedTest repeated(*test, ROLE(TestOptions).repeat()); result.run(repeated); return result.isSucc(); }
void StoreScreen::setStore(game::Store *store) { if (mStore) { removeListeners(mStore); } mStore = store; if (mStore) { addListeners(mStore); } setStoreInventoryIndex(0); }
void PropertiesPanel::setVocabulary( Vocabulary* vocab ) { removeListeners(); editedVocab = vocab; mainLayout->setContentsMargins( 8, 8, 8, 8 ); descriptionMultiLineEdit->setText( editedVocab->getDescription() ); authorField->setText( editedVocab->getAuthor() ); creationDateValueLabel->setText( editedVocab->getCreationDate().toString() ); modificationDateValueLabel->setText( editedVocab->getModificationDate().toString() ); updateCounters(); addListeners(); }
void PropertiesPanel::setFolder( Folder* folder ) { removeListeners(); editedFolder = folder; mainLayout->setContentsMargins( 0, 0, 0, 0 ); descriptionMultiLineEdit->setText( editedFolder->getDescription() ); authorField->setText( editedFolder->getAuthor() ); creationDateValueLabel->setText( editedFolder->getCreationDate().toString() ); modificationDateValueLabel->setText( editedFolder->getModificationDate().toString() ); updateCounters(); addListeners(); }
void ofxSimpleGuiToo::setDraw(bool b) { if(doDraw != b) { doDraw = b; if(doDraw){ addListeners(); //mark: enable current page if(currentPage >= 0 & currentPage < pages.size()){ pages[currentPage]->enable(); } } else { //mark: disable all pages for(int i=0; i<pages.size(); i++) pages[i]->disable(); removeListeners(); } if(doAutoSave) saveToXML(); } }
//-------------------------------------------------------------- void ofxMtlMapping2D::init(int width, int height, string mappingXmlFilePath, string uiXmlFilePath, int numSample) { // The first we call ofxMtlMapping2DControls::mapping2DControls() we pass the xml file to use as param. ofxMtlMapping2DControls::mapping2DControls(uiXmlFilePath)->disable(); // ---- _fbo.allocate(width, height, GL_RGBA, numSample); // ---- ofxMtlMapping2DSettings::infoFont.loadFont("mapping/controls/ReplicaBold.ttf", 10); // ---- _mappingXmlFilePath = mappingXmlFilePath; loadShapesList(); // --- addListeners(); }
Menu::Menu(void){ // Default variables. visible = true; menuX = 650; menuY = 250; // Load Menu resources. font_small.loadFont("DroidSans.ttf", 12); font_large.loadFont("DroidSans.ttf", 18); img_hdd.loadImage("hdd.png"); // Load menu items. ofPtr<MenuItem> item(new MenuItem()); item->name = "Presentations"; item->path = "Presentations"; rootItem = item; activeItem = item; loadMenuItems(ofDirectory("Presentations"), item); // Listen to events for drawing, mouse and keyboard. addListeners(); }
void Menu::unhide(){ visible = true; addListeners(); }