void YamlImporterApp::fileDrop(ci::app::FileDropEvent event) {
    for(auto it = event.getFiles().begin(); it < event.getFiles().end(); ++it) {
        ModelMaker mm;
        mm.mYamlFileLocation = (*it).string();
        mm.run();
    }
}
Example #2
0
	bool UserStreamPlayer::fileDrop( ci::app::FileDropEvent event ) {
		if(event.getNumFiles() != 1) return false;

		std::string fileRef = event.getFile(0);
		std::cout << fileRef << std::endl;
		setJson( fileRef );
		return true;
	}
Example #3
0
void https_example::fileDrop(ci::app::FileDropEvent event){
	std::vector<std::string> paths;
	for(auto it = event.getFiles().begin(); it < event.getFiles().end(); ++it){
		//paths.push_back((*it).string());

		ds::ui::MediaViewer* mv = new ds::ui::MediaViewer(mEngine, (*it).string(), true);
		mv->initialize();
		mEngine.getRootSprite().addChildPtr(mv);
	}
}
void RibbonPaint::fileDrop( ci::app::FileDropEvent event )
{
    if(_state != kStateNormal) return;

    if(event.getNumFiles() != 1) return;

    std::string fileRef = event.getFile(0);

    ci::IStreamFileRef stream = ci::loadFileStream(fileRef);

    while (stream->isEof() == false)
    {
        std::string currentLine = stream->readLine();
        std::string::size_type locationIndex = currentLine.find( "Parameters Used: [", 0 );

        // Found a match lets set the parameters
        if( locationIndex != std::string::npos )
        {
            setBrushSettingsFromStringParameters(currentLine);
            return;
        }
    }
}
void https_example::fileDrop(ci::app::FileDropEvent event){
	std::vector<std::string> paths;
	for(auto it = event.getFiles().begin(); it < event.getFiles().end(); ++it){
		//paths.push_back((*it).string());
	}
}