next up previous contents index
Next: ComboButton Up: Classes and Methods Previous: Checkbox

Color_Sel

  (subclass of 9.1.3.12 Group)

A Color_Sel is designed to implement an easy way to control color-vectors. The init-parameter is a VEC3. The Color_Sel will show this color-vector and enables the editing of it using the RGB- or the HSV-model. The color-vector will always contain the RGB-values. As for all interactives the Color_Sel will call its action method if the values of the color-vector are changed. The default action will send the method to the instance.

   (char * ) GRAPE(color_sel, "get-color-model")()
COLOR_SEL *color_sel
Return the constant string "RGB" or "HSV" depending on the currently active color model.

   GRAPE(Color_Sel, "new-instance")(name, rgb)
CLASS *Color_Sel
char *name
VEC3 rgb
Create a new Color_Sel instance to edit rgb.

   GRAPE(color_sel, "set-color-model")(model)
COLOR_SEL *color_sel
char * model
Change the color-model for the Color_Sel to RGB or HSV depending on model, which has to be "RGB" or "HSV".

   GRAPE(color_sel, "set-var")(var)
COLOR_SEL *color_sel
VEC3 var
Set a new variable, var, to be edited with color_sel. If var equals NULL, color_sel is switched INACTIVE, else ACTIVE.

   GRAPE(color_sel, "switch-color-model")()
COLOR_SEL *color_sel
Change the color-model for the Color_Sel between RGB and HSV. Used by the RGB/HSV-button inside the Color_Sels; might be useful to be called by hand if HSV editing mode is to be used.



SFB 256 Universität Bonn and IAM Universität Freiburg

Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.