User Tools

Site Tools


en:software:matlab:trepr:dev:gui:index

GUI

A rather technical account of GUI design and programming.

If you are interested in the basic ideas and concepts of the GUIs included in the toolbox, please have a look at the respective pages. The following pages are more designed for the developer who actually wants to write own GUIs (e.g., for submodules) or understand the code of the toolbox GUIs in more detail.

Currently, this section is divided into three parts:

  • A few things to start with
    Rather general aspects of GUI programming, such as naming conventions used throughout the toolbox and other useful hints.
  • Aspects of the GUI programming
    Key concepts that get used widely in the diverse GUI functions of the toolbox, with proper code examples.
  • How to actually design a GUI
    Besides a few words about differences between what the Matlab™ help tells you to do and what actually prove sensible to do a fully-fledged GUI skeleton for use as basis for your own developments.

If you go through all these different aspects at least once and afterwards use them as reference where necessary, this should get you started with writing your own GUIs that fit quite well into the main toolbox.

A few things to start with

    • Value convention over configuration to save code lines and effort.
    • Make use of “action” as a third argument and reuse one callback function for each control of a given type.
    • How to use cross-platform monospaced fonts
    • How to use cross-platform font sizes
    • How to deal with special characters

Aspects of the GUI programming

    • Ensure only one instance of your GUI is active at a time.
    • Use try-catch constructs for proper exception handling.
    • Make use of error reporting infrastructure of the toolbox
    • Make use of the status window/messages
    • Subwindows should be placed relative to the main GUI.
    • The position of the main GUI can be configured via INI files.
    • How to get the additional fields used for datasets inside the GUI.
    • How to write own functions as central place to store defintions of such additional fields.

How to actually design a GUI

    • A few words about what Matlab™ functions to use and not to use.
    • A complete GUI skeleton to use for own developments with explanatory comments.
en/software/matlab/trepr/dev/gui/index.txt · Last modified: 2020/09/30 21:35 by 127.0.0.1