drwimpc001002.jpg drwimpc001003.jpg drwimpc001004.jpg
drwimpc001001.jpg
drwimpc001008.jpg drwimpc001009.jpg
Download
Welcome to the home of !DrWimpC - a C development tool for RISC OS computers with RISC OS 4 or higher.
drwimpc001013.gif
Features include the rapid creation of wimp applications, automatic generation of menus, and associated links to sub menus and menu help texts, linking of windows to menu items and icons, reusable objects designed using a standard template editor, and more. The two main C compilers for RISC OS of GCC and the Castle C compiler are supported.
!DrWimpC
drwimpc001011.gif
External Dependency Links for !DrWimpC.
drwimpc001014.gif
OSLib.
Introduction.
GCC 3.4.6.
Until now there has been no equivalent to the popular BASIC DrWimp Library available to C programmers. Now !DrWimpC fills that gap by providing a full conversion of that library into the C programming language, along with a front end project management tool for easy creation and maintenance of source code and application resources.

Emphasis is placed on interfacing to and using the current tools available to RISC OS, such as the source code editors !StrongEd and !Zap, compilers and make utilities. The native RISC OS application structure is used so that applications can also be compiled, edited, etc, independently of !DrWimpC. Any template editor can be used to design window definitions for use in an application.

The BASIC DrWimp library is a matched set of user and wimp functions. All wimp related application code is placed in the user functions which form the interface between the application and the DrWimp library which interacts with the wimp environment. The user functions are called by the DrWimp library according to the wimp events received. The DrWimpC library operates in the same way. So, there is no need to register event handler functions as is typical of other C libraries that provide an interface to the wimp environment.

The DrWimpC Library has an equivalent library function and user function for each FN and PROC defined in the BASIC DrWimp Library. A StrongHelp manual is provided that describes them. The user and wimp functions are collected into source files according to wimp event/actions. Only the functions for the events used by an application are included into the final !RunImage file.

A new application, ready to build and run, is created in a few mouse clicks. A standard skeleton application is created which when built and run will have a main window, icon bar icon and default icon bar menu. C files for standard events such as mouse clicks, window opening, etc are automatically created. Further user files are be created when additional wimp actions are introduced using the 'Wimp Lib Action' menu. These can then be edited to place the required functionality into each application.

In addition to the matched user/wimp function interface, !DrWimpC implements a powerful alternative. Using  the 'N' validation code for icons, C functions can be linked directly to an icon by name, The icons dont need to be referred to by number, so the window definition can be edited without icon renumbering affecting the C source. The 'granularity' of the C functions is a wimp action or event. A function can be individually identified with an icon/mouse click or key press, etc, at the source code level. The DrWimpC library calls the functions automatically where the corresponding user function would be called. The code is compiled into libraries with names of the template files containing the window definitions. Icons can be grouped together by name to form objects which can be reused in other applications. When an application is compiled the 'template code' libraries are automatically linked into the !RunImage file. Arrays of these template objects are also supported. Any menus and windows associated with the template objects are also automatically loaded.
!StrongEd
!Zap.
!WinEd.
ResFind/ResConf
drwimpc001012.gif
drwimpc001006.jpg
drwimpc001007.jpg drwimpc001005.jpg
drwimpc001010.gif
Dependencies.
The important bit. What do you need to start using !DrWimpC. There are a number of support programs listed in the 'External Dependency List for !DrWimpC' section of this page. OSLib is required because as DrWimpC is a C library it requires a safe C SWI interface to RISC OS. When I began converting DrWimpC I chose OSLib because it provides a mostly complete interface, is being actively maintained, and I could use its structure and name definitions for DrWimpC instead of inventing names (reinventing the wheel). Currently this has resulted in a, hopefully temporary, limitation that there is no ELF release of OSLib. Clearly, I do not want  to ask users to build their own ELF OSLib in order to use !DrWimpC. The effect of this is the 'Caveat GCC'. If you intend to use the freely available GCCSDK you must use the most recent stable static release - GCC 3.4.6
 
If you are using the Castle Development Tools then you will be using the shared C library which is not ELF, so the static OSLib release 6.90 is the one to choose.
 
!DrWimpC uses the external edit protocol to communicate with source code editors so the choice of source code editor is between !Zap and !StrongEd.
 
If you choose !StrongEd, I recommend editing the C ModeWhen file by placing - fff,(*).** at the start of the Includes Rule section and saving it as the External mode's ModeWhen file for use with !DrWimpC so you get the C syntax colouring.
 
!DrWimpC uses RISC OS template files for automatically loading window definitions, and identifying windows and icons by name. Any template editor can be used to produce the template files. !WinEd is sutiable and is being actively maintained.
 
RESFIND/RESCONF.are used to cope with internationalisation. Calls to RESFIND are placed into the !Run file when it is generated at application creation.
Conditons of Use.
  • The Dr Wimp C package is distributed on an "As Is" basis, without warranty. No liability can be accepted for any consequential loss or damage, however caused, arising from the use of this package.
  • The DrWimp C package is available under the same terms as the OSLib library. That is, you may use it to create freeware, shareware or commercial applications. You may acknowledge the use of !DrWimpC if you wish.
Features.
  •  DrWimpC includes all the features of the BASIC DrWimp Library.  In additon it also provides:
  • RAM transfer, OLE, External Edit protocol implemented using the same matched user/wimp function method as used in the BASIC DrWimp library (non Iyonix systems)..
  •  Standard application Scrap File and Choices handling by a simple function interface.
  •  Language Support using the RISC OS standard method provided by RESFIND/RESCONF.
  •  Definition of Menus, submenus and links to window definitions via an easy to use GUI.
  •  Automatic loading of windows and menus at application start up.  (Implemented as an option).
  •  Association of Icon mouse clicks with a window definition in a template file.
  •  Direct association of C functions to windows menus and icons by template/window/icon names.
  •  Easy grouping of icons by icon name into reusable 'template objects', including arrays of template objects.
  •  Easy creation, edit and maintenance of the C source files for an application created using !DrWimpC.
  •  Automation of the build/compile process with support for the Castle C and GCC compiler tools.
  •  Automated creation of an initial application distribution.
  •  Interaction with !Zap and !StrongEd using the external edit protocol to aid editing of the C source code .
Package Contents.
  • The Main !DrWimpC application supplied with two !RunImage files one compiled with GCC linked with UnixLib and the other compiled  with the Castle C tools that reqiures the 32bit Shared C library..
  • The DrWimpC C library drwlib32 for use with the Shared C library and drwlib32G for use with UnixLib.
  • StrongHelp DrWimpC API documentation. HTML Manual, Getting Started Documentation.
  • 15 Example programs converted from the corresponding BASIC DrWimp Examples.
  • 2 Example programs to illustrate the use and reuse of DrWimpC 'template objects'.
  • Support programs RESFIND 2.20/RESCONF 0.31. !!DeepKeys (also comes with !Zap) for extended key info.
Downloads.
The Full DrWimpC package..
ddc.gif
!DrWimpC.
The DrWimpC package download split into smaller parts.
ddc.gif
!DrWimpC Application.
ddc.gif
Examples.
ddc.gif
(RIGCC) RunImage compiled with GCC and linked with UnixLib.
Contact.
By Email. Remove ARGHSPAM from the address.  
History.
20091025 Preparation for first beta release into the wild. 
Programs.
Programs written using !DrWimpC. Since !DrWimpC is new this will have more entries in due course.  
!MyDesk. An unobtrusive Virtual Screen Manager that uses a menu system and control panel instead oif a main viewer/micro view  mechanism to navigate between desktops and access windows. Provides unlimited virtual screens in user arranged order. Windows can be organised to appear on one or more of the screens and accessed using menus wichc list them by screen or task or all windows on all screens. The usual facilites to hide, show, get, fetch, move, copy a window or group of windows are possible. Backdrop and pinboard configurations can be associated with a virtual screen. A small configuration script language allows windows and window types to be ignored, or included  in a screen, and alerts issued.
mydesk.gif