63
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
8. Integrating a Flash Application
8.1. Mode Settings
A user can change the mode settings by either using the MODE screen or by
executing the TI
-
BASIC setMode function. When any mode settings have
changed, the array where they are stored is updated appropriately. In addition,
all applications are sent a CM_MODE_CHANGE event message. The mode
notification flags in the event message indicate which mode settings changed.
Applications can ignore this message or test to see if a mode setting has
changed that it needs to react to in some way. For instance, the application may
need to set its window dirty flag (WF_DIRTY) if certain mode settings change
that trigger a CM_WPAINT event message (requiring the application to update its
windows). An example of testing for mode notification flags follows:
#include "tiams.h"
AP_myApp(pFrame self, Event *e)
{
switch (e->command)
{
.
.
.
case CM_MODE_CHANGE:
if (!(( e->info.modeInfo.notifyFlags & MO_NOTIFY_SPLIT ) ||
( e->info.modeInfo.notifyFlags & MO_NOTIFY_VECTOR_FORMAT ) ||
( e->info.modeInfo.notifyFlags & MO_NOTIFY_PRETTY_PRINT )))
wAppwindow.Flags |= WF_DIRTY;
.
.
.
break;
.
.
.
default:
EV_defaultHandler(e);
break;
}
}
8.1.1. Mode Notification Flags
MO_NOTIFY_FOLDER — Current folder has changed.
MO_NOTIFY_GRAPH_COUNT — 2 graph mode or 1 graph mode.
MO_NOTIFY_GRAPH_TYPE_1 — Graph mode change.