Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   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 *, int guienabled, int mpienabled)
 ~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 ()
int update_completion_list ()
 Update interactive line editor tab completion command list. More...

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 mobile_cb (float tx, float ty, float tz, float rx, float ry, float rz, int buttondown)
virtual void mobile_state_changed_cb ()
virtual void mobile_device_command_cb (const char *str)
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 36 of file TclTextInterp.h.


Constructor & Destructor Documentation

TclTextInterp::TclTextInterp VMDApp  ,
int    guienabled,
int    mpienabled
 

Definition at line 165 of file TclTextInterp.C.

References VMDApp::argc_m, VMDApp::argv_m, linenoiseHistorySetMaxLen, linenoiseSetCompletionCallback, NULL, result, update_completion_list, and vmd_isatty.

TclTextInterp::~TclTextInterp  
 

Definition at line 520 of file TclTextInterp.C.

References NULL, ResizeArray< char * >::num, num, and setString.


Member Function Documentation

void TclTextInterp::doEvent   [virtual]
 

Let the interpreter have control for while.

Reimplemented from TextInterp.

Definition at line 548 of file TclTextInterp.C.

References disableRawMode, done_waiting, enableRawMode, VMDApp::get_eofexit, length, linenoise, linenoiseFree, linenoiseHistoryAdd, NULL, vmd_check_stdin, 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 469 of file TclTextInterp.C.

References NULL, and update_completion_list.

int TclTextInterp::done_waiting  
 

Definition at line 824 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 541 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 752 of file TclTextInterp.C.

References VMDApp::display_update, VMDApp::exitFlag, length, and NULL.

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 711 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 837 of file TclTextInterp.C.

Tcl_Interp* TclTextInterp::get_interp   [inline]
 

Definition at line 82 of file TclTextInterp.h.

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

Reimplemented from TextInterp.

Definition at line 940 of file TclTextInterp.C.

References n, and NULL.

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

Reimplemented from TextInterp.

Definition at line 845 of file TclTextInterp.C.

References evalString.

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

Reimplemented from TextInterp.

Definition at line 861 of file TclTextInterp.C.

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

Reimplemented from TextInterp.

Definition at line 870 of file TclTextInterp.C.

References setString.

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

Reimplemented from TextInterp.

Definition at line 997 of file TclTextInterp.C.

References NULL.

void TclTextInterp::mobile_device_command_cb const char *    str [virtual]
 

Reimplemented from TextInterp.

Definition at line 992 of file TclTextInterp.C.

References setString.

void TclTextInterp::mobile_state_changed_cb   [virtual]
 

Reimplemented from TextInterp.

Definition at line 987 of file TclTextInterp.C.

References setString.

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

Reimplemented from TextInterp.

Definition at line 852 of file TclTextInterp.C.

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

Reimplemented from TextInterp.

Definition at line 977 of file TclTextInterp.C.

References NULL.

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

Reimplemented from TextInterp.

Definition at line 969 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 890 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 875 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 901 of file TclTextInterp.C.

References setString.

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

Reimplemented from TextInterp.

Definition at line 908 of file TclTextInterp.C.

References atoms, num, and setString.

void TclTextInterp::pick_value_cb float    value [virtual]
 

Reimplemented from TextInterp.

Definition at line 924 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 728 of file TclTextInterp.C.

Referenced by logfile_cb, mobile_device_command_cb, mobile_state_changed_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 1012 of file TclTextInterp.C.

References NULL.

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

Reimplemented from TextInterp.

Definition at line 964 of file TclTextInterp.C.

References evalString.

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

Reimplemented from TextInterp.

Definition at line 931 of file TclTextInterp.C.

References n.

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

Reimplemented from TextInterp.

Definition at line 956 of file TclTextInterp.C.

int TclTextInterp::update_completion_list  
 

Update interactive line editor tab completion command list.

Definition at line 426 of file TclTextInterp.C.

References ResizeArray< char * >::append, ResizeArray< char * >::clear, ResizeArray< char * >::extend, NULL, ResizeArray< char * >::num, num, and stringdup.

Referenced by doInit, and TclTextInterp.

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

Reimplemented from TextInterp.

Definition at line 1027 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 820 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 Fri Dec 6 02:47:22 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002