Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

py_menu.C File Reference

#include "py_commands.h"
#include "VMDTkinterMenu.h"
#include "VMDApp.h"

Go to the source code of this file.

Functions

PyObject * py_menushow (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_location (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_addmenu (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_registermenu (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * initvmdmenu (void)

Variables

const char show_doc []
const char loc_doc []
const char add_doc []
const char register_doc []
PyMethodDef methods []
const char menu_moddoc []


Function Documentation

PyObject* initvmdmenu void   
 

Definition at line 196 of file py_menu.C.

References menu_moddoc, and methods.

PyObject* py_addmenu PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 93 of file py_menu.C.

References VMDApp::add_menu, get_vmdapp, VMDApp::menu_add_extension, and NULL.

PyObject* py_location PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 59 of file py_menu.C.

References get_vmdapp, VMDApp::menu_id, VMDApp::menu_location, VMDApp::menu_move, and NULL.

PyObject* py_menushow PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 20 of file py_menu.C.

References get_vmdapp, VMDApp::menu_id, VMDApp::menu_show, VMDApp::menu_status, NULL, and result.

PyObject* py_registermenu PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 129 of file py_menu.C.

References VMDApp::add_menu, get_vmdapp, VMDApp::menu_add_extension, NULL, and VMDTkinterMenu::register_windowproc.


Variable Documentation

const char add_doc[] [static]
 

Initial value:

"Add a new entry to a VMD menu\n\n"
"Args:\n"
"    name (str): Name of new menu to add\n"
"    root (TKinter menu): Root menu to add this menu under\n"

Definition at line 88 of file py_menu.C.

const char loc_doc[] [static]
 

Initial value:

"Sets or queries menu location\n\n"
"Args:\n"
"    name (str): Menu name\n"
"    location (tuple of ints): (x,y) position to set menu location, or None\n"
"        to query current menu location\n"
"Returns:\n"
"    (tuple of ints): (x, y) updated menu location"

Definition at line 51 of file py_menu.C.

const char menu_moddoc[] [static]
 

Initial value:

"Methods to manipulate GUI menus"

Definition at line 181 of file py_menu.C.

Referenced by initvmdmenu.

PyMethodDef methods[] [static]
 

Initial value:

 {
  {"add", (PyCFunction)py_addmenu, METH_VARARGS | METH_KEYWORDS, add_doc},
  {"register", (PyCFunction)py_registermenu, METH_VARARGS | METH_KEYWORDS, register_doc},
  {"show", (PyCFunction)py_menushow, METH_VARARGS | METH_KEYWORDS, show_doc},
  {"location", (PyCFunction)py_location, METH_VARARGS | METH_KEYWORDS, loc_doc},
  {NULL, NULL}
}

Definition at line 172 of file py_menu.C.

Referenced by initvmdmenu.

const char register_doc[] [static]
 

Initial value:

"Add an item to a menu and register a function to be called when it is "
"selected.\n\nArgs:\n"
"    name (str): Name of menu to add\n"
"    function (callable): Function to call when menu selected\n"
"    menupath (str): Path to add menu to, if it will be a submenu.\n"
"        Defaults to adding to the root menu"

Definition at line 122 of file py_menu.C.

const char show_doc[] [static]
 

Initial value:

"Show or hide a registered window, or queries window visibility\n\n"
"Args:\n"
"    name (str): Window name\n"
"    visible (bool): Whether or not window is visible, or None to query"
"Returns:\n"
"    (bool): Updated visibility status of menu"

Definition at line 13 of file py_menu.C.


Generated on Fri Mar 29 02:46:49 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002