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

CmdLabel.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr                                                                       
00003  *cr            (C) Copyright 1995-2008 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: CmdLabel.h,v $
00013  *      $Author: johns $        $Locker:  $                $State: Exp $
00014  *      $Revision: 1.35 $      $Date: 2008/03/27 19:36:36 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *
00019  * Command objects used to create, list, delete, or graph labels for measuring
00020  * geometries.
00021  *
00022  ***************************************************************************/
00023 #ifndef CMDLABEL_H
00024 #define CMDLABEL_H
00025 
00026 #include "Command.h"
00027 
00028 // The following uses the Cmdtypes LABEL_ADD, LABEL_ADDSPRING,
00029 // LABEL_SHOW, LABEL_LIST, and LABEL_DELETE from the
00030 // Command class
00031 
00033 class CmdLabelAdd : public Command {
00034 private:
00035   char geomcatStr[16];
00036   char *geomitems[4];
00037   int num_geomitems;
00038 
00039   int cat;             
00040   
00041 protected:
00042   virtual void create_text(void);
00043 
00044 public:
00046   CmdLabelAdd(const char *, int, int *molid, int *atomid);
00047   ~CmdLabelAdd(void);
00048 };
00049 
00050 
00052 class CmdLabelAddspring : public Command {
00053 private:
00054   int molid;
00055   int atom1;
00056   int atom2;
00057   float k;
00058 
00059 protected:
00060   virtual void create_text(void);
00061 
00062 public:
00064   CmdLabelAddspring(int themol, int theatom1, int theatom2,
00065                     float thek);
00066 };
00067 
00068 
00070 class CmdLabelShow : public Command {
00071 private:
00072   char geomcatStr[16];
00073   int item;             
00074   int show;             
00075 
00076 protected:
00077   virtual void create_text(void);
00078 
00079 public:
00080   CmdLabelShow(const char *category, int n, int onoff);
00081 };
00082 
00083 
00085 class CmdLabelDelete : public Command {
00086 private:
00087   char geomcatStr[16];
00088   int item;             
00089 
00090 protected:
00091   virtual void create_text(void);
00092 
00093 public:
00094   CmdLabelDelete(const char *, int); 
00095 };
00096 
00097 class CmdLabelTextSize : public Command {
00098 protected:
00099   virtual void create_text();
00100 public:
00101   const float size;
00102   CmdLabelTextSize(float newsize)
00103   : Command(LABEL_TEXTSIZE), size(newsize) {}
00104 };
00105 
00106 class CmdLabelTextOffset : public Command {
00107 protected:
00108   virtual void create_text();
00109 public:
00110   char *nm;
00111   int n;
00112   const float m_x, m_y;
00113   CmdLabelTextOffset(const char *name, int ind, float x, float y);
00114   ~CmdLabelTextOffset();
00115 };
00116 
00117 class CmdLabelTextFormat: public Command {
00118 protected:
00119   virtual void create_text();
00120 public:
00121   char *nm;
00122   int n;
00123   char *format;
00124   CmdLabelTextFormat(const char *name, int ind, const char *format);
00125   ~CmdLabelTextFormat();
00126 };
00127 #endif
00128 

Generated on Wed Oct 8 01:26:18 2008 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002