Texas Instruments TI89 Developer Guide - Page 105
Integrating a Flash Application, Mode Settings, Mode Notification Flags
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 105 highlights
63 8. 8.1. 8.1.1. Integrating a Flash Application 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; } } Mode Notification Flags MO_NOTIFY_FOLDER MO_NOTIFY_GRAPH_COUNT MO_NOTIFY_GRAPH_TYPE_1 - Current folder has changed. - 2 graph mode or 1 graph mode. - Graph mode change. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001