|The DrWimp C Application Builder|
|Welcome to the home of !DrWimpC - a C development tool for RISC OS computers with RISC OS 4 or higher.|
|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 ROOL C compiler are supported.|
Supported Hardware includes the Raspberry Pi. This has already proved worthwhile by testing on a real RISC OS machine I found an error which
accessed NULL pointers but got past my VirtualAcorn setup.
|For Topical Pi News Visit|
|Conditions of Use|
|My Pi Setup: Running DrWimpC Application Builder on the Raspberry Pi|
|Two principal acknowledgements towards the creation of DrWimpC should be made.||DRWDEF Split Downloads|
|Firstly, to Andrew Ayre for his initial development of the BASIC DrWimp library.|
Secondly, and the reason for placing the acknowledgement prominently here, to
Ray Favre for maintaining and developing further the BASIC DrWimp library and
providing his permission, advice, ideas, programming and DrWimp expertise, and
time to read, digest and reply to my email enquiries. We enjoyed (or Ray endured)
several years of occasional email conversations on the subject, during which Ray indicated that he had wanted to produce a C version of DrWimp himself, although after trying to learn C and reading the GCC articles in Archive magazine he conceded that his time of life meant he was unlikely to be able to put sufficient energy into such a project.
The outcome of our email conversations was the production of a freeware C version of DrWimp. This took only a few months to complete, including some enhancements. I also said I would create a front end application generator in the !Fabricate style which has developed considerably into !DrWimpC - the DrWimp C Application Builder. Ray also wanted this project to be separate from the BASIC DrWimp library project. This site and contents is the result. If you find the program useful, use it as you like. Its conditions of use are the same as the BASIC DrWimp library, and OSLib.
|!drwdef Part 1|
|!drwdef Part 2|
|!drwdef Part 3|
|Additonal Support Application Downloads for DrWimpC|
|Template Functions Part 2.|
|Template Functions Part 3.|
Linking Templates and Menus, and
defining and linking shortcuts.
In addition, thanks are due for the efforts of the GCC developers, in particular for bringing ELF format and shared library support to RISC OS, and the OSLib developers and maintainers, and also the developers and maintainers of !StrongEd and !Zap, in particular for implementing the external edit protocol, and finally for the work done on
|External Help Buttons.|
|External Dependency Links for !DrWimpC.|
|External Help Buttons Part 2.|
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 can operate in the same way, and implements 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 arranged 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. This means that there is no need to register handler functions for wimp events as traditionally done in such libraries.
In addition to the matched user/wimp function interface, !DrWimpC implements a powerful alternative - the 'template code' functions. Using the 'N' validation code for icons, C functions can be linked directly to an icon by name. The icons don't need to be referred to by number, so the window definition can be edited without icon renumbering affecting the C source. The DrWimpC library will automatically call the function when it receives the wimp event or at the appropriate time during a wimp message protocol interaction. An incidental benefit of this mechanism is that only those functions necessary to your application's handling of a wimp event or protocol need to be defined. This is different from the matched user/wimp function arrangement where if one user function in a source file is used, the whole file of skeleton user functions is linked into the application.
The 'template code' functions are 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. When compiled as shared libraries the code can be loaded once and reused by many applications. This means that 'template objects' to be defined in a template file within an application and its associated code can then be reused in another application simply by including the 'template object' in one of the application's template definitions by a simple template edit, and then compiling and linking the application. The 'template code' shared library. will be linked to the new application. 'Template objects' can be indexed so you can define a table of a number of the same template object type in a template without needing to compile and link the application again.
The 'template code' functions are further described in the Template functions pages on this site.
|Running DrWimpC Application Builder on the Raspberry Pi|
|Tailoring Template Objects.|
|Back to TOP|
|This web site without the zip files.|
|Back to TOP|
|Conditions 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.
1. OSlib 7.00 header files. DrWimpC uses the OSLib definitions for wimp constants, data types and structures.
2. An external edit capable text editor. So either !StrongEd or !Zap.
3. A RISC OS template editor, !WinEd recommended. !TemplEd is an alternative. !DrWimpC uses the OLE protocol to open template files in a template editor, so alternatives to !WinEd must be able to handle template files being opened in this way..
4. The OLE support module for (3) above. If you don't have a copy, or your version doesn't handle the template edit, you can use the !MyOLE application available from this site. !MyOLE defines an OLE server type variable of OLEServer$Type_... -N MyOLE -R /<MyOLE$Dir> which the DrWimpC library and !DrWimpC use to start an OLE session if the OLE support module is not available.
5. RESFIND/RESCONF.are used to cope with internationalization. Calls to RESFIND are placed into the !Run file when it is generated at application creation..
6. Optionally, !StrongHelp for viewing the DrWimpCAPI. Functional API manual. You may also find the FuncProc manual in the BASIC DrWimp library archive useful since the DrWimpC Functional API manual references the BASIC function description of equivalent functions in the BASIC DrWimp library.
|Back to TOP|
|GCC 4 and Shared Libraries.|
Initially, the !DrWimpC project used the Castle (now ROOL) C tools which were at that time the first choice for developing applications using the C programming language on RISC OS. Since then GCC has matured considerably. Several factors such as being freely available, the introduction of the ELF format for executables and shared libraries in GCC 4 have made GCC the RISC OS compiler of choice. It is also still being actively supported and developed.. !DrWimpC still supports the use of either compiler, but places more emphasis on GCC 4 mainly because of the ability to use the shared library facilities to build reusable code in the form of !DrWimpC 'template code' libraries of functions associated with a RISC OS template definition stored in an application template file.
The DrWimpC library is supplied in three forms - a shared version - libdrwlib32Gs/so/1/3/0, a static version - libdrwlib32Ga/a compiled with GCC 4 for use when linking applications using the static GCC libraries, and drwlib32 compiled with and for use with the ROOL Development C tools.
The !DrWimpC application is supplied in ELF format, linked with the shared DrWimpC library. This requires both the ELF loader and the standard GCC shared libraries. The ELF loader is part of the SharedLibs package. The advice in the GCC documentation is to direct users to download the lSharedLibs zip files to ensure you use up to date versions. They are available for download from the packaged software section of the riscos.info site. For C support the SharedLibs-C package is also required. If you prefer to use a Shared C library version of DrWimpC App Builder there is also a !RunImage compiled with the ROOL C Tools in !DrWimpC.ROOLCRunImage. Copy this into the !DrWimpC directory to use !DrWimpC without requiring the shared libraries. (Save the ELF !RunImage somewhere safe first if you are going to use it at some point), I recommend preserving the SetVars file too since the LD_LIBRARY_PATH is only required for the ELF Shared library version. If you compile using the ROOL C tools the SET LD_LIBRARY_PATH command is commented out. It is uncommented when you compile using GCC 4 with shared linking. If you find that you get a 'Can't load shared library ont application startup it may be because the SET LD_LIBRARY_PATH is still commented out due to a last compile being with the ROOL C tools, or GCC 4 with the static linking option ticked. If so, the application's !SetVars file can be manually edited to uncomment the command.
There is an illustration of !DrWimpC 'template code' libraries in the !bar and !bar2 applications supplied in the examples folder. See also the Template Functions topic for a more detailed description of the use of shared libraries in DrWimpC App Builder.
|Back to TOP|
|Note that in this release the drag and drop mechanism is coded but not tested but will be supported in a future release. The print examples are not complete because they are being implemented as a reusable library which needs more coding and testing and has gone beyond the scope of a simple example.|
The Main !DrWimpC application supplied with two !RunImage files one compiled with GCC linked with UnixLib and the other compiled with the ROOL C tools that requires the 32-bit Shared C Library.
The DrWimpC C library drwlib32 for use with the Shared C library and libdrwlib32Gs/so/1/1/1 and libdrwlib32Ga/a for use with UnixLib (shared and static versions).
StrongHelp DrWimpC API documentation. (OLD) HTML Manual,
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.
Can make use of !!DeepKeys (comes with !zap) for extended key info..
|Back to TOP|
|The latest full version can be downloaded using the links below.|
|Latest Version (2014-03-10)|
|The DrWimpC Application Builder.|
|The DrWimpC Libraries and Resources. The archive split into three parts to keep the maximum upload and download zip file sizes as small as possible. All three parts are required to run DrWimpC App Builder.|
|!drwdef Part 1|
|!drwdef Part 2|
|!drwdef Part 3|
|ROOL C RunImages|
|Alternative OLE support module..|
|DrWimp example programs in C.|
To run !DrWimpC you will need !DRWDEF which contains the DrWimpC libraries and resources used by !DrWimpC and !MyOLE. If you prefer not to use a Shared C library version, !DrWimpC and !MyOLE contain a !RunImage compiled with the ROOL C tools in a sub directory ROOLCRunImage. To use them save the ELF !RunImage somewhere safe and then copy the Shared C library !RunImage in its place.
|By email to (pdmiller followed by an at (@) drwimpc dot co dot uk). I regularly look at c.s.a.programmer and the other c.s.a news groups, so if you can't contact me by email I would eventually notice a post to a c.s.a. news group. c.s.a.programmer or apps would be a logical place to post.|
|Latest Change 2014-03-10.|
|2014-03-10 Update Version 1.22|
|Next: Getting Started.|