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

Cycle_Button

  (subclass of 9.1.3.2 Button)

A Button with a number of different labels, each possessing its own definition value. This value will be given as a parameter if the button is selected.

typedef struct {
  int value;
  char *label;
} CYCLE\_LABEL;
   GRAPE(c_button, "add-label")(label)
CYCLE_BUTTON *c_button
CYCLE_LABEL *label
Add the new label label add the end of c_button's label list.

   GRAPE(c_button, "get-value")(value)
CYCLE_BUTTON *c_button
int *value
Returns the actual value of the Cycle_Button.

   GRAPE(Cycle_Button, "new-instance")(method, inst, name, label_list)
CLASS *Cycle_Button
char *method
INSTANCE *inst
char *name
CYCLE_LABEL *label_list
Creates a Cycle_Button. label_list is an array of CYCLE_LABELs, terminated with a NULL entry. If the Cycle_Button is selected, it will send the method method to the instance inst, using the new value of the Cycle_Button as a parameter.

   GRAPE(c_button, "remove-label")(value)
CYCLE_BUTTON *c_button
int value
Remove the label having value value from the label list.

   GRAPE(c_button, "set-value")(value)
CYCLE_BUTTON *c_button
int value
Set the value of the Cycle_Button to value. The label of the button will be updated to show the correct label.



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.