Config Library: 4.9 Object Class Reference: PrefDialogClass

Up: GEOS SDK TechDocs | Up | Prev: 4.8 PrefInteractionClass | Next: 4.10 PrefTextClass

The top level object of any Preferences module UI tree should probably be a PrefDialog object. If the user's changes will necessitate a system reset, then this object will be responsible for rebooting the system.

On receiving MSG_GEN_APPLY , the dialog sends MSG_PREF_GET_REBOOT_INFO to itself (which is propagated to all children via PrefInteractionClass ). If any children require reboot, then the dialog sends MSG_PREF_DIALOG_CONFIRM_REBOOT to itself, which normally puts up a confirmation dialog box (this can be subclassed to provide other behavior). If user confirms reboot, then the dialog will send MSG_PREF_DIALOG_REBOOT to itself, and MSG_GEN_APPLY to its superclass to save the options (it being assumed that the PIA_SAVE_OPTIONS_ON_APPLY flag is set).

Code Display 22-10 PrefDialogClass Instance Data

@class PrefDialogClass, PrefInteractionClass;
@default GII_visibility = GIV_DIALOG;
@default GII_type = GIT_PROPERTIES;
@default GII_attrs = @default | GIA_NOT_USER_INITIATABLE | GIA_MODAL;
@default PII_attrs = @default | PIA_SAVE_OPTIONS_ON_APPLY;

MSG_PREF_DIALOG_CONFIRM_REBOOT

@message Boolean MSG_PREF_DIALOG_CONFIRM_REBOOT(
        optr 		string);

By default, the PrefDialog will respond to this message by putting up a dialog box asking the user if he wants to restart the system.

Parameters:

string
Object pointer of string which will be inserted in a sentence of the form "The system software will shut down and restart to change the string."

Return: Returns true (i.e. non-zero) to confirm the reboot; returns false (i.e. zero to deny the reboot.

MSG_PREF_DIALOG_REBOOT

void MSG_PREF_DIALOG_REBOOT();

This message causes GEOS to restart. This message does not return.


Up: GEOS SDK TechDocs | Up | Prev: 4.8 PrefInteractionClass | Next: 4.10 PrefTextClass