DEPUI 2.0: A portable graphical user interface 
Contact     Download     Features     Future work     Resources     Licence     Screenshots     Platforms     Widgets     Links

What's new
- Small tutorial
- Editable textbox
- Editor widget with menu
- Textbox now more efficient
- File selector
- C++ wrapper classes
- Justification for text and buttons
- Example for drag and drop
- Reduced memory usage
- Better keyboard handling
- Of course, some bug fixes
- Complete list:changelog.txt
 
 

What is DEPUI
DEPUI is a very portable graphic user interface library written in the C language. There are some very minimal docs, but it is completely open source and should work and compile for a wide variety of platforms. DEPUI was written with a strong emphasis on keeping executable sizes as small as possible while maintaing reasonable performance. Features and objects that aren't used don't get included into your executable.

Screenshots
Screenshot1 - Some widgets with bitmapped 8x8 font (Allegro/DJGPP)
Screenshot2 - Some widgets with antialiased font (Generic driver)
In both the above screenshots, the total memory allocated is about 3 kilobytes in 50 allocations.
Screenshot3 - Editable textbox with antialiased font (Generic driver)
Screenshot4 - Editor widget and File selector (Generic driver)

Platforms
It will compile for 32 or 16 bit targets. I am releasing this code in order to get feedback as to how everything works on different platforms and to encourage discussions on how to do things the best way and to encourage code contributions. Of course I will give full credit in the changelog for contributed changes/improvements. Right now it has drivers and I have tested it for the following platforms:
- DOS with DJGPP using Allegro - Default Platform
- DOS with DJGPP using GRX 2.3
- DOS with Borland 3.11 using BGI
- DOS with DJGPP using simple VESA 2.0
- DOS with DJGPP using simple VESA 1.0
- Linux using Allegro
- Linux using GRX 2.3 (on top of Svgalib)
- Linux using Svgalib directly
- Linux using Nano-X - Contributed by Nick Papadonis
- Linux using X-Windows
- OpenGUI drivers (mouse/keyboard only work under DOS/DJGPP)
- DOS with TinyPTC (still rather slow, but functional)

On each platform the font, bitmap and mouse support is either the generic built-in support, or specific to the platform. For example for a generic driver the MxFont struct is defined within the library. Under Allegro it is a typedef for a BITMAP. And there are standard interface functions for both types of underlying structures.

Widgets
Right now it has the following widgets:
- NEW - Editable textbox with (or without) scrollbars
- NEW - Editor object
- NEW - File selector
- Static text
- Push button
- Toggle button
- Radio button and radio button group
- Horizontal and vertical scrollbars
- Menu bars and popdown menus
- List with limited multi-coloum support
- Scrollable areas (with scrollbars as needed) that can scroll any object
- Multi line text
- Simple movable/resizeable/closeable windows (normal and modal)
- Panels (Raised, sunken, ridge, groove)
- Direct screen access (ensures no gui objects will overlap)
- Simple alert
- Vertical and horizontal bar

Features
A driver for DEPUI can be easily written for any platform provided there are the following functions:
- Graphic mode set
- Putpixel
- Getpixel
- Keyboard pressed and which key it was
- Reading mouse movement

Some graphics functions can easily be accelerated if the platform allows:
- Putpixel
- Getpixel
- Horizontal line
- Vertical line
- Rectfill
- Font drawing
- Bitmap drawing

Please note that this means that the following things are NOT required in the platform, and can be completely handled within the library:
- Mouse display
- Font handling
- Bitmap handling

Almost all clipping is done inside the library so the driver functions do not need to clip and can run at maximum speed.

The desktop has a message queue that can accept messages to be dispatched when the gui would otherwise be idle. The redraw messages in the queue are optimized to that parts of the screen don't get updated twice. This makes for efficient use of the screen drawing.

Objects can be non-rectangular and/or transparent.

Base object class (MxObject) is just 28 - 36 bytes! Almost every visible object is 'derived' from a base struct MxObject. This means that most things are easily interchangeable.

The generic font code supports antialiasing, provided the platform has a reasonably fast getpixel and color blending functions.

The library compiles *without warnings* with gcc with -O2 -W -Wall -pedantic, except for files that include the platform's headers, which may or may not be warning free. The library also compiles *without warnings* as C++ program!

The entire library is in object oriented C. No bloat from C++ standard libraries or templates. Object and functions are written in a way that if they are not used, the code does not go into your executable. DEPUI executables are small and have low memory requirements.

Future work
- Driver for DOS with DJGPP using standard VGA (640x480x4)
- Driver for DOS with DJGPP using simple Mode 13H
- Driver for DOS with Borland 3.11 using standard VGA (640x480x4)
- Driver for DOS with Borland 3.11 using simple Mode 13H
- Driver for Linux with GCC using Framebuffer
- Driver for Windows with MinGW or Visual C++
- Driver for OpenGL
- Driver for Free Borland C++ compiler
- Driver for CDX
- Driver for g2 graphical library
- Driver for Windows w
- Driver for SparkGL
- Driver for SDL Simple DirectMedia Layer
- Driver for OpenPTC
- Driver for Microwindows
- Driver for Open Watcom compiler (when it comes out)
- Driver for Beos
- Driver for QNX
- Driver for whatever people contribute...
- Network compatible output driver that can display DEPUI programs over a network connection
- More complete multi-coloum list handling
- More complete documentation

License
It has a license similar to Freetype project. Basically the license says that you can do whatever you want with the source code, even sell it commercially as closed source, but you may not pretend that you wrote it. If you use it you must give credit to the DEPUI project in your documentation. Of course, people who contribute to DEPUI will have their contribution recognized in the DEPUI docs (contrib.txt).

Resources
- A project page at Sourceforge.
- A Forum at Sourceforge, which should be a great place to ask/answer questions.
- I think the mailing-list is working, but I'm not really sure since it doesn't get used much (yet).
- A nice page a Freshmeat.
- You can also look at the changelog.txt.
- A small tutorial.

Download DEPUI (version 2.0)
ZIP file for DOS or Windows platforms or TGZ (tar and gzipped) file for Linux platforms

Contact
If you have any questions, comments or contributions you can email me deleveld@dds.nl. If that doesn't work you can try deleveld@mailandnews.com or possibly deleveld@my-deja.com or at my work d.j.eleveld@anest.azg.nl.

Links
Lots of other gui's at The GUI Toolkit, Framework Page
Excellent portable windowing gui at Microwindows
Other guis for DJGPP: OPENGUI, Sword, AWL
Allegro's WebRing  Previous Site Ring's Home Next Site
Random Site Skip Next Site List Next 5

My Homepage