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

TclTextInterp Class Reference

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

#include <TclTextInterp.h>

Inheritance diagram for TclTextInterp:

TextInterp List of all members.

Public Methods

 TclTextInterp (VMDApp *)
 ~TclTextInterp ()
virtual void doInit ()
 Tell the interpreter to read its init file; presumably it knows what to do. More...

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 *)
 Evaluate the given string in the Tcl interpreter. Return success, or false on Tcl error. More...

virtual int evalFile (const char *)
 this evalFile reads lines one at a time and calls VMD display update every time it reads a complete command. Returns success. More...

virtual void setString (const char *, const char *)
 First argument: variable name. Second argument: string value. More...

Tcl_Interp * get_interp ()
void wait (float wd)
 set the text processor to wait for the given number of seconds before reading another text command. More...

int done_waiting ()
virtual void frame_cb (int molid, int frame)
virtual void help_cb (const char *topic)
virtual void initialize_structure_cb (int molid, int create_or_destroy)
virtual void molecule_changed_cb (int molid, int code)
virtual void logfile_cb (const char *cmd)
virtual void mousemode_cb (const char *mode, int submode)
virtual void mouse_pos_cb (float x, float y, int buttondown)
virtual void spaceball_cb (float tx, float ty, float tz, float rx, float ry, float rz, int buttondown)
virtual void pick_atom_cb (int molid, int atomid, int shift_state, bool is_pick)
virtual void pick_atom_callback_cb (int molid, int atm, const char *client)
virtual void pick_selection_cb (int n, const int *atoms)
virtual void pick_value_cb (float value)
virtual void pick_graphics_cb (int molid, int tag, int btn, int shift_state)
virtual void tcl_cb (const char *cmd)
virtual void timestep_cb (int molid, int frame)
virtual void trajectory_cb (int molid, const char *fname)
virtual void graph_label_cb (const char *type, const int *ids, int n)
virtual void userkey_cb (const char *canonical_key_desc)

Detailed Description

TextInterp subclass implementing the Tcl-based text command interpreter.

Definition at line 35 of file TclTextInterp.h.


Constructor & Destructor Documentation

TclTextInterp::TclTextInterp VMDApp  
 

Definition at line 102 of file TclTextInterp.C.

References VMDApp::argc_m, VMDApp::argv_m, VMDApp::display, NULL, DisplayDevice::supports_gui, and vmd_isatty.

TclTextInterp::~TclTextInterp  
 

Definition at line 230 of file TclTextInterp.C.

References NULL, and setString.


Member Function Documentation

void TclTextInterp::doEvent   [virtual]
 

Let the interpreter have control for while.

Reimplemented from TextInterp.

Definition at line 247 of file TclTextInterp.C.

References done_waiting, VMDApp::get_eofexit, NULL, vmd_check_stdin, vmdcon_append, vmdcon_purge, and VMDApp::VMDexit.

void TclTextInterp::doInit   [virtual]
 

Tell the interpreter to read its init file; presumably it knows what to do.

Reimplemented from TextInterp.

Definition at line 182 of file TclTextInterp.C.

References NULL.

int TclTextInterp::done_waiting  
 

Definition at line 422 of file TclTextInterp.C.

References time_of_day.

Referenced by doEvent.

int TclTextInterp::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 241 of file TclTextInterp.C.

int TclTextInterp::evalFile const char *    [virtual]
 

this evalFile reads lines one at a time and calls VMD display update every time it reads a complete command. Returns success.

Reimplemented from TextInterp.

Definition at line 370 of file TclTextInterp.C.

References VMDApp::display_update, VMDApp::exitFlag, NULL, vmdcon_append, and vmdcon_purge.

Referenced by text_cmd_play.

int TclTextInterp::evalString const char *    [virtual]
 

Evaluate the given string in the Tcl interpreter. Return success, or false on Tcl error.

Reimplemented from TextInterp.

Definition at line 336 of file TclTextInterp.C.

Referenced by help_cb, tcl_cb, and userkey_cb.

void TclTextInterp::frame_cb int    molid,
int    frame
[virtual]
 

Reimplemented from TextInterp.

Definition at line 435 of file TclTextInterp.C.

Tcl_Interp* TclTextInterp::get_interp   [inline]
 

Definition at line 72 of file TclTextInterp.h.

void TclTextInterp::graph_label_cb const char *    type,
const int *    ids,
int    n
[virtual]
 

Reimplemented from TextInterp.

Definition at line 528 of file TclTextInterp.C.

References NULL.

void TclTextInterp::help_cb const char *    topic [virtual]
 

Reimplemented from TextInterp.

Definition at line 442 of file TclTextInterp.C.

References evalString.

void TclTextInterp::initialize_structure_cb int    molid,
int    create_or_destroy
[virtual]
 

Reimplemented from TextInterp.

Definition at line 456 of file TclTextInterp.C.

void TclTextInterp::logfile_cb const char *    cmd [virtual]
 

Reimplemented from TextInterp.

Definition at line 465 of file TclTextInterp.C.

References setString.

void TclTextInterp::molecule_changed_cb int    molid,
int    code
[virtual]
 

Reimplemented from TextInterp.

Definition at line 448 of file TclTextInterp.C.

void TclTextInterp::mouse_pos_cb float    x,
float    y,
int    buttondown
[virtual]
 

Reimplemented from TextInterp.

Definition at line 561 of file TclTextInterp.C.

References NULL.

void TclTextInterp::mousemode_cb const char *    mode,
int    submode
[virtual]
 

Reimplemented from TextInterp.

Definition at line 554 of file TclTextInterp.C.

References setString.

void TclTextInterp::pick_atom_callback_cb int    molid,
int    atm,
const char *    client
[virtual]
 

Reimplemented from TextInterp.

Definition at line 483 of file TclTextInterp.C.

References setString.

void TclTextInterp::pick_atom_cb int    molid,
int    atomid,
int    shift_state,
bool    is_pick
[virtual]
 

Reimplemented from TextInterp.

Definition at line 469 of file TclTextInterp.C.

References setString.

void TclTextInterp::pick_graphics_cb int    molid,
int    tag,
int    btn,
int    shift_state
[virtual]
 

Reimplemented from TextInterp.

Definition at line 493 of file TclTextInterp.C.

References setString.

void TclTextInterp::pick_selection_cb int    n,
const int *    atoms
[virtual]
 

Reimplemented from TextInterp.

Definition at line 499 of file TclTextInterp.C.

References num, and setString.

void TclTextInterp::pick_value_cb float    value [virtual]
 

Reimplemented from TextInterp.

Definition at line 514 of file TclTextInterp.C.

References setString.

void TclTextInterp::setString const char *    name,
const char *    val
[virtual]
 

First argument: variable name. Second argument: string value.

Reimplemented from TextInterp.

Definition at line 346 of file TclTextInterp.C.

Referenced by logfile_cb, mousemode_cb, pick_atom_callback_cb, pick_atom_cb, pick_graphics_cb, pick_selection_cb, pick_value_cb, and ~TclTextInterp.

void TclTextInterp::spaceball_cb float    tx,
float    ty,
float    tz,
float    rx,
float    ry,
float    rz,
int    buttondown
[virtual]
 

Reimplemented from TextInterp.

Definition at line 570 of file TclTextInterp.C.

References NULL.

void TclTextInterp::tcl_cb const char *    cmd [virtual]
 

Reimplemented from TextInterp.

Definition at line 550 of file TclTextInterp.C.

References evalString.

void TclTextInterp::timestep_cb int    molid,
int    frame
[virtual]
 

Reimplemented from TextInterp.

Definition at line 520 of file TclTextInterp.C.

void TclTextInterp::trajectory_cb int    molid,
const char *    fname
[virtual]
 

Reimplemented from TextInterp.

Definition at line 543 of file TclTextInterp.C.

void TclTextInterp::userkey_cb const char *    canonical_key_desc [virtual]
 

Reimplemented from TextInterp.

Definition at line 584 of file TclTextInterp.C.

References NameList< char * >::data, evalString, NameList< char * >::typecode, and VMDApp::userKeys.

void TclTextInterp::wait float    wd
 

set the text processor to wait for the given number of seconds before reading another text command.

Definition at line 418 of file TclTextInterp.C.

References time_of_day.

Referenced by text_cmd_wait.


The documentation for this class was generated from the following files:
Generated on Sun Oct 12 01:27:29 2008 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002