本文整理汇总了C++中VMDApp::VMDexit方法的典型用法代码示例。如果您正苦于以下问题:C++ VMDApp::VMDexit方法的具体用法?C++ VMDApp::VMDexit怎么用?C++ VMDApp::VMDexit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VMDApp
的用法示例。
在下文中一共展示了VMDApp::VMDexit方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: text_cmd_quit
static int text_cmd_quit(ClientData cd, Tcl_Interp *interp, int argc,
const char *argv[]) {
VMDApp *app = (VMDApp *)cd;
// Trigger exit sequence on next display update.
// Avoid calling VMDexit more than once.
if (!app->exitFlag) app->VMDexit("",0,0);
// return TCL_ERROR so that execution of procs or sourcing of files
// stops here as well.
return TCL_ERROR;
}
示例2:
static PyObject *py_vmdexit(PyObject *self, PyObject *args) {
char *msg;
int code = 0;
int pauseseconds = 0;
if (!PyArg_ParseTuple(args, "s|ii", &msg, &code, &pauseseconds))
return NULL;
VMDApp *app = get_vmdapp();
app->VMDexit(msg, code, pauseseconds);
// don't call VMDshutdown, because calling Tcl_Finalize() crashes Tkinter
// Maybe add a callback to the Python atexit module?
Py_INCREF(Py_None);
return Py_None;
}
示例3: hide
// override the hide() method since we have no way of getting it back
void hide() {
if (fl_show_question("Really Quit?", 0))
app->VMDexit("",0,0);
}
示例4: quit_cb
static void quit_cb(Fl_Widget *w, void *) {
VMDApp *app = (VMDApp *)(w->user_data());
if (fl_show_question("Really Quit?", 0))
app->VMDexit("",0,0);
}