Wimp Programming for All

on Acorn RISC Computers


Lee Calcraft and Alan Wrigley

Click the cover picture to the right to view a larger version in a new browser window

Wimp Programming for All

Arc Click this icon to open a window showing the source files for this book
Dsc Click this icon to open a window showing the contents of the accompanying software disc

Description from the back cover

A major feature of Acorn's RISC computers is the RISC OS operating system and the support it provides to programmers writing multi-tasking Desktop applications. To many programmers, unused to the concepts and techniques involved, the prospect of coping with the requirements of the Wimp Manager is a daunting one. This book aims to fill the need for an easy to read tutorial style book which covers all the main features of Wimp programming.

This book provides Basic programmers with a complete introduction to all the techniques involved in writing multi-tasking Wimp programs to run within the RISC OS Desktop environment. No prior knowledge of the Wimp is assumed and the tutorial style of the book will enable all programmers to understand the concepts involved and to develop their skills in writing high quality programs for Acorn's RISC machines.

An accompanying disc, containing all the example programs described in the book, and additional applications, is available for £4.95 (inc. VAT) direct from the publishers.

The authors are both well known within the Acorn community. Dr Lee Calcraft is co-founder of BEEBUG, currently co-editor of RISC User, and author of RISC Developments' popular DeskEdit and ArcScan packages. He also runs a programming consultancy. Alan Wrigley is a former Technical Editor of RISC User, now a freelance contributor, and author of an expanding range of Desktop applications marketed under the name of Rheingold Enterprises. Both authors have extensive experience of programming in general, and the RISC OS Wimp in particular.

£12.95

ISBN 1-85142-088-6
9 781851 420889

Contents

Ov Introduction
Ov 1. Introducing the Wimp
    What is the Wimp?
    Multi-tasking
    Wimp applications
    SWI calls
    Outline of a Wimp program
    Application directories
    Introduction to error handling
Ov 2. Windows
    Introduction to windows
    Creating a window
    Window size
    Scroll offsets
    Window colours
    Window flags
    Window title
    Work area flags
    Miscellaneous window information
    Opening and closing a window
    Window flag generator
Ov 3. The Wimp Poll
    The poll loop
    Null reason codes
    Requests to open or close a window
    Pointer over window
    Mouse clicks
    Key presses
    Masking events
Ov 4. Error Handling
    Trapping errors
    Reporting errors
    Responding to error boxes
Ov 5. Icons
    Icons in use
    Creating icons
    Icon flags
    Indirected icons
    Exclusive selection groups
    Menu icons
    Radio icons
    Writable icons
    Altering icons
    Validation
    Three-dimensional icons
    Sprite icons
    The icon bar
Ov 6. Menus
    The Wimp menu system
    Creating a menu
    Menu structure
    Menu items
    Menu icon flags and data
    Menu positioning
    Menu selection
    Handling Adjust
    Ticking and shading items
    Submenus
    Dialogue boxes
    Implementing more than one menu
Ov 7. Redrawing Windows
    Introduction to user-redraw
    The redraw process
    Forcing a redraw
    Efficient redraws
    Redrawing text
    Redrawing graphics
Ov 8. The Wimp Message System, Loading and Saving Data
    Receiving messages
    Message action codes
    File information utility
    Error-returning SWI calls
    Data transfer protocol
    Sending messages
    Implementing a save box
    Object dragging
    Saving data
    Submenu warnings
Ov 9. Templates
    What is a template?
    Using FormEd
    Creating a window
    Adding some icons
    Sprite-only icons
    Text-plus-sprite icons
    Using templates in an application
    Using sprites from more than one area
    Three-dimensional icons
Ov 10. Printer Drivers and Outline Fonts
    Printer drivers
    Internal co-ordinates
    The print job
    Drawing the page
    Colour translation
    Outline fonts
    Displaying outline fonts
    Printing outline fonts
Ov Appendix A: Indirection Operators
Ov Appendix B: Using RISC OS 3
Ov Appendix C: Application Resources
Ov Appendix D: Setting up a Sprite Area
Ov Appendix E: SWI calls described in this book
Ov Appendix F: Associated Disc
Ov Appendix G: The Wimp Programmer's Toolkit
Ov Appendix H: DeskEdit
Ov Index