Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   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
 Get/set text size. Affects all labels. More...

int setTextSize (float)
float getTextThickness () const
 Get/set text thickness. Affects all labels. More...

int setTextThickness (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 87 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 158 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, GeometryMol::set_text_thickness, 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 122 of file GeometryList.h.

References del_geometry, geom_list_index, and n.

int GeometryList::del_geometry int   ,
int   
 

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

Definition at line 232 of file GeometryList.C.

References geom_list, n, 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 97 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 93 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 90 of file GeometryList.h.

References NameList::data, and n.

Referenced by add_geometry, del_geometry, do_color_changed, geom_list, getTextFormat, getTextOffset, prepare, py_label_add, py_label_delete, py_label_getvalues, py_label_visible, py_listall, setTextFormat, setTextOffset, setTextSize, setTextThickness, 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 102 of file GeometryList.h.

References NameList::typecode.

Referenced by add_geometry, del_geometry, geom_list, py_label_add, py_label_delete, py_label_getvalues, py_label_visible, py_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 99 of file GeometryList.h.

References n, and NameList::name.

Referenced by do_color_changed.

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

Definition at line 358 of file GeometryList.C.

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

Referenced by text_cmd_label.

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

Definition at line 340 of file GeometryList.C.

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

Referenced by text_cmd_label.

float GeometryList::getTextSize   const [inline]
 

Get/set text size. Affects all labels.

Definition at line 137 of file GeometryList.h.

Referenced by VMDApp::label_get_text_size.

float GeometryList::getTextThickness   const [inline]
 

Get/set text thickness. Affects all labels.

Definition at line 141 of file GeometryList.h.

Referenced by VMDApp::label_get_text_thickness.

int GeometryList::num_lists void    [inline]
 

number of geometry lists.

Definition at line 87 of file GeometryList.h.

References NameList::num.

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

void GeometryList::prepare   [virtual]
 

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

Reimplemented from Displayable.

Definition at line 380 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 367 of file GeometryList.C.

References geom_list, n, 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 348 of file GeometryList.C.

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

Referenced by VMDApp::label_set_textoffset.

int GeometryList::setTextSize float   
 

Definition at line 304 of file GeometryList.C.

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

Referenced by VMDApp::label_set_text_size.

int GeometryList::setTextThickness float   
 

Definition at line 322 of file GeometryList.C.

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

Referenced by VMDApp::label_set_text_thickness.

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 132 of file GeometryList.h.

References geom_list_index, n, 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 266 of file GeometryList.C.

References geom_list, n, 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 Thu Mar 28 02:45:42 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002