static void curframe_cb(Fl_Widget *w, void *v) { Fl_Input *inp = (Fl_Input *)w; VMDApp *app = (VMDApp *)v; int val = atoi(inp->value()); int max = app->molecule_numframes(app->molecule_top()); if (val < 0) val = 0; if (val >= max) val = max-1; app->animation_set_frame(val); }
static PyObject *anim_goto(PyObject *self, PyObject *args) { int frame; if (!PyArg_ParseTuple(args, (char *)"i", &frame)) return NULL; VMDApp *app = get_vmdapp(); app->animation_set_frame(frame); Py_INCREF(Py_None); return Py_None; }
static void stop_cb(Fl_Widget *, void *v) { VMDApp *app = (VMDApp *)v; app->animation_set_frame(-2); }