Next: Input
Up: Classes and Methods
Previous: Function_Slider
(subclass of 9.1.3.14 Interactive)
A group is used to create structured menus very easy. It contains
several items, but it's handled like one single item from the upper
groups.
The items of a group are placed automatically inside the group using
their preferred positions and sizes.
The group can also have a border and a title to make the group
structure visible.
typedef enum border_flags{
bfNoBorder,
bfBorder,
bfTitle
} BORDER_FLAGS;
- GRAPE(group, "add-inter")(item)
- GROUP *group
ITEM *item
Add the item item to the group. If there is no place for the
item in the group and all its replacement groups, the item will be
added invisible.
- GRAPE(group, "add-first-inter")(item)
- GROUP *group
ITEM *item
Add the item item to the group. Like "add-inter", but item
is added as first and not as last entry.
- GRAPE(group, "add-replacement")(new_replace)
- GROUP *group
GROUP *new_replace
Add the group "new_replace" to the list of replaced
groups. See 9.1.1.2 for details about replacing.
- GRAPE(group, "calc-inter")()
- GROUP *group
Recalculates the position and size of all items. This method is used
from some subclasses of group, for example XList or Spline_Editor, to
adapt the size of their items.
The method should be called, if the pref-size or -pos of an item has
been changed, which already resides in group.
- GRAPE(group, "change-border")(new_border)
- GROUP *group
BORDER_FLAGS new_border
Switches the border flags of a group. Using that method the border and
title of a group can be switched on and off.
Do not use a title without a border.
- GRAPE(group, "contains")(item)
- GROUP *group
ITEM *item
Returns NULL, if the item is not contained in the group.
- (int * ) GRAPE(group, "count-entries")(class)
- GROUP *group
CLASS *class
This function will return a pointer to the number of items contained
in the group and having the superclass class. If class ==
NULL all items will be counted.
- GRAPE(group, "free")()
- GROUP *group
First of all this group will send "delete" to all items, which
are contained in the group. After that the group will remove itself.
- (ITEM * ) GRAPE(group, "get-entry")(item, class)
- GROUP *group
ITEM *item
CLASS *class
If item == NULL, this function will return the first item which
is contained in the group and has got the superclass class.
Otherwise the next item with right class will be returned.
- GRAPE(group, "get-size")(x, y)
- GROUP *group
double *x, *y
Returns the inner size of the group in x and y. This size
is the width or height of the rectangular space used for Items.
- GRAPE(Group, "new-instance")(name)
- CLASS *Group
char *name
Create a new Group instance. This Group is empty, has no border
and a very small size.
- GRAPE(group, "remove-inter")(item)
- GROUP *group
ITEM *item
Remove the Item item from the group.
- GRAPE(group, "remove-replacement")(old_replace)
- GROUP *group
GROUP *old_replace
Remove the Group "old_replace" from the list of replace
Groups.
- GRAPE(group, "send-add-inter-action")()
- GROUP *group
The default add_inter_action of a Group: simply call the
add_inter_actions of the contained items.
- GRAPE(group, "send-to-all-entries")(meth)
- GROUP *group
char *meth
Sends the method meth to all Items, which are contained
in the group. The method meth must not have parameters.
- GRAPE(group, "set-redraw-flag")(redraw_flag)
- GROUP *group
REDRAW_FLAG redraw_flag
Calls "set-redraw-flag" on all Items, which are contained
in the Group and sets the redraw flag of the Group itself as well.
- GRAPE(group, "send-remove-inter-action")()
- GROUP *group
The default remove_inter_action of a Group: simply call the
remove_inter_actions of the contained items.
- GRAPE(group, "update")()
- GROUP *group
Overloading inherited method of class 9.1.3.15 Item. Will call the "update" method of
each interactive, which is contained in the group.
Next: Input
Up: Classes and Methods
Previous: Function_Slider
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.