GSoC 2008 - GridSizer Project

From Audacity Wiki
Revision as of 12:14, 21 June 2008 by Hildensia (talk | contribs)
Jump to: navigation, search
Summer of Code 2008 logo
Progress of the GridSizer project can be reviewed and discussed here. Also see discussion about the project in audacity-devel mailing list.



Drag and Drop is done with the Drag'n'Drop framework of wxWidgets. This has the benfit of dragging TableCtrl cells between different TableCtrls and even different Applications.

So far events are generated on enter, leave, drag-over and dropping data on a cell with the coords of the cell and sometimes the mouse position. That's sent to the application. There will be some standard behaviors one can choose from.

The code actually is sent


A simple fifteen puzzle is on the first page of the test application. You can Drag'n'Drop the buttons to unjumble them. This shows Drag'n'Drop behavior, swapping and vetoing.


On the second page there is a klotski game. Shows span of cells.


On the last page there is a trackpanel similar to the audacity trackpanel, but with bitmaps instead of real wave-forms. Shows more complex panels in a TableCtrl and a TableCtrl in a ScrolledWindow.

To Dos

  • Get familiar with (a) wxAUI (b) Audacity toolbar and dragging behaviour. The wxAUI side will involve a small test app. Probably it makes sense to do this as an upgrade to the wave-page in the wxTable test app, i.e. add a dock for toolbars rather than as a totally new app. Overall aim is to identify any barriers to using wxAUI in place of existing toolbar docking in Audacity. May require liason with Leland around accessibility - if wxAUI kills accessibility for toolbars it means we can't use it in Audacity.
  • Write report on wxAUI. [html format with screenshots preferred].
  • Toolbar with draggable buttons in test app. Confirm that mouse-overs still work and that button clicks still can be acted on.
  • wxTableCtrl in a wxTableCtrl.
  • Discuss and refine hooks for wxTableCtrl behaviour.
  • Discuss and refine mouse-over behaviours to show that dragging is possible.
  • Discuss similarities/differences between wxTableCtrl and existing wxListCtrl in report mode and wxDataViewCtrl.
  • Discuss relation to wxAUI and to wxRL. After the mid-term a decision will be needed on whether to try to work closely with wxRL, wxWidgets, neither or both during GSoC.
  • Make test app more polished - this is mainly about making nicer bitmaps for the cell contents, adding more buttons to switch and select modes of operation.
  • Resizing of TableCtrl Cells. (After mid-term)
  • Ensure we support both 'wxDragGridSizer' (rows all expand together) and 'wxFlexGridSizer' (only current row expands) modes. Ensure we can separately enable/disable swapping and sizing behaviour.
  • Full wxWidgets grade documentation on wxTableCtrl and the testapp. This work may benefit from a prior investigation of what tools wxWidgets use in producing their documentation.

9th June 2008

Issues currently under discussion:

  • It's probably going to be called TableCtrl, since it has qualities of both a sizer and a Window.
  • Use of a global object (or static) for passing start of drag. Is this likely to cause a problem? Needs some investigation.
  • Repaint not taking place when expected.
  • Provision of standard methods such as swapping two items, so that the user of TableCtrl doesn't need to write them himself.
  • Currently using drag-and-drop. Will we be able to get existing Audacity behaviour of swapping tracks without releasing the mouse button?
  • Whether windows within windows within TableCtrl need to have the drag behavior, or just the first level?
  • Behaviour of dragging when within a wxScrolledWindow.

14th June 2008

Latest source now addresses these issues:

  • wx2.9 macro use made conditional so that can be built with wx2.8.7
  • Some stub functions now return values, to compile under MSVC (only warnings under gcc).
  • Copy constructors added to work around DECLARE_NO_COPY_CLASS().
  • WXDLLEXPORT added so that library can be compiled as an intermediate between wx and application, rather than being built into wx (needed for early Audacity deployment).
  • Style of function calls changed to match updated CodingStandards
  • Now as a for easier download.

18th June 2008

Latest source now addresses these issues:

  • wxTableCtrl in a ScrolledWindow. The WaveTrack page shows this
  • Swapping without mouse-release works on wxButtons, there are some problems with more complex wxWindows (like at the trackpanel).
  • You can enable dragging for children

21th June 2008

Latest source now addresses these issues:

  • Swapping is much more robust and works even on more complex wxWindows
  • wxTableCtrl in a wxTableCtrl roughly works