Ray Kelm

  • About
    • Home
    • News

User Login

  • Create account
  • Reset password

Projects

  • SDL_gui
  • Cyclone
  • roaddemo
  • rtChess
  • exemel
  • gp2x
  • robot

Options

Recent News

  • leJOS NXJ for Mindstorms NXT
  • Chumby at work
  • Chumby!
  • And...
  • Busy busy busy...

News Tags

  • news (46)
  • cyclone (15)
  • SDL_gui (14)
  • robot (7)
  • chumby (3)
  • lego (3)
  • exemel (2)
  • nms (1)
  • work (1)
  • dev (1)
  • robofest (1)
  • rtChess (1)
  • roaddemo (1)
  • osgi (1)

Links

  • DataSlab Hosting
  • SellMySoftwareOnline!
  • SDL
  • YAAARC
  • FIRST
  • Arduino

Introduction

SDL_gui is a library written in C++ for displaying and controlling user interface elements in an SDL application. It has the following set of widgets: Screen, Button, ToggleButton, Label, Picture, Panel, CardStack, TextEntry and ProgressBar.

Older versions of SDL_gui were written in C, and the C api has been preserved in version 0.10.0. Versions beyond 0.11.0 may not include the older API in its current form. For details, read the SDL_gui conversion guide .

It also provides wrapper objects for SDL_Surface, TTF_Font, and a callback mechanism. The wrapper objects allow reference counting, so that the widgets can share these resources easily.

One interesting note - this library does no drawing of its own. It expects you to provide all the graphics. It provides a hierarchy of objects which you can feed surfaces into for drawing, and the event handling and behavior.

The primary focus is the behavior. I don't want to tie it to a specific look and feel, since that would make it useless for games. For example, you give it images of what you want the buttons to look like when pressed, highlighted, normal, and disabled, and it manages the events and displays the appropriate image. It is intended to be a mid-level interface to SDL.

SDL_gui is released under LGPL, and requires the following libraries (and versions):

  • SDL >= 1.1.4
  • SDL_image >= 1.0.9
  • SDL_ttf >= 1.2.1

SDL_gui downloads

Documentation

I'm working on it. :) Really! :) Here is a brief (and incomplete) SDL_gui function reference to the C API. *NOTE* This is out of date, since the library is now C++. I plan to use something like doxygen to generate a class hierarchy document.

There are some SDL_gui screenshots , and you can see the SDL_gui changelog .

Development

The files for SDL_gui are tracked using subversion.

You can browse the SVN tree directly, or use that same link to check out the project.

Future Development

  • Documentation!
  • Add more widgets! including: Slider, ListBox, TextArea
  • ESC causes GUI to exit. This needs to be configurable.
  • A better demo (breakout clone?)
  • Seperate RPM package of the demo apps
  • editting keys in TextEntry: home/end/arrows
  • TextEntry needs a cursor (caret? whatever)
  • Integration with pysdl for the python bindings

Links

  • SDL an awesome library for high performance graphics.

Copyright © Ray Kelm. All rights reserved.

Valid XHTML 1.0 Strict Valid CSS!