Abstract

The wxWidgets library currently has a ribbon bar component, as a result of my GSoC work in summer 2009. Since it has been available in wxWidgets's Subversion repository, I have received a number of emails regarding it from developers who use wxWidgets, most of which ask about enhancements to the ribbon bar. I propose to implement a number of ribbon-related features which are present in the de-facto standard ribbon implementation (Microsoft Office 2007), but are missing from the wxWidgets implementation.

About Me

I am Peter Cawley, a student from England. I am currently in my first year of a Maths and Computer Science course at Keble college, Oxford, with initial indications pointing toward a 1st class result in the end of year exams. This is my second year applying for GSoC, and I have also previously participated in the GHOP contest, where I completed 15 tasks for the Drupal project and then was chosen as their grand prize winner. I began using wxWidgets several years ago at version 2.6, and have written many things using it, ranging from large (45k lines of code) MDI programs like Mod Studio to small programs like SgaReader2 and CorsixTH-related tools. More recently, I spent GSoC 2009 implementing the wxWidgets ribbon classes, which makes me the most qualified person for extending them, and also means I'm already familiar with Bakefile, Doxygen, Subversion, wxWidgets coding style, and so on.

Other commitments

On the assumption that I am accepted for GSoC, and not snatched-up by a local software company, GSoC will be my only "job" as such over the summer. It should be noted that the GSoC coding period is set to start on May 24th, and the Oxford term does not end until June 25th, meaning that I have some exams which intersect with the GSoC timeline:

I do not perceive this as too much of an issue. It means that the amount of time I spend on GSoC will be lower in the first month than in the latter two months, but I had a similar situation last year with A-level exams, and I still managed to produce excellent results.

Project break-down

The project will consist of four independent enhancements to the wxRibbon classes. Should this turn out to be too much work for the summer timeframe, then one of the enhancements could be dropped. On the other hand, if this turns out to be too little, then further enhancements could be identified (like investigating a custom titlebar for ribbon applications on windows, complete with quick access toolbar and big ribbon button). Completion of each individual enhancement will serve as a project milestone, though as each enhancement is independent of the others, the enhancements might not be completed in the order listed here.

Each of the enhancements will consist of some code being added to the wxRibbon library, some code being added to the ribbon sample to show it off, and appropriate documentation being added to the interface folder.

The first planned enhancement is rich tooltips:

wxRibbonToolTip will be will be a tooltip which has a header, a (multi-paragraph) description, and optionally an image and/or a footer, which positions itself below the ribbon bar as to not obscure other items. Convential tooltips do not position themselves well with regard to a ribbon bar, and due to ribbon controls being just one wxWindow, conventional tooltips do not behave properly with regard to timing and visibility. Rich are also just generally nicer than conventional tooltips, which are starting to look slightly archaic. Rich tooltips could also potentially be applied to non-ribbon applications, thus benefitting more wxWidgets developers.

The second planned enhancement is keyboard navigation:

For people who use them, traditional keyboard shortcuts can greatly increase productivity by allowing both hands to remain on the keyboard at all times. One issue with traditional shortcuts is that they are not all that user-friendly. Ribbon keyboard navigation improves on this by showing all available shortcuts when you press Alt / F10, and then changing the visible shortcuts as you press keys. The visual hints are also intelligently positioned as to be positioned over empty space when possible. Keyboard navigation will be implemented as extensions to the existing ribbon classes, rather than as a new class.

The third planned enhancement is rich menus:


At the moment, there can be "menu / dropdown buttons" on most ribbon controls, but they can only launch conventional menus. A conventional menu doesn't mesh stylistically with the ribbon theme, and is limited in the options which it can offer the user. wxRibbonMenu / wxRibbonMenuItem will be two new classes which allow for creating rich menus. A rich menu can have header items to aid in navigation, traditional separator / normal / check / radio / dropdown items, gallery items (as seen all all three above images, each having a native scrollbar), and custom control items (like for the colour pickers in the top-left image). A rich menu also has a draggable region at the bottom the menu to allow it to be resized. Note that when launching a menu containing a gallery from a gallery control, the menu is intelligently positioned as to sit pixel-for-pixel on top of the existing gallery.

The fourth planned enhancement is better sizer / native widget support:

Currently, a wxRibbonPanel will very happily hold a single ribbon control like a button-bar or gallery, but the situation is less rosy for holding more than one control or holding native controls (like the checkboxes and spinners in the above image). This enhancement will start by investigating how to best apply sizers to ribbon panels. The existing wxSizer interface is based around the idea of continuously resizing windows, whereas the ribbon has discrete resizing, so it may or may not be a good idea to use the existing sizers in a ribbon context. Depending on the result of the investigation, this will probably result in making existing sizers work on ribbon panels, or implementing a wxRibbonBoxSizer class. Subsequently, this enhancement will be investigating a few native widgets on the ribbon, and if necessary, re-implementing static widgets (e.g. wxRibbonStaticText) if the native widget doesn't behave well with regard to ribbon features like transparency.

Contact

Website: www.corsix.org
Email: [email protected]