|
NAMEcdk_traverse - functions to support keyboard traversalSYNOPSIScc [ flag ... ] file ... -lcdk [ library ... ]#include <cdk.h> CDKOBJS *getCDKFocusCurrent (CDKSCREEN *screen); CDKOBJS *setCDKFocusCurrent (CDKSCREEN *screen, CDKOBJS *obj); CDKOBJS *setCDKFocusFirst (CDKSCREEN *screen); CDKOBJS *setCDKFocusLast (CDKSCREEN *screen); CDKOBJS *setCDKFocusNext (CDKSCREEN *screen); CDKOBJS *setCDKFocusPrevious (CDKSCREEN *screen); int traverseCDKScreen (CDKSCREEN *screen); void exitOKCDKScreen (CDKSCREEN *screen); void exitCancelCDKScreen (CDKSCREEN *screen); void resetCDKScreen (CDKSCREEN *screen); void exitOKCDKScreenOf(CDKOBJS *obj); void exitCancelCDKScreenOf (CDKOBJS *obj); void resetCDKScreenOf (CDKOBJS *obj);
DESCRIPTIONThe functions above handle the traversal of a screen populated with various widgets. Once the screen has been created and populated with widgets, a single call to traverseCDKScreen() will allow the user to move between widgets and enter data (or otherwise manipulate widgets). Other functions are provided for use as callbacks by the widgets on the screen. Finally, there are several functions which allow the caller to manipulate the state of the traversal, i.e., the object which has focus.In order for widgets to be used on a screen which is to be handled by traverseCDKScreen(), it must have the following methods available: injectCharObj inputWindowObj focusObj unfocusObj saveDataObj refreshDataObj In addition, the following object properties must be properly handled: acceptsFocus hasFocus inputWindow dataPtr dataType At the time of this writing, not all widgets have been modified to work with the screen-traversal facility. AVAILABLE FUNCTIONSint traverseCDKScreen (CDKSCREEN *screen);This function contains the main screen traversal engine.
It does the following:
Causes the traversal engine to exit after calling the
saveData method for each of the widgets.
Calls exitOKCDKScreen() on the screen associated
with widget obj. This function was designed to be used as a callback
routine for a button widget used as an OK button on a data-entry screen.
Causes the traversal engine to exit without saving user
modified data.
Calls exitCancelCDKScreen() on the screen
associated with widget obj. This function was designed to be used as a
callback routine for a button widget used as a Cancel button on a data-entry
screen.
Causes the traversal engine to call the refreshData
method for each widget. This will cause any unsaved changes to be discarded
and the widget states will be restored to their initial values.
Calls resetCDKScreen() on the screen associated
with widget obj. This function was designed to be used as a callback
routine for a button widget used as a Reset button on a data-entry
screen.
This is a utility function, one of the pieces from which
you can construct a customized version of traverseCDKScreen.
BUGSNot all widgets have had the extra methods added so that they work with the screen traversal engine.AUTHORGrant Edwards, Aspen Research CorporationThomas Dickey and contributors. SEE ALSOcdk(3), cdk_binding(3), cdk_display(3), cdk_screen(3) Visit the GSP FreeBSD Man Page Interface. |