EasyManuals Logo
Home>Casio>Calculator>ClassPad 300

Casio ClassPad 300 Programming Guide

Casio ClassPad 300
125 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #23 background imageLoading...
Page #23 background image
Messages and Message Handling
The driving force behind the graphical interface on the ClassPad comes from events from
the input devices and other PEG objects. All of these events all sent as messages in the
PegMessageQueue. The PegMessageQueue is an encapsulated FIFO message queue
with member functions for queue management. It also performs timer maintenance and
miscellaneous housekeeping.
The messages placed in the queue contain notifications and commands that cause the
graphical elements to redraw themselves, remove themselves from the screen, resize
themselves, or perform any number of various other tasks. Messages can also be user-
defined, allowing you to send and receive a nearly unlimited number of messages whose
meaning is defined by you. This section will discuss these messages’ structure, as well as
how the messages are handled and used.
PegMessages
Definition
Messages are defined by PEG as simple structures containing fields indicating the source,
target, and content of the message. The definition of this data structure, called
PegMessage, is shown below:
struct PegMessage
{
PegMessage() {Next = NULL; pTarget = NULL;}
PegMessage(WORD wVal) {Next = NULL; pTarget = NULL; wType =
wVal;}
WORD wType;
SIGNED iData;
PegThing *pTarget;
PegThing *pSource;
PegMessage *Next;
union
{
void *pData;
LONG lData;
PegRect Rect;
PegPoint Point;
LONG lUserData[2];
DWORD dUserData[2];
SIGNED iUserData[4];
WORD wUserData[4];
UCHAR uUserData[8];
};
};
Messages are identified by the member field wType. This is a 16-bit unsigned integer
value, which allows 65,535 unique message types to be defined. Currently PEG reserves
the first 5000 message wType values for internal messages, which leaves message values
5000 through 65,535 available for user definition. The number of messages reserved for
23

Table of Contents

Other manuals for Casio ClassPad 300

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Casio ClassPad 300 and is the answer not in the manual?

Casio ClassPad 300 Specifications

General IconGeneral
BrandCasio
ModelClassPad 300
CategoryCalculator
LanguageEnglish

Related product manuals