next up previous contents
Next: DispCmd Up: Display objects Previous: ColorList   Contents

Subsections


ColorUser

Files: ColorUser.h, ColorUser.C
Derived from: none
Global instance (if any): none
Used in optional component: Part of main VMD code

Description

Simple base class for objects which will be needing to use a ColorList for colors. This class provides routines for being given a ColorList object, and for being informed of when colors are changed. The user can create new categories of colors in the ColorList, and add specific color objects to the category with an identifying name. The user can edit these colors via commands.

Constructors

Internal data structures

Virtual member functions

Method of use

ColorUser is a base class designed to be specified as a parent for some class which desires to use a ColorList to maintain categories of colors associated with names, and to make these names be customizeable to the user via the VMD user interfaces. All Displayable objects are derived from ColorUser, as are all DisplayDevice objects.

ColorList describes how to create new categories and how to access them. If a new class wishes to use these features, it should derive from ColorUser, and define versions of the protected virtual functions do_use_colors and do_color_changed. This first is designed to be only called once, right after the object is created - it should create new categories, and add the necessary names to these categories. The second is designed to be called every time a particular color changes. The do_color_changed should check to see which color was modified, and then update itself if necessary.


next up previous contents
Next: DispCmd Up: Display objects Previous: ColorList   Contents
vmd@ks.uiuc.edu