next up previous contents index
Next: Supervising Classes Up: Using the colorbar Previous: The structure of colorbar

Methods on colorbar

 

   

(COLORBAR *)GRAPE(colorbar,"display")()
COLORBAR *colorbar

The actual colorbar will be displayed on the graphic device.

   

(COLORBAR *)GRAPE(Colorbar,"get-stdcolorbar")(funct,name)
CLASS *Colorbar
INSTANCE (*funct)()
char name[100]

If funct is equal to NIL then a default colorbar will be returned. If a colorbar with the function pointer funct exists this will be returned.

If in the list of the colorbars no element with function entry funct exists a default colorbar will be created containing funct and name. This newly created colorbar will be added to the list. funct is the method which calls this "get-stdcolorbar" method.

This method call for example can be found for instance within the method "fe2d-isoline-disp":

colorbar = (COLORBAR *)GRAPE(Colorbar,"get-stdcolorbar")
                            (fe2d_isoline_disp,"iso2dclb");
Furthermore the colorbar is available in the display methods "fe2d_isoline_select_disp", "fe3d_clip_isoline_disp", "fe3d_clip_iso_select_disp", "fe3d_clip_deg_fine_disp", "fe3d_bnd_isoline_disp", "fe3d_bnd_iso_select_disp" and "mesh3d_clip_isoline_disp". Note that the select-methods are using the colorbars of the correspondent isoline-methods.

   

(COLORBAR *)GRAPE(Colorbar,"set-default")(xyz,height,width,
display_on_off,min,max,number_of_values,values,funct,name)
CLASS *Colorbar
VEC3 xyz
double height, width
int display_on_off
double min, max
int number_of_values
float values[100]
INSTANCE (*funct)()
char name[100]

With xyz (coordinates of the left lower corner of the colorbar), height and width any position and size of the colorbar can be chosen. Depending on the choice of 1 or 0 for display_on_off, the colorbar will be displayed or not if funct is an actual display method. With min and max the user can specify the minimal and maximal values of the data to be visualized. In addition particularly interesting values between min and max can be marked on the colorbar (this is important for the "select"-methods, see above). number_of_values is the number (limited to 100) of these values. values is the array into which the values are written.

For example if the colorbar of the method fe2d_isoline_disp should become specifically parameters, you can add into your main():

  extern FE2D *fe2d_isoline_disp();
  VEC3        xyz = {0.5, -0.9, 0.0};

  GRAPE(Colorbar, "set-default")(xyz, 0.4 , 0.1, 1, -0.5, 0.5, 0, NIL,
                                 fe2d_isoline_disp, "iso2dclb");

Often one of the shorter calls is sufficient:

   

(COLORBAR *)GRAPE(Colorbar,"set-default-min-max")
(min,max,funct,name)
CLASS *Colorbar
double min, max
INSTANCE (*funct)()
char *name
   
(COLORBAR *)GRAPE(Colorbar,"set-default-values")
(number_of_values,values,funct,name)
CLASS *Colorbar
int number_of_values
float values[100]
INSTANCE (*funct)()
char *name

   

(COLORBAR *)GRAPE(colorbar,"on-off")()
COLORBAR *colorbar

This call effects a switch of colorbar-->display_on_off.

   

(COLORBAR *)GRAPE(colorbar,"button")()
COLORBAR *colorbar

A button appears to switch the colorbar on or off. If the colorbar is switched on, two other buttons are shown up. By pressing them the following methods "modify" or "change-values" are sent:

   

(COLORBAR *)GRAPE(colorbar,"modify")()
COLORBAR *colorbar

Rulers are displayed in a layer to modify the values of xyz, height, width, min and max values of the structure colorbar.

   

(COLORBAR *)GRAPE(colorbar,"change-values")()
COLORBAR *colorbar

A layer appears to change the entry's of the array colorbar->values by buttons and inputs.


next up previous contents index
Next: Supervising Classes Up: Using the colorbar Previous: The structure of colorbar

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.