User Tools

Site Tools


gui-code-en

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

gui-code-en [2018/11/12 08:56] (current)
Line 1: Line 1:
 +====== Maintaining and creating GUI Dialogs ======
 +[[english|{{ rocrail-logo-35.png}}]]
 +[[:​develop-corner-en|Developer corner]] ​
 +  *  [[build-en|Build from source]] | **[[gui-code-en|Rocgui Dialogs]]**
 + \\
 +
 + \\
 +18-01-2009: __New dialog should be created with wxFormsBuilder.__\\
 +
 + \\
 +
 + \\
 +===== wxFormsBuilder =====
 +| Current used version: **3.1.70**((The XML is not backwards compatible...)) |\\
 +Future developments could use the open source [[http://​wxformbuilder.org/​|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:
 +  * open source
 +  * no mixing of generated and user code
 +  * in/export XRC
 +  * Ubuntu packages: https://​launchpad.net/​~rjmyst3/​+archive
 +  * Windows setup: see download page of http://​wxformbuilder.org/​
 + \\
 +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 [[http://​www.anthemion.co.uk/​dialogblocks/​|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)
 +
 +<​code>​
 +////@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
 +</​code>​
 +
 +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 =====
 +[[https://​translations.launchpad.net/​rocrail|Launchpad]] offers a web interface for translations using the Gnu Gettext format.
 +  * http://​en.wikipedia.org/​wiki/​Gettext
 +  * http://​www.gnu.org/​software/​gettext/​
 +
  
gui-code-en.txt ยท Last modified: 2018/11/12 08:56 (external edit)