gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS homebrew announcements > Woopsi - DS GUI Framework v1.3

#142975 - ant512 - Mon Oct 15, 2007 7:48 pm

I've been working on a GUI library for the Nintendo DS (called "Woopsi" - spot the pun), with the hope that other homebrew authors will use it and focus on more interesting development, instead of having to waste their time writing GUIs of their own.

Current features include multiple screen support, screen dragging, windows, gadgets, a text viewer, screen backgrounds, an event system, and more.

If you want to have a look at the latest demo, you can download it from the SourceForge project page here (download the demo package; the other package is the sourcecode):

http://sourceforge.net/projects/woopsi/

The zip file has the usual ROMs for the SuperCard, Slot-1 carts and the nds.gba file. If necessary, patch the .nds file for your card.

If you're interested in learning more about the system, there's loads of info on my blog:

http://ant.simianzombie.com/blog

The library is written in C++ and uses the PALib, both of which may prove to be barriers to wider adoption. The PALib stuff can be stripped out and replaced with libnds calls, but C++ isn't negotiable in this project.

Anyhoo, any feedback is appreciated.


Last edited by ant512 on Thu Jul 21, 2011 12:30 pm; edited 17 times in total

#142986 - kusma - Mon Oct 15, 2007 9:35 pm

ant512 wrote:

http://sourceforge.net/project/showf...roup_id=207650

The link doesn't work. Try reposting it without the dots...

#142992 - ant512 - Mon Oct 15, 2007 10:40 pm

Heh, that's what you get for copying-and-pasting, I suppose. Link fixed!

#143093 - lyptt - Tue Oct 16, 2007 8:05 pm

This is a really cool project and very useful, I hope you keep this up!

#143105 - sniper - Tue Oct 16, 2007 10:38 pm

looks great.
I like the amiga os3 style ;)

#143186 - ant512 - Wed Oct 17, 2007 9:52 pm

I've written a large chunk of documentation for Woopsi, including part of the developer guide and a short tutorial, which can be accessed here:

http://woopsi.sourceforge.net

#143234 - OOPMan - Thu Oct 18, 2007 4:03 pm

Wow, just checked this out.

Very very nice work!

The GUI is simple yet effective and the focusing seems to work perfectly.

The example mini-apps are also very cool :-)
_________________
"My boot, your face..." - Attributed to OOPMan, Emperor of Eroticon VI

You can find my NDS homebrew projects here...

#144605 - theli - Sun Nov 04, 2007 5:16 pm

looks very nice ... i just have one question .. does font rendering support some other then english characters?

#144606 - Mighty Max - Sun Nov 04, 2007 5:30 pm

theli wrote:
looks very nice ... i just have one question .. does font rendering support some other then english characters?


I'd guess it does latin characters just great. *angel*
_________________
GBAMP Multiboot

#144608 - theli - Sun Nov 04, 2007 6:01 pm

i meant something like cyrillic .. etc ...
unicode support would be great :(

#144609 - Lick - Sun Nov 04, 2007 6:05 pm

Unicode fonts are BIG. I mean MEGAbytes.
_________________
http://licklick.wordpress.com

#144610 - theli - Sun Nov 04, 2007 6:07 pm

i KNOW

#144611 - tepples - Sun Nov 04, 2007 6:23 pm

A Unicode font limited to European scripts (Latin, Greek, Cyrillic) shouldn't be that big, especially if the rendering system implements proper composite character decomposition and accent stacking rather than requiring precomposed glyphs for everything. As far as I know, the multimegabyte fonts contain Brahmic (South Asian) scripts and/or Chinese ideograms.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#144614 - ant512 - Sun Nov 04, 2007 7:15 pm

It only supports the 256 character extended ASCII set. I don't currently have any plans to support other character sets - my plan is to get the basic UI stuff done before any extra craziness.

#144632 - SteveH - Mon Nov 05, 2007 2:21 am

Well I'm currently lookin at your code to try and see if I can get it to work without C++ / PALib.

I think I might be possible to do, but I've only looked at a couple of the files so far.

The reason I want it without C++ / PALib is to do something like the Win32 stuff, and IIRC Amiga did not have the STL stuff in it - so it should not be too hard to do.

It will be a while before I start this as a project tho, got another one in the works that is taking up a lot of my time at the moment.

#144670 - ant512 - Mon Nov 05, 2007 4:46 pm

You're a brave, brave man. Removing PALib wouldn't be too hard - I only really use it in a few places. Switching to C would be a real pain, though. Possible, definitely. Something I'd want to attempt, no. C++ is the perfect fit for something like this. Rewriting it in C would change it from consisting of tidy, self-contained data structures and member functions to being an unmanageable explosion of structs, linked lists, and horribly complicated function calls.

I'd love to see it if you manage it, though!

There's a new version available (source and demo build) from the SourceForge site:

http://www.sourceforge.net/projects/woopsi

Lots of new stuff, including radio buttons, checkboxes, and dual screen support (the top screen now functions as a "swap space" - click the flip-to-top gadget and the bottom workspace will switch places with the top workspace).

#144672 - SteveH - Mon Nov 05, 2007 5:07 pm

Converting to C does not mean complicated function calls - you just need to plan it out more. After a little more looking today and I'm not even sure you can strip out the PS Lib stuff as your entire touch pad code works off of the PA Libs stylus code - I also spotted some optimisations that could be done on the line drawing code.

One problem I'm getting at the moment is that PA Lib does not want to compile on my PC (Vista Home Premium and DevKitPro r21) so I'm unable to see exactly how everything works, but I'll let you know what I come up with...

One thing that gets me is when people say C is structs and linked lists - What's a vector? An overly complext link list. So all I will do is move the vectors to linked lists, and I prefer linked lists as I have full control over how they are accessed, unlike a vector (in my limited experience at least). But it's still early stages, and I'm still working on another project that's getting removed from me soon - it's a third party app for a game I pla.y, and it's nearly ready to be released to the public. So while I code that I can be thinking about how Woopsi can be changed to a C / C++ and libNDS code base.

I've just had a quick play around with 0.25 - very nice, I like the swap screen button on the virtual screens.

One question - when I press the A key the SuperBitmap window increases in size, until it overlapps the screen and then your unable to do anything (move, close or change screen), not sure if that's a bug or not.

#144676 - ant512 - Mon Nov 05, 2007 5:48 pm

The great thing about the vector class is that it's a ready-made linked list that can become a linked list of *anything*. I tend to keep away from the STL because, as you say, writing your own constructs gives you more control, but the vector's so handy I use it all the time. Once you decide to use your own linked lists, you then have to write all of the usual linked list functions, and before you know it you've spent days coding and got nowhere.

The touch pad code is solely limited to one function in the woopsi.cpp file. You'd just need to strip the PALib calls out of there and replace them with libNDS calls. The Woopsi class sends clicks through the rest of the hierarchy, so it's the only class that has any knowledge of the user's interaction with the DS. Same with the d-pad stuff, the lid opened/closed stuff, etc. Other things the code uses PALib for are screen setup (all handled in the main.cpp file), DMA hardware (spread all over the place, particularly the gadget.cpp, screen.cpp and textviewer.cpp files), pointers to the framebuffer (all over the place), and RGB->DS 16-bit colour conversion (mainly gadget.cpp and font.cpp).

PALib doesn't work with devKitPro r21, so you're a bit stuck there until that gets sorted. It doesn't work with Vista either, so you're stuck there too.

Any optimisations you can share would be great!

I think I've stripped out the superbitmap increase thing in the latest demo. That was just for me to test the window resize code as I was writing it (the window borders needed to match the dimensions of the enclosing window, so I had to ensure that everything resized at the same time).

#144677 - ThomasS - Mon Nov 05, 2007 6:06 pm

Side note:
Quote:
PALib doesn't work with devKitPro r21

It does work with r21, but you have to make sure that you use the latest libnds and not the one which comes with PALib.
_________________
<dsFont> <Game Collection>

#144679 - SteveH - Mon Nov 05, 2007 6:15 pm

Yet another reason to remove the PALib stuff then :D

As for coding link lists, they are very easy to do and I've coded that many of them now that the functions to add and remove items have become second nature.

One thing I was going to add to my implementation was font support using the fonts based on BMF - Byte Mapped Fonts. There's a load of fonts on the site for free use, also some of the fonts are small enough to use on the DS - I've got some code on one of my HDD's that reads and stores the data that's in the files if you want it I'll hunt it out - it uses pure C / C++ so should work fine on the DS.

#144681 - ant512 - Mon Nov 05, 2007 6:33 pm

Support for Amiga bitmap fonts is on the list for version 2 - there's 20 years' worth of fonts available for that platform. Support for more fonts would be great, though - please send me the code if you can find it.

#144695 - SteveH - Mon Nov 05, 2007 9:26 pm

Well what do you know, first harddrive I look at has the code, and it's from an old NDS file I wrote ages ago - can not even remember writing the code on for the DS...

But anyway I've uploaded the code here - mind you the code is very badly done, mainly on the memory usage side, god only knows what I was thinking when I originally wrote that, but hey it's a start for adding some basic fonts.

#144711 - ant512 - Mon Nov 05, 2007 11:38 pm

Brilliant, thanks. I'll have a look at that later!

#144804 - theli - Wed Nov 07, 2007 2:06 pm

just reied latest demo from sf ....
it works for me in desmume ...
but is not working in no$gba or real hardware (dsl)

#144805 - ant512 - Wed Nov 07, 2007 2:15 pm

Are you using the correct ROM build for No$GBA/your flash cart? Have you patched the ROM for your cart (if your cart needs it)? Works fine here in No$GBA and on real hardware (Lite and Fat) using a slot-1 CycloDS.

#144808 - theli - Wed Nov 07, 2007 2:35 pm

ant512 wrote:
Are you using the correct ROM build for No$GBA/your flash cart? Have you patched the ROM for your cart (if your cart needs it)? Works fine here in No$GBA and on real hardware (Lite and Fat) using a slot-1 CycloDS.

hm... woopsi.nds is not working in no$gba but .ds.gba works ...
i thought i should use .nds for no$gba

on hardware i have initiall screen .. frozen
without any pictures or animations in windows

#146812 - ant512 - Sun Dec 09, 2007 4:57 pm

Another update posted to SourceForge:

http://www.sourceforge.net/projects/woopsi

New stuff is mainly aimed at improving the API and adding features for developers. Some of the changes include a new Gradient background gadget that creates a gradient between two supplied colours, improved drawing speed, and a GraphicsPort class that enables developers to draw depth-sorted data and blit bitmap regions directly into a screen/window/gadget.

[Images not permitted - Click here to view it]


Last edited by ant512 on Sun Dec 09, 2007 11:09 pm; edited 1 time in total

#146833 - tondopie - Sun Dec 09, 2007 10:15 pm

this is starting to look pretty good! I'm considering using it in my new project.
_________________
Development Blog: http://teendev.org
Homebrew Podcast: http://homebrewcast.net
Web Design: http://xtendesign.net

#146838 - ant512 - Sun Dec 09, 2007 11:07 pm

Thanks! Another update on SourceForge, taking it to version 0.27. Lots of bugfixes and more API improvements. The most obvious change in the demo is the ability to drag windows beyond the confines of the screen (OSX/Windows style).

At the moment, my advice is still to wait until the API settles down before jumping in and trying to use Woopsi. I consider it to be in the "pre-alpha" stage of development - each new release is liable to break code written with the last release. However, there's at least one developer actively using Woopsi to create a program and test the system at the same time, which has proven to be a great help in creating an API that's easy to use yet powerful at the same time. If you're willing to be a guinea pig, and don't mind downloading the latest update to find that nothing works any more (for entirely inexplicable reasons), it'd be good to get more people using it.

#147142 - ant512 - Sat Dec 15, 2007 12:29 am

Yet another update on the SourceForge page:

http://www.sourceforge.net/projects/woopsi

A few more changes, the most interesting being:

- No need for PALib. SteveH kindly wrote a patch to remove it. Woopsi now ships with two makefiles - one lets you use it with libnds (no PALib required), and one lets you use it with PALib.
- Skinnable screens and windows.
- Animation class and animated buttons.
- Support for 1bpp font bitmaps.

#147155 - Mrshlee - Sat Dec 15, 2007 3:45 pm

I'm glad PA_lib has finally been purged :)

There seems to be alot of buzz around this release - Hopefully we'll see some interesting results..
_________________
MrShlee.com
Projects
Dev-Scene
MyTechpedia

#148976 - ant512 - Sat Jan 12, 2008 11:44 pm

Version 0.29 now out:

http://www.sourceforge.net/projects/woopsi

Changes mostly limited to API improvements and a few new gadgets. There's a new Pac Man demo, though, ported from a JavaScript version I wrote for the canvas tag a while ago, and a debug console that will pop up when you press any of the d-pad keys whilst the Pac Man window is active (just flip it to the top screen or move it out the way).

I've also added an optional SDL layer that simulates the features of libnds that Woopsi uses. This means that you can create, build and debug Woopsi applications for your native development platform, then build exactly the same code for the DS. Writing apps is much easier when you can take advantage of VC++'s step-through or Xcode's memory leak visualiser. You just need to replace a couple of files in the "woopsi" folder with the files in the "sdl" folder to enable it.

Note that the SDL layer does not simulate anything other than the features Woopsi needs; if your app uses anything other than the Woopsi API (ie. it hits the hardware) you have to develop the hard way again.

There's an Xcode SDL version of the demo (source and pre-built binaries) available from the SourceForge page.

#153236 - ant512 - Wed Mar 26, 2008 8:54 pm

Version 0.30 now out:

http://www.sourceforge.net/projects/woopsi

Changes this time are a lot of bugfixes and some new gadgets, including scrolling panels, scrollbars, etc. I've completely removed the STL from the solution, which has reduced the size of a basic "hello world" ROM down to less than 250K.

There's also a new makefile that will produce a Woopsi library, giving a total of 4 different ways that the system can be built (with PALib, without PALib, library and SDL).

#154147 - ant512 - Fri Apr 11, 2008 11:02 pm

Version 0.31 out, at the same address as the last release. New stuff, in summary:

- Methods inlined
- Destructors made private
- Numerous bugfixes
- Refactored active/focused system
- Refactored visible/invisible system
- Context menu
- Provision for proportional fonts
- Bonus folder containing various extra classes
- A considerable amount of doxygen-generated documentation (absolutely everything but the skinned classes)
- ScrollingTextbox class
- Various other changes

#155250 - ant512 - Sun Apr 27, 2008 12:23 pm

Version 0.32 now out:

http://www.sourceforge.net/projects/woopsi

Summarised changes:

- General bugfixes and API improvements
- New proportional fonts classes, and a Python script to create them
- New show/hide system that does not interfere with gadget z-ordering (the old system is still in there under the names shelve/unshelve)
- Double-click support
- All gadgets have modal support
- Buttons change colour when clicked
- ProgressBar gadget
- CycleButton gadget
- ListBox gadget (still a work-in-progress)
- Formalised the structure of a Woopsi application (with two ?Hello World? examples that illustrate the two suggested structures)
- Merged SDL code into main DS codebase for greatly simplified maintenance
- Updated doxygen documents

There's also a (currently very small, but growing) community of users on a dedicated Woopsi forum here:

http://ant.simianzombie.com/forum

#157373 - ant512 - Thu May 22, 2008 11:23 pm

Version 0.33b now out. Full changelog:

- Fixes:
- Gadget::click() checks correct class variable for double click timer.
- Deleted ListBoxItem class.
- Removed "closable" from gadget flags.
- SkinnedWindow resizes titlebar correctly.
- Wired up SkinnedWindow depth button visibility to skin data.
- More consistent names for SkinnedScreen button pointers.
- Added missing GraphicsPort::drawPixel() functions.
- Made char pointers const-correct for devkitPro r23 compatibility.
- System makes copies of string data where appropriate.
- Removed duplicate title string pointer from window classes.
- SkinnedWindow only drags when titlebar clicked, not any border gadget.
- Fixed crash when gadget closed but parent subsequently points one of its pointers back at it.
- Fixed checkbox incorrectly setting font pointer instead of leaving it to
the base class.
- Fixed overflow in slider grip position calculations.
- Slider grip moves one page width/height when the gutter is clicked.
- Scrollbar buttons default to adjusting grip value by 1.
- Gadget::addGadget() checks to see if new children want to steal the focus and will grant it if necessary.
- Focus and blur propagate throughout the gadget ancestor list even if a gadget along the way already has focus (or not).
- Moved _clickedGadget pointer into Woopsi class and deleted all other
occurences.
- Changed _clickedGadget handling so that release works with the single pointer in Woopsi.
- Windows drag correctly if only one co-ordinate has changed.
- Screen title bar no longer steals focus when clicked.
- Text::wrap() recognises the end of a single-line string correctly.
- BitmapButton inherits from Gadget instead of Textbox.
- AnimButton inherits from Gadget instead of Textbox.
- Textbox no longer redraws when clicked; functionality moved into Button and ContextMenuItem classes.
- Removed redundant DecorationGlyphButton::release().
- Fixed tense in DS lid close/open events, so the events are now called
"EVENT_LID_CLOSE" and "EVENT_LID_OPEN", and the methods to work with them are called "raiseLidCloseEvent()", "raiseLidOpenEvent()", "lidClose()" and "lidOpen()".

- New Features:
- ListBox rewritten to be a single gadget instead of a compound gadget.
- ListBox allows multiple selection.
- Added extra flags to AmigaWindow and SkinnedWindow classes allowing close and depth gadgets to be hidden when gadgets are constructed.
- AmigaWindow allows depth and close buttons to be shown/hidden at will.
- SkinnedWindow allows depth and close buttons to be shown/hidden at will.
- Screen constructor accepts flags parameter.
- AmigaScreen constructor accepts flags parameter.
- SkinnedScreen constructor accepts flags parameter.
- AmigaScreen allows depth and flip buttons to be shown/hidden at will.
- SkinnedScreen allows depth and flip buttons to be shown/hidden at will.
- Added ScrollingListBox class.
- Added DefaultStyle class for control over gadget default colours.
- Added DimmedScreen class to the bonus folder.
- Added Requester class.
- Added FileRequester class to the bonus folder.
- Added Window and Screen setTitle() methods.
- Added drawEllipse() to the SuperBitmap class.
- Added drawFilledEllipse() to the SuperBitmap class.
- Added ListData class.
- Added FilePath class to bonus folder
- Added gadget test screen to demo.
- Added release-outside event that fires if the stylus is released outside the boundaries of the gadget.
- Added eventVX and eventVY to EventArgs struct.
- Drag and move events populate eventVX and eventVY EventArgs properties.
- Added EVENT_ACTION event.
- Button, AnimButton and BitmapButton all raise EVENT_ACTION events.
- CycleGadget raises EVENT_VALUE_CHANGE events when released if the value has changed.
- ScrollbarVertical up/down buttons repeat when held.
- ScrollbarHorizontal left/right buttons repeat when held.

#163181 - hacker013 - Wed Sep 24, 2008 7:44 pm

is this project dead?
_________________
Website / Blog

Let the nds be with you.

#163206 - elwing - Thu Sep 25, 2008 8:35 am

hacker013 wrote:
is this project dead?


from either the sourceforge or the developper blog it don't seems to, there is a version 0.34 listed that hasn't be anounced there by the way... it seems that the author is quite occupied these time and do not work as much as before, but he's still working on it...

#163303 - ant512 - Mon Sep 29, 2008 9:17 am

Nope, neither the project nor the developer is dead. Just been a bit preoccupied lately. Hopefully I'll get back into it soon.

#163801 - ant512 - Sun Oct 12, 2008 1:57 pm

Version 0.35 is now out!

- Fixes:
- Renamed "Textbox" to "TextBox".
- Corrected case of "PackedFontBase.h" include in "packedfontbase.cpp"
(thanks Gattman, bug 2101099).
- Removed offcolour pixels from around @ symbol in sysfont bitmap.
- Moved @ symbol in tinyfont.bmp to correct ASCII location.
- SkinnedWindows move to front when clicked.
- Renamed TextBox::TextPositionXXX to TextAlignmentXXX, along with all
related functions and similar in MultiLineTextBox and ScrollingTextBox.
- TextBox::addText() was allocating one byte too many when concatenating
strings.
- Renamed addText() to appendText() in TextBox, MultiLineTextBox and
ScrollingTextBox classes.
- Text::wrap() correctly wraps text rows with no break points.
- Fixed const-correctness of some Font (and subclass) methods.

- New Features:
- Button has different appearance when disabled.
- CheckBox has different appearance when disabled.
- ContextMenuItem has different appearance when disabled.
- CycleButton has different appearance when disabled.
- RadioButton has different appearance when disabled.
- Added WoopsiKeyboard gadget.
- Added all missing 7-bit ASCII glyphs to sysfont.
- Added keyboard example.
- Added TextBox::appendText(char).
- Added TextBox::setText(char).
- Added MultiLineTextBox::appendText(char).
- Added MultiLineTextBox::setText(char).
- Added ScrollingTextBox::addText(char).
- Added ScrollingTextBox::setText(char).
- Added WoopsiTimer gadget.
- Woopsi::registerForVBL() and Woopsi::unregisterFromVBL() now only work
with timers; all VBL code now is handled with timer gadgets.
- Removed EVENT_VBL event.
- Removed Gadget::vbl().
- AnimButton automatically animates as it has as built-in timer gadget.
- Added missing glyphs to tinyfont.bmp.
- Added timer example.
- Added cursor functionality to TextBox.
- Added GraphicsPort::drawFilledXORRect().
- Added GraphicsPort::drawLine() and associated clipping functions.
- Added WoopsiString class and replaced string handling code in TextBox.
- Added Label gadget as a base class for TextBox and Button; can be used as
a read-only, borderless text display gadget.
- Text inherits from WoopsiString class.
- Added MultiLineTextBox::removeText() methods.
- TextBox border bevelled both out and in.

#164518 - ant512 - Wed Nov 05, 2008 12:43 am

Version 0.36 is now out. Source and demo available from http://www.sourceforge.net/projects/woopsi as always. Check the blog at http://ant.simianzombie.com/blog for more info.

Full changelog:

- Fixes:
- s32 used as iterator when working with visible rect cache to prevent permanent loops when large numbers of rects were visible.
- s32 used as child gadget iterator.
- MultiLineTextBox::resize() correctly recalculates the number of visible rows.
- Tidied up MultiLineTextBox::getRowX() and getRowY().
- MultiLineTextBox::getCurrentPage() no longer divides by 0 if there are no visible rows.
- MultiLineTextBox::draw() tidied up; correctly draws when partial line of text is visible.
- MultiLineTextBox vertical alignment options all work correctly.
- MultiLineTextBox scrolls correctly when text is added.
- MultiLineTextBox has cursor support.
- Text::stripTopLines() was not removing all characters.
- Deleted empty fontbase.cpp file.
- Removed unused "bitmap.h" include from "skin.h".

- New Features:
- Moved all classes into WoopsiUI namespace.
- Added Date class.
- Added Calendar gadget.
- Added Calendar example.
- Added Date example.
- Added ProgressBar example.
- Text::wrap() only wraps lines impacted by insert/delete/append operations.
- Replaced unused Bitmap struct with a Bitmap class with drawing routines.
- Replaced SuperBitmap drawing operations with a Bitmap object.

#164582 - azaydius - Sat Nov 08, 2008 4:30 am

This looks to be exactly what I was needing for a school project we are working on. Very well done!!

#164648 - hacker013 - Tue Nov 11, 2008 7:31 pm

Does it have changed functions names like from 0.34 -> 0.35?
_________________
Website / Blog

Let the nds be with you.

#164656 - ant512 - Wed Nov 12, 2008 2:05 pm

Not this time around, but it *does* have a new namespace which will probably mean you need to prefix things, so you can't really do this any more:

TextBox* text = new TextBox("text", 10, 20, 30, 40);

You'd do this:

WoopsiUI::TextBox* text = new WoopsiUI::TextBox("text", 10, 20, 30, 40);

Or this:

using namespace WoopsiUI;
TextBox* text = new TextBox("text", 10, 20, 30, 40);

Including the namespace, like in the above example, is probably the easiest way to handle this.


Last edited by ant512 on Wed Nov 12, 2008 11:47 pm; edited 1 time in total

#164669 - hacker013 - Wed Nov 12, 2008 8:55 pm

oke, thank you.
_________________
Website / Blog

Let the nds be with you.

#164831 - azaydius - Mon Nov 24, 2008 7:41 am

Got a question for anyone who might be using Woopsi or has developed with it in the past.

We are running in to an issue with using wireless functionality and the touch screen. Basically, we have a woopsi application running with various screens and gadgets, all working fine. We have a connection setup that associates with an access point, connects to a remote system and then logs in successfully.

The problem is that after wireless is initiated, the touch screen no longer functions. Any ideas?

Thanks!

#164835 - ant512 - Mon Nov 24, 2008 5:07 pm

azaydius wrote:
The problem is that after wireless is initiated, the touch screen no longer functions. Any ideas?


Hmm, interesting one. I haven't used Woopsi with wireless yet. I wonder if initialising the wireless lib does something strange to the interrupts? I'd suggest looking in the woopsifuncs.c and .h files to see if there's anything obvious in there. If you're using the libnds version, that is. The code in there that deals with hardware setup and the touch screen was essentially ripped out of PALib by SteveH into a separate file, so the chances are it's inherited some of PALib's crazy coding.

On the other hand, I know that the (presumably now aborted, as it was a final year university project last year) DSTalk application used Woopsi and the wireless hardware with no problems.

#164840 - azaydius - Mon Nov 24, 2008 11:18 pm

Your suspicions were correct, it turns out we were calling irqinit in our wireless functionality and this essentially disabled what woopsi had already done. Fixed now! Thanks for the rapid response!

#165750 - hacker013 - Mon Jan 05, 2009 7:50 pm

is there already a version released for devkitARM 24 ?
_________________
Website / Blog

Let the nds be with you.

#165817 - ant512 - Wed Jan 07, 2009 5:58 pm

hacker013 wrote:
is there already a version released for devkitARM 24 ?


There will be. As soon as I'm back from Italy, that is...

#165885 - ant512 - Sun Jan 11, 2009 3:36 pm

OK, if you're impatient you can now grab the latest version of Woopsi from SVN with the following changes:

- ListBox::setAllowMultipleSelections() works correctly.
- Replaced byte and short iterator variables with ints.
- Compatible with devKitPro v24 and libnds 1.3.1.
- Renamed "DynamicArray" to "WoopsiArray" for compatibility with dkp24.
- Made libnds makefile the default instead of PALib.

Yep, Woopsi is now compatible with the latest version of devKitPro.

If you're not feeling impatient, I hope to get a proper release out in the next few days.

#165903 - ant512 - Mon Jan 12, 2009 3:40 pm

A full release of Woopsi 0.37 is now available with devKitPro r24 compatibility:

http://www.sourceforge.net/projects/woopsi

#166013 - hacker013 - Fri Jan 16, 2009 8:22 pm

maybe is it an idea to rewrite woopsi from c++ to c?
_________________
Website / Blog

Let the nds be with you.

#166014 - azaydius - Fri Jan 16, 2009 8:46 pm

That would be quite a bit of work considering Woopsi uses deep inheritance and abstraction. What would be the motivation behind rewriting with C? I can't see how the object oriented structures used in Woopsi would translate nicely into structs... of course I may just be biased because I find it very easy to use as is. Just curious on your reasoning?
_________________
fileNinja - https://sourceforge.net/projects/fileninja/

#166016 - ant512 - Sat Jan 17, 2009 1:52 am

SteveH had the same idea but didn't get very far. These days, C++ compilers are so good that there's no virtually no difference between C++ code and the same algorithms expressed in C. The only reasons anyone can have for wanting to re-write in C are a) masochistic tendencies, or b) superstition based on the performance of C++ 20 years ago.

If anyone wants to try and rewrite in C, I'd love to see the results. However, it's really not something I have any desire to do. Personally, I think it's a bit of a waste of time.

#166017 - azaydius - Sat Jan 17, 2009 2:38 am

I think a lot of people think that C++ is slow and bloated because of the heavy usage of the STL. From the Woopsi code I have worked with I don't recall seeing much, if any, of the STL in use.

The project we did used Woopsi in tandem with some C functionality on the backend. The two play nicely together, so if you wanted the 'meat' of your project to be in C, there is nothing stopping you from implementing it that way.

ant512 wrote:
a) masochistic tendencies.


This made me a chuckle.
_________________
fileNinja - https://sourceforge.net/projects/fileninja/

#166019 - wintermute - Sat Jan 17, 2009 4:06 am

ant512 wrote:
A full release of Woopsi 0.37 is now available with devKitPro r24 compatibility:

http://www.sourceforge.net/projects/woopsi


devkitARM r24.

devkitPro is a vendor.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#166030 - hacker013 - Sat Jan 17, 2009 3:31 pm

azaydius wrote:
That would be quite a bit of work considering Woopsi uses deep inheritance and abstraction. What would be the motivation behind rewriting with C? I can't see how the object oriented structures used in Woopsi would translate nicely into structs... of course I may just be biased because I find it very easy to use as is. Just curious on your reasoning?


I love to have it in c because my program is in c and i wanna use woopsi.
_________________
Website / Blog

Let the nds be with you.

#166031 - ant512 - Sat Jan 17, 2009 4:00 pm

azaydius wrote:
I think a lot of people think that C++ is slow and bloated because of the heavy usage of the STL. From the Woopsi code I have worked with I don't recall seeing much, if any, of the STL in use.


There's no use of the STL at all in Woopsi. Jeff, one of the contributors to my blog, did some investigative work and together we figured out just how much bloat the STL adds to a DS ROM. I estimated that just including the vector class added 0.5MB to the Woopsi ROM, which is 1/8th of the total available RAM in the DS.

If you treat the DS like an embedded system and completely avoid the STL, RTTI, exceptions, etc, and just use C++ as "C-with-classes", you shouldn't encounter any problems with performance or ROM size.

There's a good article here by a chap called "cearn" in which he actually tests C vs C++ compilation. He finds that there's virtually no difference (of the two, C++ actually comes out on top):

http://www.coranac.com/2008/09/03/to-c-or-not-to-c/

wintermute wrote:

devkitARM r24.

devkitPro is a vendor.


Ooops!

hacker013 wrote:
I love to have it in c because my program is in c and i wanna use woopsi


You can mix C++ and C in the same binary. If you structure your project well, you'll have an API into your C program that a C++ Woopsi application can work with, keeping the two things separate (MVC pattern).

#166032 - azaydius - Sat Jan 17, 2009 5:08 pm

ant512 wrote:

hacker013 wrote:
I love to have it in c because my program is in c and i wanna use woopsi


You can mix C++ and C in the same binary. If you structure your project well, you'll have an API into your C program that a C++ Woopsi application can work with, keeping the two things separate (MVC pattern).


An example of how to do so:

Code:
extern "C"
{
        #include "some_c.h"
        #include "a_little_more_C.h"
        #include "c_functions.h"
}


etc...
_________________
fileNinja - https://sourceforge.net/projects/fileninja/

#168412 - ant512 - Tue Apr 28, 2009 1:17 pm

Version 0.38 is now available!

http://www.sourceforge.net/projects/woopsi

There are quite a few under-the-hood changes this time around. First of all, Quirky (of Bunjalloo fame) supplied patches for half a dozen crashes, which are all now fixed. There are a number of other miscellanous bugfixes in there too. The only fix likely to have an impact on user code is the renaming of "Gadget::draw()" to "Gadget::redraw()", which is a workaround for a problem with GCC.

In terms of new features, it is possible to get at each gadget's child gadgets, and get a count of those children. The event system has had a major overhaul and is a lot easier to work with now. I've also done a lot of optimisation to try and speed things up, and added some new features to the GraphicsPort. It is now possible to copy rectangular areas of the framebuffer around, scroll rectangular areas, and dim rectangular areas (DimmedScreen style).

- Fixes:
- Removed PALib dependency from filerequester example.
- FileRequester gadget fixed for devKitARM r24 (Quirky).
- ListBox redraws correctly when an option is selected in single selection mode.
- Fixed crash in SliderVertical when trying to set value if max and min values are the same (Quirky).
- Fixed crash in SliderHorizontal when trying to set value if max and min values are the same.
- Fixed FileRequester crash when path has trailing slash (Quirky).
- Fixed double-click in SDL (Quirky).
- FileRequester fixed for SDL (Quirky).
- SDL path fixes (Quirky).
- Escape key to quit in SDL mode (Quirky).
- WindowBorderTop and SkinnedWindowBorderTop no longer have pointers to freed memory if window title changes (Quirky).
- ScreenTitle and SkinnedScreenTitle no longer have pointers to freed memory if screen title changes (Quirky).
- Flipping window depth with depth gadget no longer results in corrupted window contents.
- Fixed const-correctness of various Text class methods.
- SDL framebuffers initialised to black.
- More doxygen fixes.
- Removed WoopsiArray::begin().
- Removed LinkedList::begin().
- Renamed Gadget::draw() to Gadget::redraw() and removed unnecessary overloads from all classes.
- Const correctness fixes in Gadget class.
- ScrollingTextbox adjusts scrollbar grip position correctly when first initialised.
- Alert box draws XOR rect correctly when released.
- Requester draws XOR rect correctly when released.
- WoopsiKeyboard no longer adds itself as the decoration event handler twice; fixes XOR rect drawing when clicked/released.

- New Features:
- Added Gadget::getChild() and Gadget::getChildCount() (for leonelhs).
- Added context menu example (for leonelhs).
- ListData class raises events to ListDataEventHandler objects.
- ListBox listens for ListData events.
- Added base template class for event args passing.
- Refactored gadget event system:
- Replaced EventArgs struct with GadgetEventArgs class.
- Renamed EventHandler to GadgetEventHandler.
- Gadgets can now have multiple event handlers.
- Replaced handleEvent() method with multiple methods.
- Removed EventType enum from GadgetEventHandler.
- ListData events passed by references instead of pointers.
- WoopsiKeyboard includes a set of new events:
- Press
- Release
- Repeat
- WoopsiKeyboard no longer stores the last key clicked.
- WoopsiKeyboard has set of event-related classes:
- KeyboardEventHandler
- KeyboardEventArgs
- Refactored context menu event system:
- Added ContextMenuEventArgs class;
- Removed "_value" from ContextMenu;
- Removed "getContextMenuValue()" from Woopsi;
- Selected context menu item now accessible via ContextMenuEventArgs::getItem().
- Slider grip automatically resizes; no need to call resizeGrip().
- End point rects now cached (sans child rects) for extra speed.
- Gadget rect caching moved into separate RectCache class.
- RectCache::removeOverlappedRects made non-recursive.
- Gadget::clipRectToHierarchy made non-recursive.
- Added GraphicsPort::copy() to copy regions of the framebuffer around.
- Screen dragging code improved; uses new GraphicsPort::copy() method.
- Added GraphicsPort::scroll() to scroll regions of gadgets.
- Removed scrolling code from ScrollingPanel and rely on new scroll() method instead.
- Added GraphicsPort::dim() function to add DimmedScreen functionality to all gadgets.

#168531 - azaydius - Sat May 02, 2009 7:40 pm

Awesome, looks like I have some work ahead of me now! :)
_________________
fileNinja - https://sourceforge.net/projects/fileninja/

#170872 - ant512 - Sat Oct 24, 2009 3:28 pm

Version 0.39 is now available!

This release includes the usual set of bugfixes. New features are mainly centred around testing the library - there's a new "tests" folder which will grow into a comprehensive set of test harnesses for every UI gadget. The two existing tests have already highlighted a number of bugs in the tested gadgets, all of which have been fixed in this release.

Additionally, this release adds the ability for Woopsi applications to load and save 24-bit BMP files.

Download it at the usual place:

http://www.sourceforge.net/projects/woopsi

- Fixes:
- Removed framebuffer-hitting code from DimmedScreen gadget and replaced with call to GraphicsPort::dim().
- ListBox removes itself from its ListData object when deleted.
- Keyboard example shows cursor.
- Moved DimmedScreen into woopsi folder as an official gadget.
- CycleButton::getPreferredDimensions() populates rect with correct values.
- Const fixed Gadget::getRefcon().
- Gadget::disable() and Gadget::enable() redraw the gadget by default.
- Fixed clipRectToHierarchy() bug introduced in switch to non-recursive function in last release.
- RadioButtonGroup redraws when resized.
- RadioButtonGroup returns correct dimensions from getPreferredDimensions().
- Updated copyright notice in defines.h.
- Bitmap::getPixel() works correctly for large bitmaps.
- Bitmap::drawBitmap() flushes mem correctly for DMA copy.
- Gadget::show() clears rect cache of sibling gadgets with a lower z-index to ensure that they do not draw over the top of the newly-shown gadget.
- A disabled gadget that overlaps another now intercepts clicks correctly, no longer allowing them to fall through to the gadget below.

- New Features:
- TextBox and MultiLineTextBox cursor moves when d-pad left/right are pressed and gadget has focus.
- Added tests folder:
- CycleButton test;
- RadioButtonGroup test.
- Added BinaryFile class to bonus folder.
- Added BitmapIO class to bonus folder - load/save BMP files using libfat.
- Added BitmapLoader example.
- Added SuperBitmap::drawBitmap() overload to handle Bitmap objects.

#170878 - tondopie - Sat Oct 24, 2009 11:01 pm

Is 0.39 compatible with the newest libnds?
_________________
Development Blog: http://teendev.org
Homebrew Podcast: http://homebrewcast.net
Web Design: http://xtendesign.net

#170880 - ant512 - Sun Oct 25, 2009 12:05 am

tondopie wrote:
Is 0.39 compatible with the newest libnds?


The binary included with the archive is built using libnds 1.3.7, which I think is the latest version.

#171348 - ant512 - Sun Nov 15, 2009 12:31 pm

Version 0.40 is now out.

This release is the first alpha version. At this point I'm mainly concerned with bugfixing and tidying up than adding significant new features.

Big changes this time around include the removal of PALib support and a directory restructure. This is the first release of Woopsi that ships as a proper library. Installation instructions are included in the zip file, but it's essentially a matter of just copying the libwoopsi folder to the devkitpro folder.

Additionally, there are a lot of improvements to the graphics API, are a few new example and test projects, and a sizeable number of bugfixes.

Download from SourceForge as usual:

http://www.sourceforge.net/projects/woopsi

- Fixes:
- PALib support removed.
- Pointer to selected day button in calendar resets to NULL when new month selected; prevents day button incorrectly popping up if same button is clicked in new month.
- Calendar::getPreferredSize() returns valid values.
- Label text is greyed out when disabled.
- Huge speed increase in Calendar::resize().
- Calendar's child controls correctly fill entire available space.
- Calendar correctly selects date if new day is the same as old day but in a different month.
- Gadget drag event only raised if stylus is actually moved whilst dragging mode active.
- ScrollingPanel drag and scroll events only raised if stylus is actually moved whilst dragging mode active.
- MultiLineTextBox greys out text when disabled.
- MultiLineTextBox::removeText() correctly repositions cursor.
- TextBox greys out text when disabled.
- Scrolltest compiles correctly.
- SimpleScreen and SimpleWindow helper gadgets removed.
- Renamed LinkedList to WoopsiLinkedList and LinkedListIterator to WoopsiLinkedListIterator to avoid type clashing with LinkedList in devkit.
- Tidied up woopsifuncs.h.
- SuperBitmap::getBitmap() returns a pointer to the Bitmap object instead of the Bitmap object's raw pixel data.
- Moved skinned gadgets out of main library and into bonus folder.
- Removed fatInitDefault() stub method for SDL out of individual .cpp files and into nds.h.
- dimmedscreen.h includes woopsi.h.
- Graphics::drawBitmap() clips correctly if bitmap destination co-ords are greater than the size of the destination bitmap.
- GraphicsPort::drawPixel() clips correctly.
- GraphicsPort::drawXORPixel() clips correctly.
- Replaced DMA_Force and DMA_Copy with woopsiDmaForce() and woopsiDmaCopy() to fix ancient problems with DMA not seeing latest RAM state.

- New Features:
- Calendar test added.
- MultiLineTextBox test added.
- TextBox test added.
- Added an overload to GraphicsPort to print a length of a string in a specific colour.
- Restructured directories into traditional library layout.
- Upgraded main project to VC++ 2008.
- Added libwoopsi.a to SVN.
- Added template example that uses libwoopsi.
- Reorganised demo code into new demo directory.
- BitmapIO class can load 16-bit BMP images with any pixel encoding.
- BitmapIO class can load V3, V4 and V5 DIB headers.
- BitmapLoader example illustrates loading of most supported BMP types.
- Added skinned gadget example.
- Added SkinIO class to bonus folder - loads skins from disk.
- Added BitmapBase class to define basic interface for a bitmap.
- Added BitmapWrapper to enable included (not loaded) bitmap data to be used as a read-only Bitmap object.
- Moved drawing code out of Bitmap class into new Graphics class.
- Added MutableBitmapBase class to define basic interface for an editable bitmap.
- Added FrameBuffer class to wrap framebuffer inside a bitmap class.
- All references to DrawBg array now work with frameBuffer array.
- Added GraphicsUnclipped to perform raw unclipped bitmap drawing.
- GraphicsPort inherits from GraphicsUnclipped in order to reduce code repetition.
- Font system uses new Bitmap object hierarchy.
- System fonts available as global objects.
- Rewritten clipping routine in Font and MonoFont.
- Reorganised VC++ project with more filters.
- Rect struct moved out of Gadget class and into separate header.
- SuperBitmap no longer includes drawing functions; instead it exposes a non-const pointer to its bitmap and a non-const pointer to a Graphics object that can draw to the bitmap.
- Added bitmapdrawing example.
- Added gadgetdrawing example.
- Added blit() and blitFill() methods to Bitmap and FrameBuffer, and signatures to MutableBitmapBase.
- Added getData(x, y) method to all bitmap classes.


Last edited by ant512 on Mon Nov 16, 2009 10:08 am; edited 1 time in total

#171364 - elwing - Mon Nov 16, 2009 8:20 am

ant512 wrote:

http://www.sourceforce.net/projects/woopsi


sourceforce?

#171365 - ant512 - Mon Nov 16, 2009 10:10 am

elwing wrote:
ant512 wrote:

http://www.sourceforce.net/projects/woopsi


sourceforce?


Thanks, didn't spot that. Never attempt to release software whilst tired.

SourceForce is a good name for a website, though...

#171515 - ant512 - Tue Nov 24, 2009 1:44 pm

Version 0.41 is now available.

This version contains the usual set of bugfixes, optimisations and new test projects. The SDL compatibility layer has been greatly improved in this release - I compiled a quick test for the GP2X F-200 and it now runs at the same speed as the DS version.

New features are limited to some more graphics functions. It is now possible to draw bitmaps in greyscale, and convert a region of a bitmap to greyscale.

Downloads available from SourceForge:

http://www.sourceforge.net/projects/woopsi

- Fixes:
- Removed Gadget::unregisterChildrenFromVBL() declaration from gadget.h as the function does not exist.
- Graphics::dim() draws to correct dimensions.
- GraphicsPort::dim() clips properly.
- BitmapButton::getPreferredDimensions() returns the correct size.
- AnimButton::getPreferredDimensions() returns the correct size.
- Anim button animation continues playing correctly when clicked if disabled.
- ListBox::getPreferredDimensions() returns the correct size.
- ListBox::draw() clips more effectively.
- Removed getEditableData() bodge from bitmap classes; all interaction with bitmap data happens through bitmap methods.
- Moved IK bitmaps out of demo folder/NDS into animbutton test.
- ScrollingListBox::getPreferredDimensions() returns the correct size.
- SliderHorizontal and SliderVertical produce correct values when they are showing a range of values large enough for the grip to be artificially enlarged.
- Scrollbar buttons scroll by amount based on max/min values and height of slider rather than arbitrary value.
- Removed ScrollbarVertical and ScrollbarHorizontal setButtonScrollAmount().
- AnimButton animations pause when the button is disabled.
- DMA copying function uses DMA for RAM->VRAM copies.

- New Features:
- SDL framebuffer code merged into FrameBuffer class.
- Added label test.
- Added button test.
- Added DOS batch files to build examples and tests.
- Added grayScale() function to GraphicsUnclipped, Graphics and GraphicsPort.
- BitmapButton greys out when disabled.
- Added bitmapbutton test.
- Added drawBitmapGreyScale() function to GraphicsUnclipped, Graphics and GraphicsPort.
- AnimButton greys out when disabled.
- Added animbutton test.
- Added listbox test.
- ListBox greys out when disabled.
- Added scrollinglistbox test.

#171528 - Wraggster - Tue Nov 24, 2009 3:43 pm

thanks for the news. are you releasing a binary for the GP2x ?
_________________
Webmaster of Nintendo DS Emulation News

http://nintendo-ds.dcemu.co.uk

#171531 - ant512 - Tue Nov 24, 2009 4:06 pm

The source and binary for the GP2X version are available from my blog:

http://ant.simianzombie.com/?p=1122

However, as I say in the blog post, the GP2X touch screen is awful. There's no point in me trying to maintain a GP2X port. I'll do a Wiz version as soon as a decent set of instructions for getting a toolchain set up appears, but I'm fairly certain that the Wiz screen is even worse.

I'm excited about the prospect of a Pandora port, but that'll have to wait until the hardware's available.

#171624 - ant512 - Sat Dec 05, 2009 12:32 pm

Version 0.42 is out now!

This release improves the functionality of the ListBox, ContextMenu and CycleButton gadgets. It separates management of data from the UI, allowing such things as adding/removing/sorting CycleButton options, custom sorting orders, etc. It improves the speed of the FileRequester and includes several bugfixes and optimisations.

Downloads available from SourceForge:

http://www.sourceforge.net/projects/woopsi

- Fixes:
- ListData::swapItems() no longer raises a data changed event.
- ListData::sort() raises a data changed event.
- Woopsi class does not attempt to retrieve system font before it is initialised.
- ListBox canvas height no longer includes extra pixel.
- ListBox raises an action event when double-clicked.
- ListBox ignores double-clicks that occur across multiple items.
- Removed unused Gadget::_doubleClickTime member.
- ListBox redraws every time data changes.
- Double-click only counted as such if the gadget already has focus (ie. must be the same gadget clicked twice).
- ListBox::draw() calculates top and bottom visible options correctly, and does not overwrite options at the top of the list with those from the
bottom.
- ListBox automatically scrolls when items are removed from the ListData object to ensure it does not display past the end of the canvas.

- New Features:
- Split ListData class into ListData and ListDataItem classes for greater flexibility.
- Minor improvements to the ListBox's use of the ListData class.
- Altered ListData::quickSort() and added compareTo() method to ListDataItem to allow custom ordering of ListDataItem subclasses.
- ScrollingBase adds support for specifying planes on which scrolling can occur.
- ScrollingPanel implements ScrollingBase's allow/disallow scroll plane features to prevent scrolling on certain planes.
- ListBox does not allow horizontal scrolling.
- Added windowless example project.
- Added Gadget::isDoubleClick() to check for double-clicks.
- Combined various colour members in Gadget class into GadgetColours struct.
- Merged TextWriter into GraphicsXXX classes and removed original class.
- Added FileListDataItem class to store data for file requester.
- FileRequester uses new compareTo() functionality for substantial speed increase and lower memory usage.
- FileRequester displays "Loading..." message whilst directories are enumerated.
- Split ListDataItem into ListDataItem and ListBoxDataItem classes for greater flexibility.
- Split FileRequester into FileListBox and FileRequester classes for greater flexibility.
- CycleButton uses the ListData class to store its data - options can now be selected, removed, sorted, etc.
- ListBox::getPreferredDimensions() bases width on size of text in options.
- ContextMenu used a ListBox to store/view its data.
- ContextMenu includes getPreferredDimensions() method.
- ContextMenu sends ListDataItem objects with event arguments instead of ContextMenuItem objects.
- Deleted ContextMenuItem class.
- Added WoopsiString::copyToCharArray().

#171785 - ant512 - Wed Dec 23, 2009 4:23 pm

Version 0.43 is now available.

This release mainly focuses on fonts. I've added dozens of new proportional fonts into Woopsi that can be used in place of the default. To aid in the creation of new font classes, Woopsi comes with three new .NET applications (sorry, non-Windows guys). One can create Woopsi fonts from BMP files, one can convert Windows fonts to BMP files, and one can perform the entire operation in one go and convert a Windows font directly to a Woopsi font.

I've replaced the old system font (Topaz, the default Amiga Workbench font) with a proportional font called NewTopaz, which greatly reduces the amount of space wasted when printing to the screen.

Other improvements include a redesigned "defaultStyle" system, a .NET utility to convert a BMP to a Woopsi bitmap class and a smattering of bugfixes.

Downloads available from SourceForge:

http://www.sourceforge.net/projects/woopsi

Additionally, here are some pre-built demos:




- Fixes:
- ListBox draws correctly when dragged (clipping problem from 0.41).
- Multiple fixes to the PackedFont set of classes.
- bmp2font checks the default Windows location for grit.
- bmp2font adds fonts to the WoopsiUI namespace.
- bmp2font follows #ifdef/#endif guard style.
- bmp2font uses more appropriate casing for filenames, etc.
- CycleButton redraws correctly when released if it contains no options.
- Label and subclasses recalculate their text position and redraw when their fonts are changed.
- TextBox does not attempt to move cursor when clicked if it contains no text.
- TextBox cursor moves correctly when clicked if a PackedFont font is used.
- Template project no longer references Gadget::Rect.
- MultiLineTextBox redraws and adjusts text position when font is changed.
- ListBox does not attempt to draw item -1 in list.
- PackedFontBase::isCharBlank() returns the correct value.
- Renamed DefaultStyle class to GadgetStyle.
- Instance of GadgetStyle created at Woopsi startup instead of using static properties of DefaultStyle class.
- Removed systemFont global; relying on defaultGadgetStyle instead.
- Removed tinyFont global; Debug class now creates its own instance.
- TinyFont follows class pattern used by Jeff's PackedFonts.
- Graphics::floodFill() no longer gets stuck in an infinite loop.
- Moved logos out of demo data folder and into new logos folder in bmp.
- Removed unused bitmaps from demo.
- Added missing FileListBox class.
- ScrollbarHorizontal passes font object (via style) to Gadget constructor correctly.
- BitmapWrapper::getData(x, y) no longer causes a compiler warning.
- Removed PAGfx binary from demo.
- Removed zombie.c file from demo and replaced with bmp2bitmap-generated class.
- Removed bittest files from demo and replaced with bmp2bitmap-generated classes.
- Removed all_gfx file from demo.
- Uses stack instead of heap for converting chars to strings.

- New Features:
- Added packedfonts example.
- Added dozens of packed fonts.
- Replaced font pointer in gadget constructors with a pointer to a GadgetStyle object.
- Changed default font to NewTopaz.
- Added old system font under the name Topaz using the same class pattern as the TinyFont.
- Added defaultstyle example.
- Built with devkitARM r27 and libnds 1.4.0.
- Replaced FontBitPacker with bmp2font, a .NET app that can convert a BMP to any of Woopsi's 4 font formats.
- Added bmp2bitmap, a .NET app that will convert a BMP to a Woopsi BitmapWrapper class.
- Added font2bmp, a .NET app that will produce a BMP from a Windows font.
- Added font2font, a .NET app that will convert a Windows font directly to a Woopsi font class.
- Added new GadgetEventHandlerList class and moved event raising code into it from the Gadget class.
- Duplicate gadget event handlers cannot be added to a gadget.
- Added build and deploy batch files for libwoopsi.
- Tests all build against libwoopsi instead of the raw Woopsi source.
- Most examples build against libwoopsi instead of the raw Woopsi source.[/list]

#172203 - ant512 - Sun Jan 24, 2010 5:44 pm

Version 0.44 is out now:

https://sourceforge.net/projects/woopsi/

This release adds system-wide support for unicode (UTF-8). Virtually all of the new features are related to text storage, manipulation or display.

In addition to that, the FileRequester is now an official part of libwoopsi and there are dozens of fixes and improvements.

It is worth noting that this release does *not* include any font classes that can render text beyond the standard ASCII set. This will come in a future release - TrueType support is in the works. Alternatively, you can roll your own font class.

Fixes:
- Moved fatInitDefault() SDL function into woopsifuncs.cpp (Quirky).
- ScrollingPanel::raiseScrollEvent() only fires if events are enabled.
- Gadget::raisesEvents() retrieves its value from the GadgetEventHandlerList object.
- Gadget::setRaisesEvents() alters the GadgetEventHandlerList object.
- Removed the raisesEvents flag from the Gadget class.
- Bmp2Font produces working Font classes.
- Deleted badly-converted fonts:
- Latha;
- Lucida10;
- Roman 10;
- Trebuchet8.
- FileRequester no longer has transparent regions.
- FileRequester sorts correctly.
- FileRequester does not attempt to draw when drawing is disabled.
- FilePath uses WoopsiString::lastIndexOf() to change to parse path string.
- Dragging a screen that isn't the top screen so that it is not visible no longer causes a crash.
- Removed glyphs from NewTopaz and Topaz fonts.
- Changed NewTopaz font to PackedFont1 from PackedFont16.
- Changed Topaz font to MonoFont from Font.
- Fixed memory leak when enumerating directories in FileListBox.
- FileListBox shows dummy file list when in SDL mode.
- Graphical corruption in GraphicsPort::clipScroll() fixed.
- Fixed FileRequester layout.
- Replaced magic number double click time with define in woopsifuncs.cpp.
- TestPanel class in scrolltest example draws its border correctly.
- Fixed a crash in GraphicsPort::drawText() when trying to draw text outside the clipRect with a PackedFont1 font; should provide a minor speedup.
- ScrollingPanel draws its border correctly.
- Removed Text::getLinePointer().
- MultiLineTextBox::drawCursor() uses a StringIterator to locate the cursor position.
- MultiLineTextBox::drawCursor() does not read past the end of the string when the cursor is positioned beyond the string.
- Text::wrap() does not perform an invalid comparison between line index and char index when truncating the line positions array.
- Text::wrap() correctly appends the string end position in all scenarios.
- Text::wrap() always assumes text height is at least one row.
- Text::getLineContainingCharIndex() returns the correct value if the character is in the last row.
- WoopsiString::insert() explicitly calls its own setText() and append() methods to prevent the Text class from wrapping twice.
- Added WoopsiString::encodeCodePoint().
- PackedFontBase::isCharBlank() returns correct value if character not present in font (fixes horizontal alignment in MulitLineTextBox).
- Key repeat values stored in defines.h.
- FileListBox does not show "." directory.
- Minor optimisation when building the FileListBox contents.
- Split Label::calculateTextPosition() split into horizontal and vertical methods.
- TextBox switches to left-aligned automatically if contents exceeds size of box.
- Fixed memory leak and logic problems when deleting gadgets.

New Features:
- Added FontBase::getCharHeight().
- WoopsiString supports UTF-8 (Lakedaemon).
- Split glyphs into separate GlyphFont.
- GadgetStyle includes a glyph font.
- All gadgets converted to use WoopsiStrings instead of raw chars/char arrays, meaning they support UTF-8.
- Various changes in Text class to support UTF-8.
- Changed parameters to GraphicsUnclipped::drawText() (and subclasses).
- Added StringIterator class, for efficient iteration over a UTF-8 string.
- Removed dependence on WoopsiString::getCharArray().
- Promoted FileRequester gadget from bonus folder to main library.
- libfat enabled by default in test projects and template.
- Added WoopsiString::lastIndexOf().
- Added WoopsiString::subString().
- Added WoopsiString::indexOf().
- TextBox implements key repeats when left or right d-pad is held down; cursor moves repeatedly until end of string reached or d-pad released.
- MultiLineTextBox implements key repeats when left or right d-pad is held down; cursor moves repeatedly until end of string reached or d-pad released.
- Textbox contents scrolls horizontally as cursor is moved.
- Added key repeat event handling to the entire system.

#172613 - ant512 - Fri Feb 19, 2010 7:46 pm

Version 0.45 is now available:

http://www.sourceforge.net/projects/woopsi

This version includes TrueType font support via wrappers around the open-source FreeType library. Coupled with the unicode support added in the last release, this means that it is now possible to develop GUIs with characters outside of the standard ASCII set. Many thank to Lakedaemon for his work with both unicode and FreeType.

Instructions for installing the bundled FreeType library are included in the "Installation.txt" file in the source archive.

The release includes a number of API improvements. Wiring up the keyboard gadget to a textbox is now very simple. In fact, double-clicking a textbox now automatically shuffles the touchscreen display into the top display and opens a keyboard on the touchscreen. Closing it shuffles everything back to how it was.

The various click(), release(), etc, methods that needed to be overridden when creating new UI gadgets have been replaced with simpler alternatives, called onClick(), onRelease(), and so on. The shift-click system (in which the shoulder buttons work as modifier keys to enable right-click style functionality and a context-sensitive menu) has been greatly simplified.

The drawing API has similarly been simplified, and all drawing - whether done to a bitmap or a gadget - can now take advantage of the clipping system.

There are more improvements, bugfixes, tests and examples, which are detailed in the changelog below.

Fixes:
- Fixed error when subclassing MultiLineTextBox.
- Fixed keyboard secondary repeat timer - now uses correct time.
- Delete key deletes character in front of cursor in MultiLineTextBox, not character at end of text.
- Moved raiseScrollEvent() out of ScrollingPanel and into GadgetEventHandlerList.
- Removed parameters from GadgetEventHandlerList::raiseActionEvent().
- Renamed Gadget::setDragging() to Gadget::startDragging().
- Decorations cannot receive focus.
- Increased accuracy of slider calculations from 8-bit fractions to 16-bit fractions.
- Requester resize implemented.
- Alert resize implemented.
- FileRequester resize implemented.
- Made various Gadget method non-virtual to prevent overriding.
- Gadget::resize() limits to parent dimensions correctly.
- Window drags correctly if it belongs to a gadget other than the screen.
- MultiLineTextBox resizing works correctly.
- Moved skins and bitmaploader examples and the bonus folder to a new
"extras" top-level repository. They will no longer be included in the main distro.
- Moved documentation folder into new extras directory.
- Fixed FileListBox resizing and initial child gadget dimensions.
- Removed Gadget::clear().
- Removed Gadget::clear(clipRect).
- Removed Gadget::newInternalGraphicsPort(isForeground).
- GraphicsPort no longer tries to delete null pointer if clipRect is not initialised.
- Replaced Gadget::draw(rect) with Gadget::drawContents(port) and Gadget::drawBorder(port).
- Fixed WoopsiString::remove(start, length).
- Removed AmigaWindow::getBorderSize().
- Removed Screen::getBorderSize().
- Removed TextBox::getBorderSize().
- Made Gadget::getClientRect() non-virtual.
- Gadget::getClientRect() uses new GadgetBorderSize struct to calculate size of client rect.
- Removed Screen::getTitleHeight().
- Removed AmigaWindow::getTitleHeight().
- AnimButton, BitmapButton, CycleButton, ContextMenu, ListBox, RadioButtonGroup, Label and Calendar use new GadgetBorderSize struct to calculate preferred dimensions.
- Removed Gadget::getBackgroundRegions().
- Removed redundant style initialisation from Woopsi class.
- Swapped Gadget::_style from pointer instantiation to standard instantiation.
- Removed Woopsi::closeChild(), shelveChild(), release(), drag(), click(), shiftClick() and shelve().
- Made Gadget::closeChild(), shelveChild(), release(), drag(), click() and shiftClick() non-virtual.
- Renamed Woopsi::click() to handleClick().
- Renamed Woopsi::shiftClick() to handleShiftClick().
- Tidied up Gadget::shelve() and Gadget::shelveChild().
- Refactored various methods in Gadget class to use guards instead of nested if statements.
- Gadget::closeChild() and Gadget::shelveChild() no longer cause focus to jump around if the child does not have focus.
- Gadget::click(), Gadget::shiftClick() and Gadget::doubleClick() only respond to clicks that occur within portions of themselves that are not obscured by gadgets higher in the hierarchy than their children (prevents
context menus bleeding through from a lower screen/window to a higher screen/window).
- Refactored Woopsi::handleKeys() into handleKeys() and handleKey().
- Removed _padding variable from Label, Requester, FileRequester, Alert and MultiLineTextBox classes; switched to using border sizes instead.
- Tidied up CycleButton, BitmapButton, AnimButton, Button and TextBox drawing methods.
- WoopsiKeyboard no longer inherits from AmigaWindow for greater flexibility.
- Added two blank screens to Woopsi gadget to ensure that background always draws correctly.
- Increased scrollbar width in ScrollingTextBox and ScrollingListBox.
- Increased minimum size of slider grips.
- Removed GraphicsPort::clear().
- GraphicsPort does not query Gadget for its x/y co-ordinates.
- GraphicsPort does not query Gadget for its enabled/disabled state.
- Removed GraphicsPort::drawBevelledRect() method that relied on gadget state.
- Removed Gadget::OutlineType enum and related usage.
- Removed drawing from Woopsi::eraseRect() - new background screens make it unnecessary.
- Removed drawing from Woopsi entirely for same reason.
- Deleted GraphicsUnclipped class.
- GraphicsPort is a wrapper around a Graphics object instead of a subclass.
- GraphicsPort drawing commands all accept values which are relative to itself.
- GraphicsPort::getClipRect() returns a rect relative to the GraphicsPort.
- Screen::onDrag() uses woopsiApplication's GraphicsPort instead of its own.
- MultiLineTextBox rendering problems when padding (now bordersize) greater than 2 fixed.
- MultiLineTextBox top vertical alignment works correctly.

New Features:
- Added goToParent() and goToRoot() to FilePath class.
- Added FreeType support.
- Added FreeType to template makefile.
- Added keyboard_textbox example.
- TextBox inherits from KeyboardEventHandler, so it can be connected directly to a keyboard object without the need for an intermediary.
- Added fire example.
- MultiLineTextBox inherits from KeyboardEventHandler, so it can be connected directly to a keyboard object without the need for an intermediary.
- Added TextBox::removeText() methods.
- GadgetEventHandlerList::raiseScrollEvent() receives distance scrolled as parameters.
- Added stub methods to remove the need to override critical Woopsi methods:
- onClick()
- onRelease()
- onReleaseOutside()
- onDoubleClick()
- onShiftClick()
- onDrag()
- onDragStart()
- onDragStop()
- onKeyPress()
- onKeyRepeat()
- onKeyRelease()
- onFocus()
- onBlur()
- onLidOpen()
- onLidClose()
- onEnable()
- onDisable()
- onResize()
- Swapped to using stub overrides in all gadgets.
- Added ListBox::isDoubleClick().
- Removed setDragging() from Gadget::click(); should be called by onClick() in subclasses if required.
- Added canReceiveFocus flag to Gadget::Flags struct.
- Added canReceiveFocus() method to Gadget class.
- Split Gadget::release() into release() and stopDragging() methods.
- Added AmigaWindow::resizeTitleBarToFit().
- Added Gadget::getGlyphFont() and Gadget::setGlyphFont().
- Added AmigaWindow::redrawBorder().
- Expanded ScrollingTextBox functionality to match MultiLineTextBox.
- Removed shiftClickChildren concept from Gadget class; shift clicks are only captured by a gadget if it defines any context menu items, so clicks automatically get directed to the most relevant gadget.
- Added alert test.
- Added requester test.
- Added filerequester test.
- Added freetype example.
- Added GadgetBorderSize struct to contain sizes of the four borders around a gadget.
- Added Gadget::checkCollisionWithForegroundRects().
- Added XOR drawing routines that accept a colour to XOR against.
- Added WoopsiKeyboardScreen.
- Double-clicking a textbox gadget causes the WoopsiKeyboardScreen to pop into the bottom display.
- TextBox only draws cursor when it has focus.
- TextBox redraws when it loses focus.
- Added Gadget::setBorderSize().
- Added WoopsiKey::setStuckDown() to control border type.
- Added CalendarDayButton gadget.
- Graphics class implements clipping and no longer inherits from GraphicsUnclipped.
- Added cliprect to the bitmapdrawing demo.
- Graphics class includes scroll() and drawBevelledRect() methods.
- Graphics::floodFill() is clipped.

#172885 - ant512 - Tue Mar 09, 2010 5:51 pm

Woopsi version 0.46 is now out.

http://sourceforge.net/projects/woopsi

This is the first beta version. From this point forwards, future Woopsi development will centre around bug fixes and documentation. There are many features I could add to the library, but the feature set is complete for version 1.

At this point, what I really need is for people to try out Woopsi in some small projects and let me know what bugs they find and what apparently simply tasks they find difficult to accomplish with the library.

Any volunteers?

Changes in this release mainly involve the MultiLineTextBox. All alignment options now work, as does the cursor.

Fixes:
- MultiLineTextBox jumps to bottom of text correctly when required to do so.
- MultiLineTextBox extensively refactored.
- MultiLineTextBox top-aligns when text exceeds size of gadget.
- MultiLineTextBox alignment options all work.
- Removed ScrollingPanel::clipToClientRect().
- Made Woopsi::startup() pure virtual; no longer needs to be called as the first instruction in user override.
- Woopsi::startup() and Woopsi::shutdown() are protected, not public.
- Deleted helloworld_alternative example.
- Switched various string methods from using u32 to s32 types.

New Features:
- Cursor jumps to click point when MultiLineTextBox is clicked.
- D-pad up/down move cursor up/down in MultiLineTextBox.
- MultiLineTextBox shows keyboard when double-clicked.
- MultiLineTextBox scrolls to follow cursor when moved with the d-pad.
- TextBox and MultiLineTextBox keyboard popup can be enabled/disabled using enableKeyboardPopup() and disableKeyboardPopup().
- Built with devkitARM r28.
- Added TextBoxBase interface to ensure that all TextBox-style classes implement the same methods.
- Added SliderBase interface to ensure that all Slider-style classes implement the same methods.
- Added ListBoxBase interface to ensure that all ListBox-style classes implement the same methods.
- Progress bar optionally shows percentage completed.

#173185 - jclary - Thu Mar 25, 2010 4:41 pm

This looks great. I'm going to start doing some ds development for myself in about a week( when my hardware gets here ). It looks like you've put a lot of work into this project so I look forward to taking advantage of it. This will be one of the first systems I attempt to integrate, so I'll let you know how it goes.


-Jai

#173464 - DoZ - Thu Apr 08, 2010 12:30 am

I'm using Woopsi 0.46 in my project. I have an issue with the ScrollingListBox not raising ValueChangedEvents. If I take my same
source code and substitute a regular ListBox the code works as expected. I also checked the test projects included with the source and the test project also failed to raise the event.

#173467 - DoZ - Thu Apr 08, 2010 1:18 am

Also, I am adding 30+ lines of text to a ScrollingTextBox and the gadget always shows the end of the text but I want it to display the beginning. I tried moveCursorToPosition and gave it a value of zero, but that didn't do anything. Is there a way to accomplish this without manual scrolling to the beginning?

#173550 - ant512 - Wed Apr 14, 2010 8:46 am

Event raising is a bug, thanks for reporting it.

To get the text to display the start, call the gadget's jump() method after you've finished setting it up. For example:

ScrollingTextBox* textbox = new ScrollingTextBox(blah);
textbox->setText("blah");
textbox->jump(0,0);

#173553 - DoZ - Wed Apr 14, 2010 5:07 pm

Thank you for the response. However, I get an error if I try to use jump(). It appears that jump() is not a method of a ScrollingTextBox. Jump is a method of ScrollableBase and ScrollingPanel but ScrollingTextBox does not inherit from either of those classes.

#173562 - ant512 - Thu Apr 15, 2010 4:51 pm

Ahh, yes. I'm working that in for the next release.

#174005 - ant512 - Wed May 12, 2010 9:16 am

Woopsi version 0.47 is now available:

http://www.sourceforge.net/projects/woopsi

This version adds support for a "drop" event to enable drag-and-drop functionality. The ScrollingPanel has been refactored to fix the bugs spotted by DoZ. It includes a new ColourPicker gadget supplied by Mark Adamson that allows a colour to be chosen by manipulating RGB sliders. It is built with devKitARM r30 and includes the usual set of bugfixes.

Fixes:
- Removed Woopsi::startup() call from template.
- Fixed bug in Gadget::checkCollision(x,y,width,height).
- Renamed CalendarDayButton to StickyButton.
- WoopsiKey inherits from StickyButton instead of Button.
- ScrollableBase no longer contains implemented methods or data; all moved to ScrollingPanel.
- Child gadgets of ScrollingPanel no longer get drawn to wrong screen if scrolled out of top of panel; Gadget::getPhysicalScreenNumber() is more intelligent.
- Graphics::scroll() returns correctly-sized rects in revealed rects array.
- Replaced WindowBorderBottom, WindowBorderTop and WindowBorderSide classes with more elaborate drawing code in AmigaWindow class.
- Replaced ScreenTitle class with more elaborate drawing code in AmigaScreen class.
- Made ScrollableBase a base class of ScrollingTextBox; implemented all pure virtual functions.
- ScrollingListBox raises value changed, action, click, release, release outside and double-click events correctly.
- RadioButtonGroup raises value click, release, release outside and double-click events correctly.

New Features:
- Added x and y parameters to Gadget::stopDragging().
- Added drop event (drag-and-drop).
- Added Gadget::isBeingDragged().
- Added PipeDream demo.
- Built with devkitARM r30.
- Added ScrollbarPanel gadget.
- Added ColourPicker gadget (contributed by Mark Adamson).
- Added ColourPicker test.
- Added ScrollingPanel::isContentScrolled() and setContentScrolled() to allow DMA copying of panel contents to be disabled if not needed.

#174144 - ant512 - Thu May 20, 2010 9:38 am

Woopsi 0.99 is now available:

http://www.sourceforge.net/projects/woopsi

This version has had a significant version bump because it is considered complete. I'm holding off from releasing version 1.0 partly to ensure that the documentation is done and partly to allow time for any bug reports.

Changes in this version include some minor cosmetic improvements to the ProgressBar, bugfixes to the slider gadgets, and some more gadget test projects. Full changelog is below. Additionally, I'll be uploading some early documentation to my blog soon:

http://ant.simianzombie.com

Fixes:
- ProgressBar text greyed out when disabled.
- SliderVertical and SliderHorizontal ignore double clicks by default.
- SliderVertical and SliderHorizontal only fire value changed event if value has really changed.
- SliderVertical and SliderHorizontal getValue() methods are considerably more efficient.
- Added libfreetype.a file to libs/libfreetype/lib folder.

New features:
- Added progressbar test.
- Added slidervertical test.
- Added sliderhorizontal test.
- Added scrollbarvertical test.
- Added scrollbarhorizontal test.
- Added superbitmap test.
- Bumped version number to indicate feature completeness.

#174155 - DoZ - Thu May 20, 2010 11:06 pm

Thank you Ant. Your GUI library has certainly saved me from having to spend a lot of time coding up a user interface. Just to share, here is a link to what I have been working on

http://sourceforge.net/projects/knowledgesageds/

I just updated it to use Woopsi src 0.99.

#174159 - Dwedit - Fri May 21, 2010 1:21 am

Anyone ever thought of combining this with LUA and getting GUI programs written in LUA?
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#174168 - ant512 - Fri May 21, 2010 8:54 am

@DoZ: Like it! Added your link to my most recent Woopsi blog post.

#174221 - ant512 - Mon May 24, 2010 3:12 pm

Woopsi version 0.99.1 has been released:

http://www.sourceforge.net/projects/woopsi

This version fixes bugs in the slider and scrollbar gadgets.

Fixes:
- Rewrote SliderVertical and SliderHorizontal again to improve accuracy.
- Removed jumpGrip() from all slider gagdets.
- Added setValueWithBitshift() to all slider gadgets.
- Added getMinimumStep() to SliderVertical and SliderHorizontal.
- Removed getValuesPerPixel() from all slider gadgets.

#174802 - ant512 - Tue Jul 20, 2010 4:09 pm

Woopsi 0.99.2 is now out. Grab it from SourceForge, as usual:

http://www.sourceforge.com/projects/woopsi

The font system has had some minor changes made. I finally got around to ripping out the Font and MonoFont classes, as the PackedFont classes perform the same job with far more efficiency. They?ve been moved to the ?extras? directory in the SVN repository in case anyone should ever need a reference for creating new font classes.

All of the monochrome fonts that ship as part of the library are now PackedFont1 classes instead of PackedFont16. This highlighted a bug in the bmp2font .NET program that is included in Woopsi?s ?tools? directory - it was allocating relatively huge bitmaps for the font data instead of the tiny bitmaps that were really necessary. I?ve deleted the ?CourierMono? font as it was an exact duplicate of the ?Courier? font. The GlyphFont is a PackedFont16-based class instead of a Font-based class.

This changes have reduced Woopsi?s footprint quite significantly:

1.5MB from the size of the Woopsi library;
2MB from the sourcecode;
400K from the packedfont example ROM;
60K from the helloworld example ROM.
A big saving for very little work.

Other changes include replacing the x, y, width and height members of the Gadget class with an instance of the Rect class (itself converted from a struct). A lot of the clipping work can now done be within the rect instance rather than throughout the codebase.

The FileListBox and FileRequester classes include a getPath() method that allows a developer to determine which directory the file requester is pointing at.

Fixes:
- Replaced clipping code in Gadget::clipRectToHierarchy() with call to new
Rect functions.
- PackedFont16::renderChar() aborts correctly if there is nothing to render
(Lakedaemon).
- Bitmap::getData(x, y) no longer declared inline (Lakedaemon).
- Renamed gunsuh15.bmp and gunsuhche15.bmp to gungsuh15.bmp and
gungsuhche15.bmp respectively.
- Deleted CourierMono as it was an exact duplicate of Courier.
- Converted most fonts to PackedFont1.
- Converted GlyphFont to PackedFont16 (manually altered class to force
fixed-width).
- Removed Font and MonoFont classes (PackedFont classes are faster and more
efficient).
- bmp2font upgraded to latest version - no longer creates gigantic arrays in
PackedFont1 fonts; removed support for Font and MonoFont classes.

New Features:
- Added getPath() to FileRequester and FileListBox.
- Converted Rect struct to class.
- Added Gadget::getRelativeX() and getRelativeY().
- Replaced x, y, width and height members of Gadget class with a Rect.

#175031 - ant512 - Thu Aug 19, 2010 11:58 am

Woopsi 0.99.3 is now available:

http://www.sourceforge.net/projects/woopsi

This release fixes a number of bugs. Some of the code has been tidied up. The only change that could have an impact on user code is the removal of drawHorizLine(), drawVertLine(), drawCircle() and drawFilledCircle() from the GraphicsPort class. The drawLine(), drawEllipse() and drawFilledEllipse() methods will now automatically call the optimised form if it is available.

Fixes:
- WoopsiString::compareTo() no longer inlined (fixes SF bug 3017420).
- Moved unused FixedWidthFontBase class into extras directory.
- Moved putSDLPixel() and getSDLPixel() into FrameBuffer class from woopsifuncs files.
- Added copy() to all bitmap classes.
- Replaced call to woopsiDmaCopy() in Graphics::copy() with call to copy() method of bitmap class.
- Graphics::drawEllipse() automatically calls drawCircle() if both radii are equal.
- Graphics::drawFilledEllipse() automatically calls drawFilledCircle() if both radii are the same.
- Graphics::drawCircle() and drawFilledCircle() are protected.
- Graphics::drawLine() automatically calls drawVertLine() or drawHorizLine() if lines can be optimised.
- Graphics::drawVertLine() and drawHorizLine() are protected.
- Removed GraphicsPort::drawCircle(), drawFilledCircle(), drawHorizLine() and drawVertLine().
- Fixed TinyFont (broken in last release).
- Moved woopsiRGB() macro from woopsifuncs.h to graphics.h.
- Moved woopsiDmaFill() and woopsiDmaCopy() into new dmafuncs files.
- PackedFont1 clips correctly.
- Gadget collision detection uses routines in Rect class.
- All GraphicsPort routines use Rect class.
- Rect::hasDimensions() returns false for negative sizes.
- Rect::getIntersect() and getAddition() work correctly for negative sizes.
- Removed Rect::fromDimensions().
- Rect::fromCoordinates returns a rect rather than a pointer to a rect.
- Tidied up SDL pad updating in woopsifuncs.c.
- Removed woopsiLidClosed() from woopsifuncs.c.
- Added dmafuncs.h to woopsiheaders.h.

New Features:
- Added Rect::contains().
- Added Rect::copyTo().

#175078 - ant512 - Thu Sep 02, 2010 2:33 pm

Woopsi 0.99.4 is now available. It now has its own website, which contains the latest release:

http://woopsi.org

Woopsi development has moved from SourceForge/SVN to BitBucket/Mercurial, so the sourcecode repository can now be found here:

http://bitbucket.org/ant512/woopsi

This latest release mainly includes bugfixes.

Fixes:
- All makefiles no longer create .ds.gba and .sc.nds binaries.
- Fonts include doxygen comments.
- Amended return type of some font properties (Lakedaemon).
- Reorganised PSD and BMP files.
- Prevented demo build process from unnecessarily including BMP files.
- Fixed divide by 0 when content size is 0 in SliderVertical and SliderHorizontal::resizeGrip().
- SDL fixes.
- GraphicsPort maps between co-ordinate systems more accurately; fixes clipping problems.

New Features:
- Built with devKitARM r31/libnds 1.4.5/default ARM7 0.5.14.
- Setting MultiLineTextBox's max rows to -1 forces it to retain all text.
- Added getCharTop() to font classes.
- Various minor .NET tool improvements.
- Added Gadget::checkCollision(Rect&).
- Added drawBaselineText() to Graphics and GraphicsPort classes (Lakedaemon).
- Added freetype outline font class (Lakedaemon).
- Added Install.bat install script for Windows users.
- Python bmp2font script updated to match output of .NET tools.

#175154 - ant512 - Thu Sep 16, 2010 2:48 pm

Woopsi 0.99.5 is now out. It is available from the Woopsi website:

http://woopsi.org

The big change this time around is the rendering system. Instead of each gadget needing to redraw itself when its appearance changes, gadgets now push their damaged rectangles to a queue that is redrawn every VBL.

In short - redrawing the screen is faster and the code is simpler.

The FreeType library and associated classes are no longer being distributed as part of Woopsi. Instead, Lakedaemon has put together a distribution of Woopsi that includes ported libraries and extra classes. These provide Woopsi with a wealth of extra functionality. His distribution can be found here:

http://bitbucket.org/Lakedaemon/ndstoolkit/overview

On top of the FreeType library, Woopsi font classes and an "XmlBox" gadget, it includes DS ports of:

- libjpeg
- libmxml
- libpng
- libsqlite3
- libz

The full changelog is below.

Fixes:
- Removed freetype classes, library and example (Lakedaemon's distro will provide this functionality).
- Examples build script uses for loop instead of explicitly named folders.
- Gadget::checkCollision(Gadget) works correctly.
- Tests build script uses for loop instead of explicitly named folders.
- Fixed memory leaks in Text::getLineTrimmedLength().
- Rewrote RectCache::splitRectangles() for speed and clarity.
- Increased delays for SDL double click and key repeat times.
- Fixed memory leak in demo.
- Fixed memory leak in PackedFontBase::getStringWidth().
- Fixed memory leak in MultiLineTextBox::moveCursorToPosition().
- ScrollingPanel::scroll() redraws correctly on top screen.
- Renamed Text class to Document.
- Document class contains a WoopsiString instead of inheriting from it.
- Removed DimmedScreen class (not compatible with new rendering system).
- Removed erased flag from Gadget.
- Removed Gadget::erase().
- Removed Gadget::eraseGadget().
- Removed Gadget::redraw().
- Removed Gadget::redrawDirty().
- Removed Gadget::drawChildren().
- Removed Gadget::redrawDirtyChildren().
- ListData destructor does not fire list changed events.
- Removed AmigaWindow::redrawBorder().
- Removed Woopsi::eraseRect().
- Gadget::getChild() no longer returns a const gadget.
- Removed visibleRegionCacheInvalid flag from gadget.
- Removed Gadget::enableDrawing().
- Removed Gadget::disableDrawing().
- Removed drawingEnabled flag from Gadget.
- Gadget::remove() and removeChild() will trigger a redraw of the gadget's visible regions (ie. erase it) automatically.
- Pong uses a SuperBitmap as its display.
- WoopsiArray doubles in size each time it needs to grow instead of increasing by 100.
- ScrollingPanel::scroll() uses the new rendering system.
- Fixed FileRequester border.
- FileListBox re-raises ListBox value changed events.
- ListBox no longer raises events when deselecting options when double-clicked (correctly raised when selecting the correct option).
- Fixed horizontal position of text in left-aligned text box.
- ScrollingTextBox scrolls line-by-line when scrollbar is dragged instead of smooth-scrolling (easier to read).
- Added virtual destructor to ListBoxBase.
- Moved border size defines from window.h to amigawindow.h and made them consts.
- Changed DYNAMIC_ARRAY_SIZE define in woopsiarray.h to a const.
- Changed GLYPH_MAP_SIZE define in fontbase.h to a const.
- Changed defines in glyphs.h to consts.
- Moved SCREEN_WIDTH and SCREEN_HEIGHT defines into sdl/nds.h.
- Changed defines in defines.h to consts.
- Woopsi::handleKey() expects an s32 instead of a u32 as the heldTime argument.
- PadHeldTime struct stores values as s32 instead of u32.
- Gadget::getCloseType() is const.
- ScrollingTextBox and ScrollingListBox scrollbars move in steps instead of smoothly as their lists are scrolled.
- Rewritten slider logic again.
- ScrollingListBox scrollbar updates correctly as list changes or gadget is resized.
- ScrollingTextBox scrollbar updates correctly if gadget is resized.

New Features:
- Added makefile for demo - can now be built from command line.
- Added Rect::splitIntersection().
- Gadget rendering re-written to use damaged rects.
- Added equality and inequality operator overloads to Rect class.
- WoopsiArray accepts an initial reserved size parameter in its constructor.
- FileRequester includes filename textbox.
- Added FileRequester::getTextBoxFileName().
- Added Range class.

#175160 - wintermute - Sat Sep 18, 2010 2:50 pm

Quote:

On top of the FreeType library, Woopsi font classes and an "XmlBox" gadget, it includes DS ports of:

- libjpeg
- libmxml
- libpng
- libsqlite3
- libz


all of these except libsqlite are available with the devkitPro portlibs.

http://devkitpro.org/wiki/portlibs

If there's a difference between these and the ones you supply, let me know & I'll update as needed.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#175161 - ant512 - Sat Sep 18, 2010 2:57 pm

wintermute wrote:
If there's a difference between these and the ones you supply, let me know & I'll update as needed.


I don't know; Lakedaemon is distributing these, not me. I do know that he built them with the portlibs system, and that his "XmlBox" Woopsi gadget depends on them (hence him distributing them).

#175162 - wintermute - Sat Sep 18, 2010 5:17 pm

Hmm, those aren't all built properly and they're all installing in the wrong place. The Makefiles are also not up to date with latest devkitARM, that old bin2o macro is likely to cause issues.

I'd really prefer if we weren't working at cross purposes here. The devkitPro installer/updater will eventually install the portlibs as well. When that happens your distributions will conflict with mine and cause end users a lot of grief.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#175163 - ant512 - Sat Sep 18, 2010 6:27 pm

wintermute wrote:
Hmm, those aren't all built properly and they're all installing in the wrong place. The Makefiles are also not up to date with latest devkitARM, that old bin2o macro is likely to cause issues.

I'd really prefer if we weren't working at cross purposes here. The devkitPro installer/updater will eventually install the portlibs as well. When that happens your distributions will conflict with mine and cause end users a lot of grief.


I've sent Lakedaemon a link to this thread so that he can take a look. Like I said, it's not my distribution; Woopsi purposely doesn't include any external dependencies at all - barring libnds for the DS build, libfat for the file requester, and SDL for the Mac/Windows/Linux build - to make it as easy as possible to get it up and running. That's why libfreetype and the related Woopsi font classes are no longer part of Woopsi.

#175164 - Lakedaemon - Sun Sep 19, 2010 12:38 pm

Hullo.

Technically, I'm not installing the libraries.

As I need them to compile the classes that add some features to the woopsi library, I just put them in a directory, in a somewhat tidy way, to be able to use them in the makefile that build the classes and the 2 provided examples.

But I don't deploy them/ I don't try to add them to the devkitpro folder structures/path (but I'll make any change you ant me to, no worries)

Also, the ndsToolKit bitbucket repository is mainly a place where I put my source code. I made it public because I thought that there is some stuff there that could be usefull to other homebrewer (it definetely is usefull for me).

Yet, I would like the build process to be really easy for someone/a beginner who want to test that and as the "xmlbox" widget requires lots of libraries :
libz
libfreetype (for fonts)
libpng, libjpeg (for images)
libmxml (for xml)
to ship precompiled libraries with a makefile/a script that made use of them was the best that I came up to.

I am not sure that I have the dedication to provide as good a support for ndsToolKit that Ant is providing for woopsi (which is 3 years old) or Wintermute for devkitpro. I definetely don't want to make another Palib.

Just contributing a little bit to the homebrew community via ports and some classes would be just fine by me. ^^

So, I'll make the changes that winterMute will ask to get my contributiuon back in line.

Also, is there a way we could contribute ports to portlibs ?
For example, I read somewhere that pthread had been ported, etc.., is there a central place where we could see/download/know about the libraries that have been ported to the nds ?

Best regards

#175363 - ant512 - Mon Nov 01, 2010 11:43 am

Woopsi 0.99.6 is now available from the Woopsi website:

http://woopsi.org

Other than a few minor enhancements to the Debug class, this release just contains bug fixes.

There are a couple of points to note about this release. First of all, it is built with the latest versions of devKitARM and libnds (r32 and 1.4.8 respectively). Due to changes in the FIFO system, the current version of desmume is not compatible with this release. You'll either have to wait for the next version of desmume or compile it yourself from the SVN repository before you upgrade your release of devKitARM.

libnds 1.4.8 includes a bug in line 661 of nds/arm9/videoGL.h. See the following link for the fix:

http://devkitpro.org/viewtopic.php?f=13&t=2277

Note that you can still use Woopsi with older versions of devKitARM; you'll just need to compile the library yourself. This is very simple; just open a command line to the Woopsi/Woopsi/libwoopsi folder, type "make clean" and then type "make".

Secondly, one of the new features in the Debug class is a vsnprintf() method. This method triggers a GCC warning about va_list mangling changes in GCC 4.4. This is neither a problem in Woopsi or in devKitARM; it's actually the result of a bizarre decision by the GCC team to include news items as compiler warnings:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42748

Wintermute intended to fix this for devKitARM r27, but this obviously never happened:

http://devkitpro.org/viewtopic.php?f=2&t=1336

The full changelog is below.

Fixes:
- Fixed scrolling problem in top screen.
- Gadget::changeDimensions() no longer leaves gadgets accidentally hidden.
- Division by 0 fixed in Range class when max value == min value.
- Document::stripTopLines() no longer wraps text twice.
- WoopsiString::getCharAt() returns NULL if index is out of valid range.
- Removed "Loading" message from FileListBox.
- Fix to ScrollingListBox scrollbar grip size.
- Support for 1 or 2 of physical displays (helps with SDL ports to other platforms).
- Compiler warning fixes.
- MultiLineTextBox scrolls to follow cursor when text is inserted.
- WoopsiString::encodeCodePoint() numBytes parameter is optional.
- WoopsiString::getCodePoint() numChars parameter is optional.
- WoopsiString::getCodePoint() returns the correct number of chars if the codepoint is invalid.
- Fixed clipping bug in PackedFont1::renderChar() (Lakedaemon).
- Fixed clipping bug in PackedFont16::renderChar() (Lakedaemon).
- TextBox::getPreferredDimensions() allows space for the cursor if visible.
- Fixed null pointer dereference in WoopsiString::getCodePoint.

New Features:
- Added Debug::flipToTopScreen().
- Added Debug::flipToBottomScreen().
- Added Debug::flipScreens().
- Added Debug::raiseToTop().
- Added Debug::lowerToBottom().
- Added Debug::wvsnprintf().
- Built with devKitARM r32/libnds 1.4.8 (manually patched line 661 of nds/arm9/videoGL.h to fix warnings; see http://devkitpro.org/viewtopic.php?f=13&t=2277).

#175756 - ant512 - Mon Jan 31, 2011 7:18 pm

Woopsi 1.0 is now available from the Woopsi website:

http://woopsi.org

This release just contains a few minor bugfixes. The directory structure of the release has been reorganised a little.

#176050 - ant512 - Mon Mar 28, 2011 3:56 pm

Woopsi 1.1 is now available:

http://woopsi.org

The majority of fixes and enhancements this time around centre on the WoopsiString class. It now has a few more operator overloads and additional functions such as format(), split() and indexOf(). The full changelog is as follows:

Fixes:
- Slider arrow buttons work correctly.
- WoopsiString::compareTo() returns s8 instead of s32.
- WoopsiString::compareTo() sorts Chinese text correctly (carpfish).
- ProgressBar at 100% completion no longer overflows the printout char array (carpfish).
- FileListBox handles paths with unicode names correctly (carpfish).
- Removed Debug::wvsnprintf().
- Debug::output() receives a WoopsiString reference instead of a char pointer.
- Debug::printf() uses WoopsiString::format() instead of vsnprintf().
- WoopsiString::subString() returns a WoopsiString instead of a pointer to a WoopsiString.
- Install batch file works correctly with latest directory structure.

New Features:
- Added StringIterator::getInteger() (carpfish).
- WoopsiString::compareTo() implements a simplistic natural sort (carpfish).
- Added WoopsiString::indexOf(const char* text) (carpfish).
- Added WoopsiString::indexOf(const char* text, s32 startIndex) (carpfish).
- Added WoopsiString::indexOf(const WoopsiString& string, s32 startIndex, s32 count) (carpfish).
- Added WoopsiString::lastIndexOf(const char* text) (carpfish).
- Added WoopsiString::lastIndexOf(const char* text, s32 startIndex) (carpfish).
- Added WoopsiString::lastIndexOf(const WoopsiString& string, s32 startIndex, s32 count) (carpfish).
- Added WoopsiString + operator overload (carpfish).
- Added WoopsiString += operator overload (carpfish).
- Added WoopsiString == operator overload (carpfish).
- Added WoopsiString != operator overload (carpfish).
- Added WoopsiString::format() (carpfish).
- Added WoopsiString::init() and moved repeated code out of constructors.
- Added case sensitive switch to WoopsiString::compareTo() (carpfish).
- Added WoopsiString::replace() (carpfish).
- Added WoopsiString constructor to create a new string from a substring of another.
- Added WoopsiString::split() (carpfish).
- Added WoopsiString::setText() overload to set to a copy of a substring.

#176061 - ant512 - Tue Mar 29, 2011 3:31 pm

I've started work on the documentation, too:

https://bitbucket.org/ant512/woopsi/wiki/Home

This is in addition to the Doxygen-generated API docs that are available on the Woopsi website:

http://woopsi.org/docs

#176091 - ant512 - Wed Apr 06, 2011 9:32 pm

Woopsi 1.2 is out now!

http://woopsi.org

There are more changes in this release than I expected. Most of them are bug fixes. There's a fair amount of refactoring, and there are a few new features. Note that this release includes breaking changes, but they aren't difficult to fix.

The full changelog follows...

Fixes:
- Screen flipping/ordering does not occur if only one screen is visible.
- Removed ability to set font draw colour/monochrome from font classes; replaced with explicit "colour" parameter to all draw methods.
- Removed height member from FontBase and transplanted all methods to PackedFontBase, making FontBase data free.
- Minor tidying in gadget.cpp.
- Removed width and height members from BitmapBase and transplanted to BitmapWrapper, FrameBuffer and Bitmap.
- Removed constructor from FontBase.
- Gadget::checkCollision(Gadget*) will ignore collisions with hidden gadgets.
- Gadget::checkCollision(Gadget*) now accepts a const Gadget*.
- Replaced Gadget::swapGadgetDepth() with Gadget::changeGadgetDepth().
- Rewrote Gadget::swapDepth() to be more intelligent.
- The index to which Gadget::swapDepth() moves the gadget is now determined by swapDepth() instead of the parent's swapGadgetDepth() method.
- Clicking the depth button in an AmigaWindow no longer results in graphical corruption.
- Removed Screen::swapGadgetDepth().
- Removed Woopsi::swapGadgetDepth().
- Minor tidying and optimisations.
- Gadget::_decorationCount is an s32 instead of a u8.
- Fixed array index confusion in RectCache::markRectDamaged().
- Fixed bugs in Graphics::floodFill().
- Stack methods in Graphics class expect a reference to a stack as a parameter instead of pointer.
- Removed static variables from Woopsi class.
- Gadget::checkCollision(Gadget*) shortcuts if a gadget is being compared with itself.
- Removed unused Gadget::GADGET_NO_RAISE_EVENTS flag.
- Removed redundant Woopsi::goModal() method.
- Replaced AmigaScreen-specific flags with extra constructor parameters.
- Replaced AmigaWindow-specific flags with extra constructor parameters.
- Woopsi::handleClick() correctly interprets clicks on children of the context menu.
- Sliders choose a more appropriate size when max value == min value; fixes scrollbars in empty ScrollingListBoxes.
- AmigaScreen doesn't lose focus when depth gadget is clicked if it is not lowered to the bottom of the screen stack (ie. only one screen).
- Removed concept of "close type" from Gadget.
- ListBox::onClick() won't crash if the area clicked doesn't contain an option.
- Woopsi gadget passes its style object to the two background screens it creates.
- ProgressBar accepts a style object in its constructor.
- Removed GadgetFlagTypes from Gadget class.
- Removed flags from all gadget constructors.
- Changing label borderless state correctly repositions text.
- Gadget::setBorderless() is virtual.
- Label redraws minimal amount when text is changed.
- TextBox redraws minimal amount when cursor moves.
- Gadget::raiseGadgetToTop() parameter name in header file agrees with source file.
- Fixed consistency of Gadget method names:
- moveChildToDeleteQueue() renamed to moveGadgetToDeleteQueue().
- moveChildToShelvedList() renamed to moveGadgetToShelvedList().
- moveShelvedToChildList() renamed to moveShelvedToGadgetList().
- removeChild() renamed to removeGadget().
- getChild() renamed to getGadget().
- getChildCount() renamed to getGadgetCount().
- closeChild() renamed to closeGadget().
- shelveChild() renamed to shelveGadget().

New Features:
- Added Gadget::getHighestCollidingGadgetIndex().
- Added Gadget::getLowestCollidingGadgetIndex().
- Added text member to GadgetColours class - text colour can be defined individually.
- Added Gadget::getTextColor().
- Added Gadget::setTextColour().
- Added Gadget::setDecoration().
- Added Label::setBorderless().
- Added Label::markTextRectDamaged().
- Added Bitmap::setDimensions().
- Added Bitmap copy constructor.[/b]

#176389 - ant512 - Thu Jul 21, 2011 12:30 pm

Woopsi 1.3 is now available from here:

https://bitbucket.org/ant512/woopsigfx/downloads

This release includes a winforms UI for the font2font tool (converts Windows fonts to Woopsi fonts) and a bunch of bugfixes.

This will probably be the last release of Woopsi.

Changelog:

Fixes:
- Label and TextBox are more efficient when rendering text changes.
- Removed unused GLYPH_MAP_SIZE constant from fontbase.h.
- Header file in template moved into include directory.
- Animation::play() stops if there are no frames to play.
- Animation::getCurrentFrame() returns NULL if there are no frames.
- Animation::getCurrentBitmap() returns NULL if there are no bitmaps.
- Fixed memory leak when deleting SDL framebuffer.
- Removed extraneous globals from woopsifuncs.cpp.
- WoopsiString::subString() passes the correct arguments to the WoopsiString constructor.
- StringIterator::moveTo() ignores attempts to move to negative indices.
- Improved use of DMA hardware.
- Updated C# tools.
- Removed Visual Studio files.

New Features:
- Added WoopsiTimer::isRunning().
- Added SuperBitmap::setX().
- Added SuperBitmap::setY().
- Added SuperBitmap::getX().
- Added SuperBitmap::getY().
- Added FontConverter, a winforms UI for font2font.