Woopsi 0.36 Released

Woopsi 0.36 is now out. Available from the SourceForge page, as per usual. Summarised changes are as follows:

  • WoopsiUI namespace for all classes
  • MultiLineTextBox improvements and fixes, including the majority of cursor support
  • New date handling class and calendar gadget
  • Bitmap class with a variety of drawing routines separated out from the SuperBitmap
  • More examples
  • Bugfixes and optimisations

The big change in this release is the move from the standard namespace to a dedicated “WoopsiUI” namespace. This change will almost certainly mean you need to invest some time refactoring any code you’ve written that uses Woopsi. However, it should keep things tidier.



Woopsi now has a new namespace: “WoopsiUI”. All of the classes are now part of this namespace. This will impact user code in a number of ways. Firstly, you might be doing this in your .h files:

#ifndef _MYCLASS_H_
#define _MYCLASS_H_

#include "woopsi.h"

class Button;

class MyClass {


Declaring the Button class won’t work any more. as it is now in a different namespace. You have two options. You can do this instead:

namespace WoopsiUI {
    class Button;

This seems like a nasty workaround to me, as you shouldn’t really be changing the WoopsiUI namespace, even if all you’re doing is declaring something that’s already in there. Alternatively, you can just #include the “button.h” file.

Trying to do this doesn’t work, despite how logical it looks:

class WoopsiUI::Button;

I imagine the reason for this is that prefixing a class name with the namespace means you’re trying to access something that already exists, not define something new.

You’ll probably find that you need to add this near the top of your .h files:

using namespace WoopsiUI;

Purists will tell you that what you should really do is prefix any calls to the Woopsi gadgets with “WoopsiUI::” instead, or just include the bits of the namespace you want with “using WoopsiUI::SomeClass”, but if you’re just trying to get your application to compile again then using the entire namespace is a quick way to get things working.

I did this mainly so I could rename “WoopsiString” to “String”. Once I’d renamed the class everything broke, so I switched it back to “WoopsiString” again. Curses.