Main Page Class Hierarchy Compound List File List Compound Members File Members
The Framework
Introduction and Overview
Razor! is a highly modular, easy to use, embeddable presentation engine for Palm Powered(tm) devices. It makes it easier for developers to create multimedia software, such as animations and games. The engine is not a ready-to-use executable. Instead it comes as a bundle of C++ source files which need to be customized, compiled and linked with your own code.
Its main features include
- Timing + Flow control - Razor! ensures the correct order of all actions, and their precise timing.
- Canvas management - Razor! manages the drawing area (aka Canvas). It provides double buffering with optimized copying.
- Sprite engine - Razor! can draw sprites (small bitmaps with transparent parts). It manages their position, shown/hidden state, etc.
- Sound engine - Razor! can play music (faking three voices), and sound FX.
- Input management - Razor! can poll the hard keys, and direct other events to your app.
Razor! is written in C++ and is delivered as a so-called hybrid framework. Framework vs. Class Library
It is important to understand the nature of a framework, especially in comparison to a class library. Frameworks operate by the "Hollywood principle" (don't call us, we'll call you). That means, the framework controls the entire flow of your application's execution, calling your code in a few well-defined places. When you are using a class library, it is just the other way around: You control the flow, and make calls into the library.
A framework is harder to design than a class library, but provided that your application fits the domain of the framework, it can save you a lot of work, and provide results of superior quality, because you are not only using proven code, but also proven patterns for application design.
In reality, you will rarely find a pure framework. Most frameworks are also accompanied by a class library. These are called hybrid frameworks. Hotspots
The places in your code, which are invoked by the framework, are called hotspots. These are the places where you are given the chance to customize the behavior of the resulting application. Razor! bundles all hotspots in one place: There is a class called ActionEngine which contains several pure virtual operations, which shall be overridden by you. Customizing Razor!
As mentioned before, Razor! bundles all hotspots in the ActionEngine class. In order to customize Razor!, you will need to create a specialization of ActionEngine (using inheritance), and you will need to change the file "ActionEngineFactory.h" in order to tell Razor! the name of your new class. Look at the class DemoActionEngine for a working example of an ActionEngine. Some further customizations can be made through modifications of the file "Customization.h"
Razor! Engine Developer's Guide. Copyright © by Tilo Christ. All Rights Reserved. Last updated: 17 Dec 2000