00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 #ifndef PYTHON_TEXT_INTERP_H
00021 #define PYTHON_TEXT_INTERP_H
00022 
00023 #if defined(__APPLE__)
00024 
00025 #include "Python/Python.h"
00026 #else
00027 #include "Python.h"
00028 #endif
00029 
00030 #include "TextInterp.h"
00031 
00032 class VMDApp;
00033 
00035 class PythonTextInterp : public TextInterp {
00036 private:
00037   VMDApp *app;
00038   int needPrompt;
00039   int have_tkinter;
00040   int in_tk;
00041 
00042 public:
00043   PythonTextInterp(VMDApp *);
00044   ~PythonTextInterp();
00045 
00046   virtual void doEvent();
00047   virtual int doTkUpdate();
00048   virtual int evalString(const char *);
00049   virtual int evalFile(const char *);
00050 
00051   
00052   virtual void frame_cb(int molid, int frame);
00053   
00054   virtual void initialize_structure_cb(int molid, int create_or_destroy);
00055   virtual void molecule_changed_cb(int molid, int code);
00056   
00057   virtual void pick_atom_cb(int molid, int atomid, int shift_state, bool ispick);
00058   
00059   virtual void pick_value_cb(float value);
00060   virtual void python_cb(const char *cmd);
00061   
00062   virtual void timestep_cb(int molid, int frame);
00063   virtual void trajectory_cb(int molid, const char *fname);
00064   virtual void userkey_cb(const char *canonical_key_desc);
00065 };
00066 
00067 #endif