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

PythonTextInterp Class Reference

TextInterp subclass implementing the Python-based text command interpreter. More...

#include <PythonTextInterp.h>

Inheritance diagram for PythonTextInterp:

TextInterp List of all members.

Public Methods

 PythonTextInterp (VMDApp *)
 ~PythonTextInterp ()
virtual void doEvent ()
 Let the interpreter have control for while. More...

virtual int doTkUpdate ()
 Update Tk, if possible, from within this interpreter return 1 if able to do the Tk update, 0 if unsuccessful. More...

virtual int evalString (const char *)
 Pass the given string to the interpreter. Return success. More...

virtual int evalFile (const char *)
 Process the given file. Return success. More...

virtual void frame_cb (int molid, int frame)
virtual void initialize_structure_cb (int molid, int create_or_destroy)
virtual void molecule_changed_cb (int molid, int code)
virtual void pick_atom_cb (int molid, int atomid, int shift_state, bool ispick)
virtual void pick_value_cb (float value)
virtual void python_cb (const char *cmd)
virtual void timestep_cb (int molid, int frame)
virtual void trajectory_cb (int molid, const char *fname)
virtual void userkey_cb (const char *canonical_key_desc)

Detailed Description

TextInterp subclass implementing the Python-based text command interpreter.

Definition at line 35 of file PythonTextInterp.h.


Constructor & Destructor Documentation

PythonTextInterp::PythonTextInterp (  VMDApp *    ) 
 

Definition at line 162 of file PythonTextInterp.C.

References VMDApp::argc_m, VMDApp::argv_m, as_pystring, CAST_HACK, evalString, NULL, PyInit_vmd, and set_vmdapp.

PythonTextInterp::~PythonTextInterp (    ) 
 

Definition at line 256 of file PythonTextInterp.C.


Member Function Documentation

void PythonTextInterp::doEvent (    )  [virtual]
 

Let the interpreter have control for while.

Reimplemented from TextInterp.

Definition at line 289 of file PythonTextInterp.C.

References call_callbacks, VMDApp::textinterp_change, and vmd_check_stdin.

int PythonTextInterp::doTkUpdate (    )  [virtual]
 

Update Tk, if possible, from within this interpreter return 1 if able to do the Tk update, 0 if unsuccessful.

Reimplemented from TextInterp.

Definition at line 261 of file PythonTextInterp.C.

References evalString.

int PythonTextInterp::evalFile (  const char *    s )  [virtual]
 

Process the given file. Return success.

Reimplemented from TextInterp.

Definition at line 320 of file PythonTextInterp.C.

int PythonTextInterp::evalString (  const char *    s )  [virtual]
 

Pass the given string to the interpreter. Return success.

Reimplemented from TextInterp.

Definition at line 313 of file PythonTextInterp.C.

Referenced by doTkUpdate, python_cb, and PythonTextInterp.

void PythonTextInterp::frame_cb (  int    molid,
int    frame
)  [virtual]
 

Reimplemented from TextInterp.

Definition at line 331 of file PythonTextInterp.C.

References call_callbacks.

void PythonTextInterp::initialize_structure_cb (  int    molid,
int    create_or_destroy
)  [virtual]
 

Reimplemented from TextInterp.

Definition at line 336 of file PythonTextInterp.C.

References call_callbacks.

void PythonTextInterp::molecule_changed_cb (  int    molid,
int    code
)  [virtual]
 

Reimplemented from TextInterp.

Definition at line 341 of file PythonTextInterp.C.

References call_callbacks.

void PythonTextInterp::pick_atom_cb (  int    molid,
int    atomid,
int    shift_state,
bool    ispick
)  [virtual]
 

Reimplemented from TextInterp.

Definition at line 346 of file PythonTextInterp.C.

References call_callbacks.

void PythonTextInterp::pick_value_cb (  float    value )  [virtual]
 

Reimplemented from TextInterp.

Definition at line 357 of file PythonTextInterp.C.

References call_callbacks.

void PythonTextInterp::python_cb (  const char *    cmd )  [virtual]
 

Reimplemented from TextInterp.

Definition at line 372 of file PythonTextInterp.C.

References evalString.

void PythonTextInterp::timestep_cb (  int    molid,
int    frame
)  [virtual]
 

Reimplemented from TextInterp.

Definition at line 362 of file PythonTextInterp.C.

References call_callbacks.

void PythonTextInterp::trajectory_cb (  int    molid,
const char *    fname
)  [virtual]
 

Reimplemented from TextInterp.

Definition at line 367 of file PythonTextInterp.C.

References call_callbacks.

void PythonTextInterp::userkey_cb (  const char *    canonical_key_desc )  [virtual]
 

Reimplemented from TextInterp.

Definition at line 376 of file PythonTextInterp.C.

References call_callbacks.


The documentation for this class was generated from the following files:
Generated on Fri Jan 23 01:53:05 2026 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002