Scwindow; Scwindowwithmode - Casio ClassPad 300 Programming Manual

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

Advertisement

SCWindow

Class Name
SCWindow
SCWindow is an extension of the CPFrameWindow that adds support for events. Instead
of handling user input like pen and keyboard events in the Message() method,
SCWindow extends handling of events with the following event handlers:
• OnLButtonDownEvent(const SCEvent& e)
• OnLButtonUpEvent(const SCEvent& e)
• OnMouseMoveEvent(const SCEvent& e)
• OnKeyEvent(const SCEvent& e)
• OnExtendedKeyEvent(const SCEvent& e)
These methods are virtual. If you derive a sub-class from SCWindow you can create your
own event handlers. Of course you can still decide to handle these events directly in the
Message method if you'd like. If you handle these events in the Message method then the
event handlers listed above will never be called.
The typical usage for SCWindow is to first derive your own CPModuleWindow subclass,
and then create another window class like SCWindow or SCWindowWithMode to sit
inside your CPModuleWindow class. The CPModuleWindow class can manage scrolling
of the SCWindow class while the SCWindow or SCWindowWithMode class can manage
events or modes.
Here is an example that creates a SCWindow inside a CPModuleWindow:
SCWindow *sc = new SCWindow(Rect);
swin->Add(sc);

SCWindowWithMode

Class Name
SCWindowWithMode SCWindow
SCWindowWithMode further extends a SCWindow by adding modes. Modes
encapsulate the most important events for a given task, allowing you to change the
behavior of events in you window at runtime.
Derived From
Styles
CPFrameWindow FF_NONE
FF_THIN
FF_THICK
Derived From
Styles
FF_NONE
FF_THIN
FF_THICK
Signals
PSF_SIZED
PSF_FOCUS_RECEIVED
PSF_FOCUS_LOST
PSF_KEY_RECEIVED
Signals
PSF_SIZED
PSF_FOCUS_RECEIVED
PSF_FOCUS_LOST
PSF_KEY_RECEIVED
53

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents