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

TclTextInterp.h

Go to the documentation of this file.
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 /***************************************************************************
00010  * RCS INFORMATION:
00011  *
00012  *      $RCSfile: TclTextInterp.h,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.50 $      $Date: 2020/05/22 15:35:45 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *   The Tcl-based text command interpreter
00019  ***************************************************************************/
00020 
00021 #ifndef TCL_TEXT_INTERP_H
00022 #define TCL_TEXT_INTERP_H
00023 
00024 #include "TextInterp.h"
00025 #include "JString.h"
00026 #include "TextEvent.h"
00027 
00028 struct Tcl_Interp;
00029 struct Tcl_Obj;
00030 
00031 class VMDApp;
00032 class Inform;
00033 class GetLine;
00034 
00036 class TclTextInterp : public TextInterp {
00037 private:
00038   Tcl_Interp *interp;
00039   Tcl_Obj *commandPtr;
00040   int callLevel;
00041   int gotPartial;
00042   int uselinenoise;        
00043   int usetecla;            
00044   int needPrompt;
00045   int ignorestdin;         
00046   ResizeArray<char *> completion_list; 
00047   VMDApp *app;
00048 
00049   // XXX: not used
00050   double starttime, delay;
00051   int consoleisatty;
00052 
00056   void add_commands();
00057 
00058   void setMap(const char *, const char *, const char *);
00059 
00060 #if defined(VMDTECLA)
00061   GetLine *tecla_gl;
00062 #endif
00063 
00064 public:
00065   TclTextInterp(VMDApp *, int guienabled, int mpienabled);
00066   ~TclTextInterp();
00067 
00068   virtual void doInit();
00069   virtual void doEvent();
00070   virtual int doTkUpdate();
00071 
00074   virtual int evalString(const char *);
00075 
00078   virtual int evalFile(const char *);
00079 
00080   virtual void setString(const char *, const char *);
00081 
00082   Tcl_Interp* get_interp() {
00083     return interp;
00084   }
00085 
00088   void wait(float wd);
00089   int done_waiting();
00090 
00092   int update_completion_list();
00093 
00094   //
00095   // callbacks for various VMD events
00096   //
00097   //virtual void display_update_cb();
00098   virtual void frame_cb(int molid, int frame);
00099   virtual void help_cb(const char *topic);
00100   virtual void initialize_structure_cb(int molid, int create_or_destroy);
00101   virtual void molecule_changed_cb(int molid, int code); 
00102   virtual void logfile_cb(const char *cmd);
00103   virtual void mousemode_cb(const char *mode, int submode);
00104   virtual void mouse_pos_cb(float x, float y, int buttondown);
00105   virtual void mobile_cb(float tx, float ty, float tz,
00106                          float rx, float ry, float rz, int buttondown);
00107   virtual void mobile_state_changed_cb();
00108   virtual void mobile_device_command_cb(const char *str);
00109   virtual void spaceball_cb(float tx, float ty, float tz,
00110                             float rx, float ry, float rz, int buttondown);
00111   virtual void pick_atom_cb(int molid, int atomid, int shift_state, bool is_pick);
00112   virtual void pick_atom_callback_cb(int molid, int atm, const char *client);
00113   virtual void pick_selection_cb(int n, const int *atoms);
00114   virtual void pick_value_cb(float value);
00115   virtual void pick_graphics_cb(int molid, int tag, int btn, int shift_state);
00116   //virtual void python_cb(const char *cmd) {}
00117   virtual void tcl_cb(const char *cmd);
00118   virtual void timestep_cb(int molid, int frame);
00119   virtual void trajectory_cb(int molid, const char *fname);
00120   virtual void graph_label_cb(const char *type, const int *ids, int n);
00121   virtual void userkey_cb(const char *canonical_key_desc);
00122 };
00123 
00124 #endif

Generated on Wed Apr 24 02:43:28 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002