OcempGUI Manual

Marcus von Appen

Redistribution and use in source (XML DocBook) and 'compiled' forms (SGML, HTML, PDF, PostScript, RTF and so forth) with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code (XML DocBook) must retain the above copyright notice, this list of conditions and the following disclaimer as the first lines of this file unmodified.

  2. Redistributions in compiled form (transformed to other DTDs, converted to PDF, PostScript, RTF and other formats) must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Important: THIS DOCUMENTATION IS PROVIDED BY THE OCEMPGUI PROJECT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OCEMPGUI PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Abstract

A GUI library for Pygame


Table of Contents

Preface
Introduction
Installing OcempGUI
Dependencies
Binary packages
Building from source
Using CVS
Integration in projects
Modules
Implementing accessibility
Accessibility for third-party applications
Making python objects accessible
Keyboard navigation - IIndexable
Unhide the screen - the Magnifier
2D drawing
Geometric objects
Image manipulation
Text rendering
Complex objects
Tracking object states - the observer pattern
Building event driven systems
How the event management works
Enabling objects to receive events
Setting up the event management
Sending events
Complete event management example
Making objects event capable - the better way
How the BaseObject works
Creating event capable objects
Events on demand: the ActionListener
Creating GUI applications
Getting started
Hello World with OcempGUI
Events and Signals
Widget overview
General settings
Common widget operations - the BaseWidget
Positioning and sizing
Keyboard support
Other features
Labels
Label
ImageLabel
Buttons
Button
ImageButton
ToggleButton
CheckButton
RadioButton
Entry boxes
Editable
Entry
Range widgets
Range
Scale
ScrollBar
Container widgets
Bin
Container
Box
Frames
Table
ScrolledWindow
ScrolledList
FileList
Windows and Dialogs
Window
DialogWindow
GenericDialog
FileDialog
Miscellaneous Widgets
ImageMap
ProgressBar
Diagram
Graph2D
StatusBar
TooltipWindow
Widget components
ListItem
TextListItem
FileListItem
ListItemCollection
Creating custom widgets
Designing the basis
Implementing the widget basics
Implementing the event handlers
Advanced custom widgets
Changing the widget appearance
How widgets are drawn
Customizing the theme files
Using own drawing routines
Changing the appearance of single instances
The layer and indexing system
Layers
Index system
A. Widget hierarchy
B. Changes between 0.1.x and 0.2.x
Changes in ocempgui.access
Changes in ocempgui.events
Changes in ocempgui.widgets
Example Index
Glossary

Preface

This manual gives an overview about the OcempGUI library and explains how to install, configure and use it. It is meant to be an introduction into the OcempGUI library. This manual is not an API reference. Instead the most classes, methods and functions of the OcempGUI library will be briefly described and examples about how to use them will be provided.

Note

The descriptions, mentioned classes, methods and functions as well as the examples may get out of date and thus using any portion or information of this manual could crash your application or behave in another unexpected way. Although the author tries to keep the manual in synchronization with changes in the library, this can happen from time to time.

If you experience such a misbehaviour or are unsure about a description, refer to the extensive inline documentations of the library. You can accomplish this easily using the pydoc application, for example.