|
RTPEG-32 - Portable Embedded GUI
RTPEG-32 is an event-driven, object-oriented C++ GUI library for embedded
systems. It supports professional Windows look-and-feel or custom user
interfaces. Device drivers for VGA and SVGA/VESA graphics hardware are
included.
Features
- True Windows Look-and-Feel
RTPEG-32
includes a full set of controls which look and behave the way users
expect. Predefined classes include buttons, bitmaps, check
boxes, scroll bars, menus, progress bars, radio buttons, prompts,
combo boxes, dialog boxes, lists, tree views, etc.
- Event Driven Programming Model
User interface
objects are C++ classes derived from predefined RTPEG-32
classes. Such a derived class can override methods such as Draw() to
implement a custom appearance or Message() to catch messages sent by a
user input device, a separate threads, or other GUI controls.
- Rich Set of Drivers
A driver for VGA, 16 color
mode, is included, as well as high performance drivers for 8-bit, 16-bit,
24-bit, and 32-bit color depth with arbitrary resolution. These drivers
require VGA compatible hardware or VESA BIOS support. The source code of
these drivers is included, allowing easy adaptation for custom display
hardware.
- Keyboard Support
RTPEG-32 applications can be
navigated using only the keyboard, if no mouse or other pointing device
is available.
- Mouse and Touch Screen Support
Standard serial
and PS/2 mice are supported. With RTUSB-32, USB
mice, USB keyboards and USB touch screens are also supported.
- Multi Language Support
RTPEG-32 applications can
contain all strings (e.g. control titles, prompts, help messages, etc) in
several languages. An application can switch the current language at
run-time.
- Unicode Support
RTPEG-32 supports 8-bit and
optionally 16-bit fonts to cover Japanese, Chinese, and other Far East
languages.
- Never Disables Interrupts
All RTPEG-32
operations are fully interruptible. Real-time performance is never
affected.
- Supports (but does not require) RTKernel-32
Several threads can perform screen output simultaneously. RTPEG-32
performs all required locking. Even the simultaneous execution of several
modal windows is supported (e.g., to signal error conditions while other
threads continue to run).
- GUI Design Tools
Program Window Builder is a
rapid prototyping and design tool used to quickly create RTPEG-32
graphical objects such as bitmaps, fonts, windows, etc. It generates C++
source code to initialize all designed windows and catch all defined
messages. Additional tools are included to generate custom fonts and to
convert .BMP, .GIF, and .JPEG images into C++ compilable source code
constants for easy inclusion in embedded applications.
- Windows Emulation Environment
For prototyping
or fast native software development, GUIs programmed with RTPEG-32 can be
executed and tested under Windows 2000, XP, Vista, or Windows 7.
Screenshot from an RTPEG-32 demo program with some RTPEG-32 windows and controls.
Example
Using RTPEG-32 is very simple. Program Window Builder can be used to
automatically generate source code for complex user interface objects.
Using predefined or custom controls and windows is a snap, as shown by the
"Hello RTPEG-32" demo program below:
#include <peg.hpp>
int main(void)
{
PegPresentationManager * pPresent;
PegMessageWindow * pWin;
pPresent = PegInitialize(CreatePegScreen_VESA_8(),
sizeof(class PegScreen));
pWin = new PegMessageWindow("Example Message Window",
"This is a message window with a raised frame.",
MW_OK | MW_CANCEL | MW_RETRY | FF_RAISED);
pPresent->Center(pWin);
pPresent->Add(pWin);
PegExecute(pPresent);
return 0;
}
The program displays this message box:
Predefined Window and Control Classes
RTPEG-32 comes with many graphical user interface objects which are all
easily customizable through their constructors or by using them as base
classes for application-specific objects. Below is a list of some
predefined window, control, chart, dial, etc. classes.
Window Classes |
Control Classes |
Charts, Dials, etc. |
PegWindow
PegPresentationManager
PegAnimationWindow
PegComboBox
PegDecoratedWindow
PegDialog
PegEditBox
PegList
PegHorzList
PegVertList
PegMessageWindow
PegNotebook
PegProgressWindow
PegSpreadSheet
PegTable
PegTextBox
PegTreeNode
PegTreeView
PegProgressBar |
PegAnimation
PegBitmapButton
PegButton
PegCheckBox
PegDecoratedButton
PegGroup
PegHScroll
PegIcon
PegMenu
PegMenuBar
PegMenuButton
PegMLTextButton
PegRadioButton
PegSlider
PegSpinButton
PegStatusBar
PegTextButton
PegTitle
PegToolBar
PegToolBarPanel
PegVScroll
PegVPrompt |
PegChart
PegLineChart
PegMultiLineChart
PegStripChart
PegDial
PegFiniteDial
PegFiniteBitmapDial
PegLight
PegColorLight
PegBitmapLight
PegScale
PegLinearScale
PegLinearBitmapScale |
Examples of Predefined Windows and Controls
Below are a few screen shots of some of the more complex GUI objects
provided by RTPEG-32. Most of these displays have been produced with only
a few lines of code. The complete code of these examples is included in the
RTPEG-32 documentation.
|