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

CmdLabel.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: CmdLabel.h,v $
00013  *      $Author: johns $        $Locker:  $                $State: Exp $
00014  *      $Revision: 1.41 $      $Date: 2019/01/17 21:20:58 $
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 protected:
00040   virtual void create_text(void);
00041 
00042 public:
00044   CmdLabelAdd(const char *, int, int *molid, int *atomid);
00045   ~CmdLabelAdd(void);
00046 };
00047 
00048 
00050 class CmdLabelAddspring : public Command {
00051 private:
00052   int molid;
00053   int atom1;
00054   int atom2;
00055   float k;
00056 
00057 protected:
00058   virtual void create_text(void);
00059 
00060 public:
00062   CmdLabelAddspring(int themol, int theatom1, int theatom2,
00063                     float thek);
00064 };
00065 
00066 
00068 class CmdLabelShow : public Command {
00069 private:
00070   char geomcatStr[16];
00071   int item;             
00072   int show;             
00073 
00074 protected:
00075   virtual void create_text(void);
00076 
00077 public:
00078   CmdLabelShow(const char *category, int n, int onoff);
00079 };
00080 
00081 
00083 class CmdLabelDelete : public Command {
00084 private:
00085   char geomcatStr[16];
00086   int item;             
00087 
00088 protected:
00089   virtual void create_text(void);
00090 
00091 public:
00092   CmdLabelDelete(const char *, int); 
00093 };
00094 
00095 class CmdLabelTextSize : public Command {
00096 protected:
00097   virtual void create_text();
00098 public:
00099   const float size;
00100   CmdLabelTextSize(float newsize)
00101   : Command(LABEL_TEXTSIZE), size(newsize) {}
00102 };
00103 
00104 class CmdLabelTextThickness : public Command {
00105 protected:
00106   virtual void create_text();
00107 public:
00108   const float thickness;
00109   CmdLabelTextThickness(float newthickness)
00110   : Command(LABEL_TEXTTHICKNESS), thickness(newthickness) {}
00111 };
00112 
00113 class CmdLabelTextOffset : public Command {
00114 protected:
00115   virtual void create_text();
00116 public:
00117   char *nm;
00118   int n;
00119   const float m_x, m_y;
00120   CmdLabelTextOffset(const char *name, int ind, float x, float y);
00121   ~CmdLabelTextOffset();
00122 };
00123 
00124 class CmdLabelTextFormat: public Command {
00125 protected:
00126   virtual void create_text();
00127 public:
00128   char *nm;
00129   int n;
00130   char *format;
00131   CmdLabelTextFormat(const char *name, int ind, const char *format);
00132   ~CmdLabelTextFormat();
00133 };
00134 #endif
00135 

Generated on Fri Oct 4 02:43:29 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002