00001 /*************************************************************************** 00002 *cr 00003 *cr (C) Copyright 1995-2019 The Board of Trustees of the 00004 *cr University of Illinois 00005 *cr All Rights Reserved 00006 *cr 00007 ***************************************************************************/ 00008 00009 #ifndef VMDTKINTERMENU_H 00010 #define VMDTKINTERMENU_H 00011 00012 #if defined(__APPLE__) 00013 // use the Apple-provided Python framework 00014 #include "Python/Python.h" 00015 #else 00016 #include "Python.h" 00017 #endif 00018 00019 #include "VMDMenu.h" 00020 00022 class VMDTkinterMenu: public VMDMenu { 00023 private: 00024 // handle to the Tk() instance 00025 PyObject *root; 00026 // window creation function 00027 PyObject *func; 00028 00029 protected: 00031 virtual void do_on(); 00032 virtual void do_off(); 00033 00034 public: 00036 VMDTkinterMenu(const char *menuname, PyObject *root, VMDApp *); 00037 virtual ~VMDTkinterMenu(); 00038 00040 void register_windowproc(PyObject *func); 00041 00043 virtual void move(int, int); 00044 00046 virtual void where(int &, int &); 00047 }; 00048 00049 #endif 00050