Columns


C/C++Sources

Victor R. Volkman

X and Windows Code from the Web

This month Victors journey takes him to a couple of X sites, and past volumes of code to do everything from calculating differential equations to playing .WAV files.


= Documentation = Source code = Links

Freedock: Application Dock for Windows

Freedock, by Sean Gordon <sean.gordon@dundee.attgis.com> is a Windows "dock" program that includes the full source code in C. A dock is kind of a miniature version of Program Manager that holds icons for the small number of applications that you really use every day. Freedock also provides the nicety of remembering your preferred window geometry for each application that you register with it as well. This saves you from having to continually rearrange your windows each time you start up an application. A previewer allows you to check or change the window geometry without actually launching the applications. The entire dock can be scaled in a way similar to the MS Office Manager dock. Figure 1 shows Freedock being configured for launching Microsoft Money.

Freedock includes compiled versions of a Win16 executable for Windows 3.1 (FREEDK16.EXE) and a Win32 executable for Windows 95 and NT (FREEDK32.EXE). The Freedock archive includes source code written in C for use with Borland C/C++ or Microsoft Visual C/C++ v1.5 (16-bit) and v2.0 (32-bit). In the Win32 version, you can choose to start applications in separate memory.

Gordon advises: "If it does not do everything you want it to do, you can modify the source code and add functionality to it." Freedock is freeware and any programs derived from its source must remain freeware. Available via ftp at ftp://ftp.coast.net/SimTel/win3/desktop/freedk25.zip 119,414 bytes. CUJ reader Eli Zaretskii <eliz@is.elta.co.il> points out that a complete list of official mirror sites is available at ftp://ftp.coast.net/SimTel/msdos/filedocs/dowload.inf(8K).

SWMP: Sound Wizards Module Player

The Sound Wizards Module Player (SWMP) by Beat Rigazzi <rigazzi@iamexwi.unibe.ch> is a driver for playing .MOD sound files through any digital audio card (e.g. SoundBlaster compatible). The .MOD audio file format was first popularized by the Amiga computer, long before the introduction of Windows 3.1 and its .WAV file standard. The .MOD file is a multichannel sampled audio file which supports four, six, or eight simultaneous channels. The .MOD file has fewer limitations than the .WAV file and for that reason has become widely used by electronic music and game producers (especially in Europe).

SWMP includes several example .MOD tracks for you to experiment with as well as a stand-alone MS-DOS player program (SWMP.EXE). For developers, SWMP provides an API and calling interfaces for Borland C/C++, assembler, and Pascal. You can integrate the library simply by including the header file and linking in MOD_DRV.OBJ (source not provided).

The driver has a small API but you can start your first .MOD file playing with as few as three function calls. A powerful hardware detection routine can autodetect the operating parameters of a SoundBlaster, SoundBlaster Pro, or Gravis UltraSound digital audio adapter. This lets users avoid having to remember obscure DMA and I/O port settings.

SWMP is freeware and can be incorporated into other freeware programs. If you want to use SWMP in a commercial product, you must contact the author first. Available via ftp at ftp://garbo.uwasa.fi/pc/sound/swmp141.zip 666,923 bytes

ACE: Adaptive Communication Environment

Douglas C. Schmidt <schmidt@cs.wustl.edu> maintains the Adaptive Communication Environment (ACE) home page (http://www.cs.wustl.edu/~schmidt/ACE.html) which organizes all related documentation and source code. ACE is an object-oriented platform-independent network programming toolkit. ACE encapsulates many UNIX and Windows NT API layers with type-secure and object-oriented interfaces. The primary focus is on multitasking and Inter-Process Communication (IPC) layers. It encapsulates the following facilities:

Additionally, ACE contains a higher-level network programming framework that integrates and enhances the lower-level C++ wrappers. This framework supports the dynamic configuration of concurrent network daemons composed of application services. This is similar to the "inetd" mechanism in UNIX.

ACE is currently being used in a number of commercial products, such as ATM signaling software, PBX monitoring, network management for mobile communications systems, and an enterprise-wide distributed medical imaging system for medical engineering.

Diffpack: Object-Oriented Framework for PDEs

The "Diffpack home page" (http://www.oslo.sintef.no/avd/33/3340/diffpack/) organizes all related documentation and source code for the SINTEF Diffpack project at the University of Oslo (Norway). The goal of Diffpack is to develop a fully object-oriented framework in C++ for solution of partial differential equations (PDEs). PDEs often arise in the mathematical modeling of physical processes involving, for example, fluid mechanics or waves. The best demonstration of Diffpacks power can be seen by looking at some of the successful application areas in which its used:

Of course, the raw data from Diffpack is much more useful if you have something to visualize it with. Diffpack can interface with gnuPlot and plotmtv. You can even construct MPEG movies from multiple visualization frames. Figure 2 shows a Diffpack visualization of a finite element based simulator for two-phase (oil/water) porous media flow.

Diffpack has been certified to run on any of the following environments: Hewlett Packard HP-UX 9.05 and C++ 3.50, Silicon Graphics IRIX 5.2 and C++ 3.2.1, Sun Sparc Solaris 2.3/SunOS 5.3 and C++ 4.0

Fresco: A Fresh Look at User-Interfaces

The Fresco Home Page (http://www.faslab.com/fresco/HomePage.html) is maintained by Denis Bohm <denis_bohm@interramp.com> and provides detailed documentation and source code on the Fresco user-interface system. Fresco is an object-oriented application programming interface (API) for graphical user interfaces, covering functionality in Xlib and Xt, and adding structured graphics and application embedding. The Fresco specification and sample implementation are under development by the X Consortium as an open, multi-vendor standard. Fresco offers a broad range of functionality, including low-level display and window management, structured graphics hierarchies, and UI widgets such as buttons and editors. An application may choose to use part of Fresco within another environment, such as using Fresco structured graphics capabilities from within Xt, or an application may choose to use Fresco solely. Fresco uses the CORBA standard object model, which allows for object distribution and provides a high-level Interface Definition Language (IDL).

Fresco has been certified to run on the following platforms:

Other users have reported success using Fresco in Linux, SunOS, Hewlett-Packard HP-UX, and OSF/1 environments. You can get to Fresco via ftp://ftp.gmd.de/gmd/ginaplus/.

Focus on Software Tools

A "software tool" is a program that simplifies the writing of a target program. The most popular type of software tools are code generators. A code generator produces an extensive infrastructure based on a relatively small input. For example, the classic UNIX YACC tool generates a LALR(2) bottom-up parser based on the grammar that you describe. Nowadays, the most common example of a software tool is the "visual" programming environment, which provides a wizard to generate code. My web search on "software tools" turned up 20,000 hits, most of which turned out to have a very liberal view of what constitutes a software tool. I will list only a few here.

X-Windows Software Tools Page

The COnceptual Learning Of Science (COLOS) consortium maintains an X-Windows software tools page (http://hpwww.ec-lyon.fr/colosHp/software/all_program). The page contains links to many useful X11 development tools including:

Software Tools Page

The Software Tools Page (http://www-cmpo.mit.edu/~djboccip/Links_soft.html) provides links to software packages and Internet resources that deal with a variety of software tools. This list goes beyond software tools for C programming to includes links to areas of software tools for mathematics, visualization, and HTML/WWW development. In this case, software tools has been extended to mean more than the earlier definition.

Victor R. Volkman received a BS in Computer Science from Michigan Technological University. He has been a frequent contributor to the C/C++ Users Journal since 1987. He is the author of the book Windows Programming with Shareware Tools. He can be reached at the HAL 9000 BBS (313)663-4173, URL http://www.HAL9K.com/, or email to sysop@hal9k.com.