A lightweight, GUI toolkit built on top of Allegro 4 for C applications. Designed for building desktop-like interfaces with windows, menus, toolbars, and common widgets — all rendered in software with a classic Win9x-inspired theme.
gui.mp4
- Draggable, resizable windows with titlebars
- Window z-ordering (click to bring to front)
- Maximize / minimize support
- Active window tracking
- Modal window support
- Hierarchical widget tree with parent-child relationships
- Automatic layout engines:
LAYOUT_VERTICAL,LAYOUT_HORIZONTAL,LAYOUT_GRID,LAYOUT_NONE - Padding and spacing support
- Clipping for child widgets
- Focus management with tab traversal
- Dirty flag system for efficient redraws
| Widget | Description |
|---|---|
WIDGET_BUTTON |
Standard push button with label |
WIDGET_IMAGE_BUTTON |
Button with icon (BMP image) |
WIDGET_TOGGLE_BUTTON |
Toggle (on/off) button |
WIDGET_LABEL |
Static text label |
WIDGET_TEXTBOX |
Single-line text input with cursor, selection, clipboard |
WIDGET_CHECKBOX |
Checkbox with label |
WIDGET_RADIO |
Radio button with group support |
WIDGET_SLIDER |
Horizontal slider with min/max/value |
WIDGET_PROGRESSBAR |
Progress bar with percentage display |
WIDGET_COMBOBOX |
Dropdown combobox with item list |
WIDGET_LISTBOX |
Scrollable list box |
WIDGET_GROUPBOX |
Labeled group container |
WIDGET_PANEL |
Generic container panel |
WIDGET_STATUSBAR |
Window status bar |
WIDGET_TOOLBAR |
Toolbar container for buttons |
WIDGET_CANVAS |
Custom drawing surface |
WIDGET_TABS |
Tabbed container with multiple pages |
WIDGET_MENUBAR |
Menu bar attached to windows |
WIDGET_MENU |
Dropdown/popup menus with items |
WIDGET_TREEVIEW |
Hierarchical tree view |
WIDGET_SPLITPANE |
Resizable split pane (horizontal/vertical) |
WIDGET_SCROLLPANE |
Scrollable content area |
- Full menubar with dropdown menus
- Nested submenus
- Menu item separators
- Keyboard shortcut labels
- Hover tracking across menu hierarchy
- Click-to-open, click-to-close behavior
- Menu items with enable/disable state
- Centralized theme structure with colors for all widget states
- Classic 3D beveled appearance (Win9x style)
- Customizable colors for:
- Window chrome (titlebar, borders, buttons)
- Widget states (normal, hovered, pressed, focused, disabled)
- Desktop background
- Menu and menubar colors
- Scrollbar and slider colors
- Event-driven architecture with callback support
- Supported events:
EVENT_CLICK,EVENT_DOUBLE_CLICKEVENT_MOUSE_DOWN,EVENT_MOUSE_UP,EVENT_MOUSE_MOVEEVENT_MOUSE_ENTER,EVENT_MOUSE_LEAVEEVENT_KEY_DOWN,EVENT_KEY_UPEVENT_FOCUS,EVENT_BLUREVENT_CHANGE,EVENT_SCROLLEVENT_RESIZE,EVENT_CLOSEEVENT_PAINT,EVENT_TIMER
- Multiple listeners per widget per event type
- Automatic tooltip display on hover
- Configurable delay
- Follows mouse position
- Double-buffered rendering (flicker-free)
- Combobox dropdown overlay rendering
- Menu popup overlay rendering
- Widget capture (mouse grab) for drag operations
- Scroll wheel support
- BMP image loading for icons and image buttons