next up previous contents index
Next: Graphic Devices Up: Interactive Classes Previous: XList_Button

Utility Functions

There are some utility functions to open often used layers on the standard manager.

int g_msgbox (char *title, char *text, int buttons)
Creates and opens a messagebox with a given title and the text text, containing the buttons buttons, which is a number ORed together from the flags mbfYes, mbfNo, mbfCancel, mbfOk and mbfAbort. If buttons is mbfNone it closes automatically after a few seconds. If title is NULL a default value is used. For multiline messages insert tex2html_wrap_inline45926 n where you want to break the line. The function returns the flag of the pressed button or 0 if an error occurred.

The handle is blocked while the messagebox is active.

void g_infobox (char *title, char *text)
Creates and opens a non blocking infobox with the given title and text. If title is NULL a default title is used. For multiline messages insert tex2html_wrap_inline45926 n where you want to break the line.

The box will remain open as long as tex2html_wrap43328 is not pressed.

ALERT(condition, message, errorhandler)
ALERT is the interactive replacement of ASSURE. If condition equals 0 a g_msgbox with message message is opened. After having confirmed, errorhandler is executed.

As with ASSURE, errorhandler may consist from more than one statement, separated by ";".

Some other variables and functions.

void g_hide_layer (ITEM *item)
Hides the layer the item belongs to.

double g_eval_ident_fn (double x)
double g_eval_angle_fn (double x)
double g_eval_exp_fn (double x)
double g_eval_log_fn (double x)
double g_eval_exp10_fn (double x)
double g_eval_log10_fn (double x)
Predefined functions to be used as evaluations functions for Bar1d instances.

int   g_batch_mode
TRUE if GRAPE runs in batch mode. Set this before calling GRAPE if the program shall not open windows, e.g. if running on a batch server. On the other hand do not call functions or methods that require or create a manager, especially do not call GRAPE(Manager, "get-stdmgr")() and do not create any Items which will try get the standard manager.

Do not change the flag after having made the first GRAPE call.

Changes from 5.0:

#G_HEAD #define msgbox g_msgbox
#G_HEAD #define infobox g_infobox
#G_HEAD #define G_MSGBOX_BUTTON_YES    mbfYes
#G_HEAD #define G_MSGBOX_BUTTON_NO     mbfNo
#G_HEAD #define G_MSGBOX_BUTTON_CANCEL mbfCancel
#G_HEAD #define G_MSGBOX_BUTTON_OK     mbfOk
#G_HEAD #define G_MSGBOX_BUTTON_ABORT  mbfAbort
#G_HEAD #define G_MSGBOX_RECURSIVE     mbfRecursive
#G_HEAD #define dfINT dfInt
#G_HEAD #define dfFLOAT dfFloat
#G_HEAD #define dfDOUBLE dfDouble
#G_HEAD #define dfSTRING dfString
#G_HEAD #define dfREGULAR_EXPRESSION dfRegexp


next up previous contents index
Next: Graphic Devices Up: Interactive Classes Previous: XList_Button

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.