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

GeometryList Class Reference

Displayable subclass to maintain geometry monitors, and draw them to a scene. More...

#include <GeometryList.h>

Inheritance diagram for GeometryList:

Displayable Pickable List of all members.

Public Methods

 GeometryList (VMDApp *, Displayable *)
virtual ~GeometryList (void)
 destructor: must clean up all lists. More...

int num_lists (void)
 number of geometry lists. More...

GeomListPtr geom_list (int n)
 access the pointer to the Nth geometry list. More...

GeomListPtr geom_list (const char *nm)
 return pointer to the geometry list with the given name, NULL if not found. More...

const char * geom_list_name (int n)
 return the name of the Nth geometry list. More...

int geom_list_index (const char *nm)
 return the index of the geom list with the given name, -1 if not found. More...

int add_geometry (const char *geomcat, const int *molids, const int *atomids, const int *cells, float k, int toggle)
 add a new geometry object to the list with the given name. Return the index of the geometry object on success (>= 0), or -1 on failure. More...

int del_geometry (int, int)
 delete the Nth geometry object with the given index, return success. More...

int del_geometry (const char *nm, int n)
 delete the Nth geometry object with the given name, return success. More...

int show_geometry (int, int, int)
 show/hide the Nth geometry monitor in the given category. If N < 0, hide ALL monitors in that category. Return success. args: category, geometry monitor index, show (T) or hide (F). More...

int show_geometry (const char *nm, int n, int s)
 same as above, but giving a name for the category instead of index. More...

float getTextSize () const
int setTextSize (float)
const float * getTextOffset (const char *nm, int n)
int setTextOffset (const char *nm, int n, const float delta[2])
 set text offset for specfied label. More...

const char * getTextFormat (const char *nm, int n)
int setTextFormat (const char *nm, int n, const char *format)
virtual void prepare ()
 prepare for drawing ... do any updates needed right before draw. More...


Protected Methods

virtual void do_color_changed (int)
 changes the color of all geometries. More...


Detailed Description

Displayable subclass to maintain geometry monitors, and draw them to a scene.

Definition at line 50 of file GeometryList.h.


Constructor & Destructor Documentation

GeometryList::GeometryList VMDApp  ,
Displayable  
 

Definition at line 52 of file GeometryList.C.

References Scene::add_color_category, Scene::add_color_item, ANGLEGEOMCOL, ATOMGEOMCOL, BONDGEOMCOL, Displayable::cent_trans_off, NameList< GeomListStruct * >::data, GeomListStruct::defaultColor, DIHEGEOMCOL, Displayable::glob_trans_off, NameList< GeomListStruct * >::name, num_lists, Displayable::rot_off, Displayable::scale_off, Displayable::scene, and SPRINGGEOMCOL.

GeometryList::~GeometryList void    [virtual]
 

destructor: must clean up all lists.

Definition at line 86 of file GeometryList.C.

References num_lists.


Member Function Documentation

int GeometryList::add_geometry const char *    geomcat,
const int   molids,
const int   atomids,
const int   cells,
float    k,
int    toggle
 

add a new geometry object to the list with the given name. Return the index of the geometry object on success (>= 0), or -1 on failure.

Definition at line 157 of file GeometryList.C.

References ResizeArray::append, GeometryMol::calculate, VMDApp::commandQueue, GeomListStruct::curColor, NameList< GeomListStruct * >::data, Displayable::displayed, geom_list, geom_list_index, GeometryMol::has_value, VMDApp::moleculeList, GeometryMol::name, ResizeArray::num, Displayable::off, GeometryMol::ok, Displayable::on, GeometryMol::set_color, GeometryMol::set_pick, GeometryMol::set_text_size, and GeometryMol::unique_name.

Referenced by VMDApp::label_add.

int GeometryList::del_geometry const char *    nm,
int    n
[inline]
 

delete the Nth geometry object with the given name, return success.

Definition at line 120 of file GeometryList.h.

References del_geometry, and geom_list_index.

int GeometryList::del_geometry int   ,
int   
 

delete the Nth geometry object with the given index, return success.

Definition at line 230 of file GeometryList.C.

References geom_list, ResizeArray::num, num_lists, and ResizeArray::remove.

Referenced by del_geometry, VMDApp::label_delete, and prepare.

void GeometryList::do_color_changed int    [protected, virtual]
 

changes the color of all geometries.

Reimplemented from Displayable.

Definition at line 96 of file GeometryList.C.

References Scene::category_item_index, Scene::category_item_value, GeomListStruct::curColor, NameList< GeomListStruct * >::data, geom_list, geom_list_name, ResizeArray::num, num_lists, and Displayable::scene.

GeomListPtr GeometryList::geom_list const char *    nm [inline]
 

return pointer to the geometry list with the given name, NULL if not found.

Definition at line 91 of file GeometryList.h.

References geom_list, geom_list_index, and NULL.

GeomListPtr GeometryList::geom_list int    n [inline]
 

access the pointer to the Nth geometry list.

Definition at line 88 of file GeometryList.h.

References NameList::data.

Referenced by add_geometry, del_geometry, do_color_changed, geom_list, getTextFormat, getTextOffset, label_add, label_delete, label_getvalues, label_hide, label_show, listall, prepare, setTextFormat, setTextOffset, setTextSize, show_geometry, and text_cmd_label.

int GeometryList::geom_list_index const char *    nm [inline]
 

return the index of the geom list with the given name, -1 if not found.

Definition at line 100 of file GeometryList.h.

References NameList::typecode.

Referenced by add_geometry, del_geometry, geom_list, label_add, label_delete, label_getvalues, label_hide, label_show, listall, show_geometry, and text_cmd_label.

const char* GeometryList::geom_list_name int    n [inline]
 

return the name of the Nth geometry list.

Definition at line 97 of file GeometryList.h.

References NameList::name.

Referenced by do_color_changed.

const char * GeometryList::getTextFormat const char *    nm,
int    n
 

Definition at line 338 of file GeometryList.C.

References geom_list, ResizeArray::num, and GeometryMol::text_format.

Referenced by text_cmd_label.

const float * GeometryList::getTextOffset const char *    nm,
int    n
 

Definition at line 320 of file GeometryList.C.

References geom_list, ResizeArray::num, and GeometryMol::text_offset.

Referenced by text_cmd_label.

float GeometryList::getTextSize   const [inline]
 

Definition at line 134 of file GeometryList.h.

Referenced by VMDApp::label_get_textsize.

int GeometryList::num_lists void    [inline]
 

number of geometry lists.

Definition at line 85 of file GeometryList.h.

References NameList::num.

Referenced by del_geometry, do_color_changed, GeometryList, prepare, setTextSize, show_geometry, and ~GeometryList.

void GeometryList::prepare   [virtual]
 

prepare for drawing ... do any updates needed right before draw.

Reimplemented from Displayable.

Definition at line 360 of file GeometryList.C.

References del_geometry, geom_list, ResizeArray::num, num_lists, and GeometryMol::ok.

Referenced by GeometryFltkMenu::act_on_command.

int GeometryList::setTextFormat const char *    nm,
int    n,
const char *    format
 

Definition at line 347 of file GeometryList.C.

References geom_list, ResizeArray::num, and GeometryMol::set_text_format.

Referenced by VMDApp::label_set_textformat.

int GeometryList::setTextOffset const char *    nm,
int    n,
const float    delta[2]
 

set text offset for specfied label.

Definition at line 328 of file GeometryList.C.

References geom_list, ResizeArray::num, and GeometryMol::set_text_offset.

Referenced by VMDApp::label_set_textoffset.

int GeometryList::setTextSize float   
 

Definition at line 302 of file GeometryList.C.

References geom_list, ResizeArray::num, num_lists, and GeometryMol::set_text_size.

Referenced by VMDApp::label_set_textsize.

int GeometryList::show_geometry const char *    nm,
int    n,
int    s
[inline]
 

same as above, but giving a name for the category instead of index.

Definition at line 130 of file GeometryList.h.

References geom_list_index, and show_geometry.

int GeometryList::show_geometry int   ,
int   ,
int   
 

show/hide the Nth geometry monitor in the given category. If N < 0, hide ALL monitors in that category. Return success. args: category, geometry monitor index, show (T) or hide (F).

Definition at line 264 of file GeometryList.C.

References geom_list, ResizeArray::num, num_lists, Displayable::off, and Displayable::on.

Referenced by VMDApp::label_show, and show_geometry.


The documentation for this class was generated from the following files:
Generated on Sat Sep 6 01:27:47 2008 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002