本文整理汇总了C++中Files::unloadFile方法的典型用法代码示例。如果您正苦于以下问题:C++ Files::unloadFile方法的具体用法?C++ Files::unloadFile怎么用?C++ Files::unloadFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Files
的用法示例。
在下文中一共展示了Files::unloadFile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mousePressed
void mousePressed(int x, int y, int button) {
x /= globalScale;
y /= globalScale;
canvas.mousePressed(x, y, button);
side.mousePressed(x, y, button);
// cout << btnHelpPos.distance(ofPoint(x,y)) << endl;
if (btnHelpPos.distance(ofPoint(x,y))<btnHelp.width/2) showHelp();
if (btnNew.hitTest(x,y)) { files.cur=-1; canvas.clear(); files.unloadFile(); }
if (btnSave.hitTest(x,y)) files.save();
if (btnLoadPrevious.hitTest(x,y)) files.loadPrevious();
if (btnLoadNext.hitTest(x,y)) files.loadNext();
if (btnPrint.hitTest(x,y)) print();
if (btnStop.hitTest(x,y)) stop();
if (btnOops.hitTest(x,y)) { btnOops.selected=true; }
if (btnZoomIn.hitTest(x,y)) btnZoomIn.selected=true;
if (btnZoomOut.hitTest(x,y)) btnZoomOut.selected=true;
if (btnHigher.hitTest(x,y)) btnHigher.selected=true;
if (btnLower.hitTest(x,y)) btnLower.selected=true;
if (btnTwistLeft.hitTest(x,y)) btnTwistLeft.selected=true;
if (btnTwistRight.hitTest(x,y)) btnTwistRight.selected=true;
if (shapeButtons.inside(x,y)) {
int index = ofNormalize(x,shapeButtons.x,shapeButtons.x+shapeButtons.width) * shapeString.size();
side.setShape(shapeString.at(index));
}
}
示例2: keyPressed
void keyPressed(int key) {
switch (key) {
case '/': case '\\': case '$': case '#': case '|': case '%': case '@': case '^': case '&': case '_': side.setShape(key); break;
case '3': side.is3D=!side.is3D; break;
case '<': twists-=.5; break;
case '>': twists+=.5; break;
case '\'': twists=0; break;
case '?': showHelp(); break;
case 'a': side.toggle(); break;
case 'b': useSubpathColors=!useSubpathColors; break;
case 'C': canvas.createCircle(); break;
case 'c': canvas.clear(); files.unloadFile(); break;
case 'd': debug=!debug; refreshDebugInfo(); break;
case 'e': print(true); break;
case 'f': ofToggleFullscreen(); break;
case 'k': path.setFilled(!path.isFilled()); path.flagShapeChanged(); break;
case 'h': objectHeight+=5; if (objectHeight>maxObjectHeight) objectHeight=maxObjectHeight; break;
case 'H': objectHeight-=5; if (objectHeight<3) objectHeight=3; break;
case 'G': ultimaker.sendCommand("G28 X0 Y0 Z0\nM84",2); break;
case 'A': ultimaker.sendCommand("M84"); break;
case 'T': ultimaker.sendCommand("M109 S230"); break;
case 'l': files.loadNext(); break;
case 'L': files.loadPrevious(); break;
case 'o': files.load(); break;
case 'p': case 'm': case OF_KEY_RETURN: print(); break;
case 'q': stop(); break;
// case 'r': ultimaker.setRelative(); break;
case 'S': files.save(); break;
case 's': files.saveAs(); break;
case '`': showSubPathLines=!showSubPathLines;
case 't': ultimaker.sendCommand("M105",1); break;
case 'u': case 'z': canvas.undo(); break;
case '~': files.deleteCurrentFile(); break;
case ' ': files.listDir(); break;
case 'x': files.saveSvg(resourceFolder+"template.svg",documentFolder+"output.svg"); break;
case 27: if (ultimaker.isThreadRunning()) ultimaker.stopThread(); break;
case 'n': cloneApp(); break; //run new instance of Doodle3D
case 'i': cout << getNumInstances() << endl; break;
}
}