Pegmessage; Cpstring; Cparray - Casio ClassPad 300 Programming Manual

Sdk programming guide
Hide thumbs Also See for ClassPad 300:
Table of Contents

Advertisement

There is more information about using these functions in the Window and Screen
Drawing section of this document.

PegMessage

PegMessage defines the format of messages passed within the PEG environment.
PegMessage is defined as:
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
{
LONG lData;
PegRect Rect;
SIGNED iUserData[4];
WORD wUserData[4];
PegPoint Point;
void *pData;
};
};
For user-defined messages, all but the wType and pTarget message fields can be used in
any way desired. The iUserData, wUserData, and pData fields are intended to allow you
to easily pass any type of data in your user defined messages. Refer to the section on
Messages and Message Handling for more information on PegMessage.

CPString

The CPString class encapsulates the memory allocation necessary for string handling,
while still providing access to a raw char*. For more information on the member
functions of CPString, refer to the section Strings and String Handling In the ClassPad in
this document.

CPArray

The CPArray class manages a variable sized array of void's, encapsulating the memory
management. The CPArray class provides an easy interface for managing objects in
memory.
The following is a list of all public member functions as well as a comment describing
what each function does:
// Return the current size of the array
int
GetSize () const
20

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents