Window and Screen Drawing ____________________________________________ 31
The WindowsExample Add-in_________________________________________ 31
An Overview of Windows in the WindowsExample _______________________ 31
CPMainFrame_____________________________________________________ 31
CPModuleWindow _________________________________________________ 31
CPWindow _______________________________________________________ 31
Windows in WindowsExample________________________________________ 31
Coordinates on the ClassPad __________________________________________ 33
Drawing on the ClassPad _____________________________________________ 34
Overriding the Draw() Function _______________________________________ 34
Invalidating and Drawing outside of the Draw() Method____________________ 35
Drawing and Invalidating in WindowsExample___________________________ 36
Object Boundaries __________________________________________________ 37
mReal, mClient and PegRects_________________________________________ 37
Using Object Boundaries in WindowsExample ___________________________ 38
Bounding Rectangles in DrawText() _________________________________ 38
Bounding Rectangles in OnPointerMove()_____________________________ 40
Scrollbars__________________________________________________________ 40
How Scrolling Works _______________________________________________ 40
Scrolling in WindowsExample________________________________________ 41
User Interfaces________________________________________________________ 44
Windows on the ClassPad ____________________________________________ 44
PegWindow and PegWindow Derived Windows__________________________ 44
PegPresentationManager___________________________________________ 45
PegDecoratedWindow ____________________________________________ 45
CPMainFrame___________________________________________________ 46
CPModuleWindow _______________________________________________ 46
CPTabbedWindow _______________________________________________ 47
PegNotebook____________________________________________________ 48
PegMessageWindow______________________________________________ 49
PegProgressWindow______________________________________________ 51
CPFrameWindow and CPFrameWindow Derived Windows_________________ 52
SCWindow _____________________________________________________ 53
SCWindowWithMode_____________________________________________ 53
MathWindow ___________________________________________________ 54
AbstractMathWindow_____________________________________________ 55
ScrollableMathWindow ___________________________________________ 56
TabArrowMathWindow ___________________________________________ 56
SlidingMathWindow______________________________________________ 55
TextMathWindow________________________________________________ 58
Creating UI in a CPModuleWindow____________________________________ 59
Menus ___________________________________________________________ 59
Toolbars _________________________________________________________ 61
3