Window And Screen Drawing; The Windowsexample Add-In; An Overview Of Windows In The Windowsexample; Cpmainframe - Casio ClassPad 300 Programming Manual

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

Advertisement

Window and Screen Drawing

The WindowsExample Add-in

This section will provide you with information on how drawing works on the ClassPad
300. To help show how these ideas are applied to an add-in application, we have
provided an example add-in that uses most of the concepts that will be discussed.
The add-in is located in Documents\ClassPad 300 SDK
\Examples\WindowsExample\WindowsExample.dev.
It is recommended that you run this application and see what type of drawing functions it
performs. It is also recommended that you try changing the code to see how your
changes affect what is drawn to the screen. We will refer back to and discuss the source
code of this add-in throughout this section to see how the drawing topics we cover are
used.

An Overview of Windows in the WindowsExample

This section serves as a brief explanation of the windows used in WindowsExample. For
a more extensive discussion of window classes on the ClassPad, see the User Interfaces
section.

CPMainFrame

Almost every application on the ClassPad has a CPMainFrame as its base window. From
using the ClassPad you should be aware that an application can have two main module
windows that can be resized and swapped. Depending on which of these two windows
has focus different menus, toolbars and status bar are displayed. It is the CPMainFrame's
job to handle these multiple module windows and make sure that the correct UI is
displayed.

CPModuleWindow

A CPModuleWindow is the base class for applications or "modules" on the ClassPad.
Each CPModuleWindow can have its own set of menus, toolbar items, and status bar
messages. CPModuleWindows must be added to a CPMainFrame. The CPMainFrame is
then in charge of handling any swapping or resizing of multiple CPModuleWindows.

CPWindow

A CPWindow is a rectangular screen area that supports drawing and scrolling.
CPWindows are based upon PegWindows. The only difference between the two is that a
CPWindow allows drawing to the window in relative coordinates. Note that CPWindows
cannot have their own menus or toolbars.

Windows in WindowsExample

Let's take a look at the WindowsExample add-in and see how the three different
windows are used to create the application.
31

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents