Maintaining and creating GUI Dialogs

Developer corner



18-01-2009: New dialog should be created with wxFormsBuilder.



wxFormsBuilder

Current used version: 3.1.701)

Future developments could use the open source wxFormBuilder.
This tools has a different approach than DialogBlocks:

  • all generated code is written in separate files
  • the generated classes are abstract, so the user code must inherit those classes
  • user code must be written in their own files, wxFormBuilder can generate the stubs

Pro's:


A migration of dialogs made with DialogBlocks is possible because both tools can handle the XRC format, but the user code must be extracted manually into its own files. (Long term “nice to have”.)

Guide lines

Filenames

Example for class name CarDlg:

Description Filename Class name Remark
Formsbuilder project cardlg.fbp cardlg (project name) Only one dialog per project.
Generated abstract class cardlggen.cpp/h cardlggen Read only files; do not edit.
Derived class cardlg.cpp/h CarDlg Implementation of functionality.


DialogBlocks

The most dialogs are created with a tool called DialogBlocks.
Pro's:

  • did a good job sofar and supports all details
  • in/export XRC

Con's:

  • this tool is a commercial product and needs a license to be of any use


Changing DialogBlocks GUI code

If you plan to change GUI components like dialogs, please do not change code between @begin and @end manually in a text editor:
(Generated code by DialogBlocks)

////@begin BlockDialog event table entries
EVT_LISTBOX( ID_LISTBOX_BLOCKS, BlockDialog::OnListboxBlocksSelected )
EVT_BUTTON( ID_BUTTON_BLOCK_NEW, BlockDialog::OnButtonBlockNewClick )
...
EVT_BUTTON( wxID_OK, BlockDialog::OnOkClick )

////@end BlockDialog event table entries

This code is generated by DialogBlocks and will be overwritten, when another developer uses the tool for another change. More information regarding the tool can be found on http://www.anthemion.co.uk/dialogblocks/


Translations

Launchpad offers a web interface for translations using the Gnu Gettext format.

This would be a big step ahead for the Rocrail translations, but needs a lot of effort to switch from the xml based solution to the Gettext one.
The Rocrail server is till now untranslated and could be translated using gettext.
(MinGW also offers the gettext functionality.)

1) The XML is not backwards compatible…

Personal Tools