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

UIText.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: UIText.h,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.79 $       $Date: 2019/01/17 21:21:02 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *
00019  * This is the User Interface for text commands.  It reads characters from
00020  * the console and from files, and executes the commands.
00021  *
00022  ***************************************************************************/
00023 #ifndef UITEXT_H
00024 #define UITEXT_H
00025 
00026 #include "UIObject.h"
00027 #include "Inform.h"
00028 
00029 #ifdef VMDTCL
00030 #include "TclTextInterp.h" // use Tcl interp if we were compiled with Tcl.
00031 #endif
00032 class TextInterp;
00033 
00035 class UIText : public UIObject {
00036 private:
00037   TextInterp *interp;          
00038   TextInterp *tclinterp;       
00039   TextInterp *pythoninterp;    
00040   
00041   Inform *cmdbufstr;
00042 
00043 public:
00045   UIText(VMDApp *, int guienabled, int mpienabled);
00046 
00048   virtual ~UIText(void);
00049 
00050 #ifdef VMDVRJUGGLER
00051 private:
00052   bool _isInitialized;
00053 #endif
00054 
00055 public:
00057   void read_init(void); 
00058 
00061   int change_interp(const char *interpname);
00062 
00064   void read_from_file(const char *);
00065 
00067   int save_state(const char *fname);
00068 
00071   virtual int check_event(void);
00072 
00073   virtual int act_on_command(int, Command *);  
00074 
00075 #ifdef VMDTCL
00076   Tcl_Interp* get_tcl_interp() {
00077     if (tclinterp == NULL) 
00078       return NULL;
00079 
00080     return ((TclTextInterp *) tclinterp)->get_interp();
00081   }
00082 #else
00083   void* get_tcl_interp() {
00084     return NULL;
00085   }
00086 #endif
00087  
00088 #ifdef VMDVRJUGGLER
00089   bool isInitialized(void);
00090 
00091   TextInterp* get_interp(){
00092           return interp;
00093   }
00094 #endif
00095 
00096 };
00097 
00098 #endif
00099 

Generated on Thu Apr 18 02:45:44 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002