This page specifies a set of five demo applications that will help us evaluate a proposed GUI toolkit. The five applications range in complexity from the trivial to the somewhat challenging. Most should be able to be completed in an hour or less by someone who is experienced with the toolkit - much longer for the novice.
Five GUI Pieces
To make better comparisons between GUI toolkits, and as an aid to
learning new toolkits, I propose a suite of five GUI applications. These
are arranged in increasing order of difficulty or complexity, but none
of them should offer an insurmountable challenge to a worthy GUI
toolkit.
All of the applications should resize in a 'sensible' way. For example,
a command button that becomes half as tall as the screen when the
application is maximized is not being 'sensible'.
Extra credit: make the applications i18n/i10n capable or compliant.
This application is intended as a kind of 'hello world', but has enough
functionality to show how multiple controls interact with one another
and with the container window.
This application has 2 buttons and one text box.
- The first button should initially be disabled, but when enabled will have a label of 'Reset'. It is enabled as soon as the text box has been changed by the user (i.e. the user types anything into the text box). When the button is enabled and is pressed, it clears the contents of the text box.
- The second button has a label of 'Quit'. It closes the application.
- The text box should extend the width of the window. When the user types into it the text box should tell the 'Reset' button to enable itself.
This application demonstrates the construction of menus and toolbars,
and shows how menu and toolbar events are handled. It also demonstrates
hiding, displaying, and setting text in a status bar.
The application has a menu bar, a toolbar, and a status bar.
- The menu bar should contain a menu hierarchy as follows:
- Test
- Status Bar Visible (a checkbox menu item that toggles visibility of the status bar)
- Test Item 2
- Test Item 2 1
- Test Item 2 2
- Exit
- The toolbar should contain standard 'File New', 'File Open', 'File
Save', and 'Print' icons.
- Each toolbar item and menu item should display "You selected xxxx" in the status bar, where 'xxxx' is the name of the item.
- The Status Bar Visible menu item should toggle the visibility of the status bar each time it is selected and, if supported by the toolkit, should display a checkbox to indicate the visible status.
This application demonstrates the use of multiple dialogs within an
application - a mixture of modal and modeless dialogs, and a mixture of
'standard' and custom dialogs.
The application will have a multiline text area. The application can
have either a menu or a set of command buttons. Either way, the
following functions should be provided.
- Show custom dialog modal (any custom dialog - just needs an OK and Cancel buttons) and display the result (either OK or Cancel) in the multiline text area.
- Show custom dialog modeless. When the user closes the modeless dialog, the parent dialog should be able to catch that event and write the result into the multiline text area.
- Show File/Open dialog and display the filename in the multiline text area.
- Show File/Save dialog and display the filename in the multiline text area.
- Show Color dialog and set background color of multiline text area to that color.
- Show Font dialog and set font in multiline text area to that font.
This application demonstrates use of tree and list widget, and
splitter control (or equivalent).
The application should be a simplified version of Windows Explorer:
- tree widget on the left showing a directory hierarchy
- multi-column list widget on the right showing filename, size, and modification date/time
- a way to move the tree/list boundary left and right
Number Five - an MDI application
This application demonstrates how to construct an MDI (Multi Document
Interface) application. And it shows how to dynamically update menu contents based on child-window selection.
The application has a menu and is implemented as MDI with at least 2
different types of windows displayable in the MDI workspace.
- The menu should contain a Window menu with the standard window arrangement functions (Tile Horizontal, Tile Vertical, Cascade)
- The Window menu should provide a list of open windows and a way to select one of them.
- The menu should contain a File menu with subitems that create new windows of the types described below.
- One of the types of window is nothing more than a multiline text edit box.
- The other kind of window should be an adaptation of the dialog defined in step number one (the 2 buttons and a text box).
- The MDI menu should change depending on which type of child window is currently selected:
- If the simple multiline text edit box is selected, a menu should be added called "TextEdit"
- If the other type of dialog is selected, a menu should be added called "CustomDialog".
- If neither type of dialog is selected, the menu should have only the File and Window items.