Audacity  2.2.0
WX Wish List

Introduction

We're using this section to record requests for enhancements to wxWidgets. It's here in the documentation on the source code, because it indicates issues we have 'worked around' which we'd like a cleaner solution to.

Transparency, Masks, Alpha, wxImages and wxBitmaps

At the time of writing, wxWidgets support for alpha-channel based transparency is patchy.

  • Support for masks, that is all or nothing transparency, is excellent.
  • Support for alpha channel transparency, that is where values between 0 and 255 let some but not all of the background show through, is incomplete. It seems to be best supported on Windows, and least well supported on Mac.

Mask based transparency leads to sharp edges that look blocky and 'dated' on modern PC's - so we try to use alpha blending when we need transparency .

Support for alpha blending in wxImage and wxBitmap is different.

  • wxImage is a platform neutral image. There are nice functions for loading and saving PNGs with transparency to or from a wxImage. These work on all platforms we use.
  • wxBitmap is a platform specific 'image'. To display an image it must at some point be converted to a wxBitmap.

Now, a 32 bit wxBitmap has 24 bits for RGB and 8 bits for alpha. Under WindowsXP you can paste wxBitmaps into a wxMemDc and preserve the alpha channel. However, when you convert to a wxImage, unless you use an undocumented function which only works on WindowsXP, you lose it. To output a wxBitmap to a file you have to convert to a wxImage.

The workarounds for the incomplete alpha-channel support can be found in ImageManipulation.cpp . Also, in implementing Themability of Audacity we keep both wxImages and wxBitmaps to work around the conversion problems.

So, the wishlist item is for wxWidgets to sort this out!

wxTreeBook

We know a wxTreeBook is coming in wxWidgets 2.7.0. We're using a contrib-version that works pretty well, but using it as if it were a wxListBook. We've tried using wxWidgets 2.6.3 undocumented versions of wxChoiceBook and wxListBook, and in 2.6.3, neither is ready for prime time.

We're looking forward to having a built in wxTreeBook.

Docking And Layout System

There are contrib directories that have partial implementations of Toolbar docking and layout. Our own system is rather hacked together, and just about meets our needs. We'd like a full strength system built in to wxWidgets.