User Tools

Site Tools


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

Writing GUIs for your module

Although it can be debated whether GUIs are important or even necessary, they proved to be quite useful in case of the trEPR toolbox. Therefore, developers contributing their own modules might want to write GUIs as well for those.

To make life easier, what follows is a few ideas about how to write such GUIs and what aspects to take care of when developing.

Infrastructure for writing your own GUI

If you plan to write your own GUI window, there is a whole set of functions that might be important for you - especially if it comes to writing datasets (back) to the main GUI window.

For writing GUIs with a consistent look&feel to the rest of the toolbox, have a look at the GUI-specific basic ideas and concepts. The GUI part of the developers' documentation should get you started in terms of actual programming. Please note that the former tries to familiarise you with the basic ideas and concepts, whereas the latter gives you more detailed code examples and hints.

Interaction between modules and the main toolbox GUI

<note important>Interaction between your GUI window and the main GUI window should in any instance be based on generic functions provided by the main GUI, especially if you want to write to the main GUI.</note>

There is a list of functions for handling dataset exchange with the main GUI:

  • trEPRappendDatasetToMainGUI
  • trEPRrefreshDatasetInMainGUI
  • trEPRremoveDatasetFromMainGUI
  • trEPRsaveAsDatasetInMainGUI
  • trEPRsaveDatasetInMainGUI

Tasks often asked for

There are several tasks that will repeatedly be useful in all GUIs1).

For the time being, here is a list of those tasks together with idea how to implement the necessary controls:

Please note that such tasks as exporting the current axis to a file fully rely on generic functions provided by the toolbox. In this particular case, there is a complete separation between functionality and GUI.

1)
Ideally, one would try to save them as building blocks in separate function files, so that they can be included in all these different GUIs. But this is still a task for the future
en/software/matlab/trepr/dev/module/gui/index.txt · Last modified: 2020/09/30 21:35 by 127.0.0.1