Examples

Built in Example

The git project comes with a basic but nontheless working example consisting of:

  1. documentation sample

  2. host application

  3. pop-up views

  4. one group of plugin views

Structuring your own documentation on the go

here is an example on how easy it to include basic documentation and basic comments into a MATLAB project:

firstClassDef
----------------
.. automodule:: firstfolder.secondfolder_seperated_by_a_dot
.. autoclass:: final_class_file_without_file_ending
        :members:
        :show-inheritance:
        :undoc-members:

the next classdef
----------------

For more details see the spinx documentation or take a look in the appendix

Host Application

For a more general introduction you may want to look at the getting started or readme part. Apart from some naming conventions, declare but uninitialized properties, a startup function and callbacks for the navigation menu there is nothing special about the file

Except that:

  1. it is located in the host folder within the project root folder

  2. and that their may only be one host

Of course, you could chain up multiple classdef files in a series. But I did not go to far into that

class host.mfiles.host_app

Bases: matlab.apps.AppBase

cache = None

in-app cache (unused in boilerplate)

delete(app)

Delete UIFigure when app is deleted

dummyPublicMethod(app)

a dummy public mehtod

Props app

handle

home = None

e.g. display a welcome message

host_app()

Create UIFigure and components

plugins = None

plugin, for firstplugin carrying the red buttons

Plugin Views

You may create any amount of plugin views, which may have multiple other plugins That is exactly the idea. For example create a file selection/navigation app strip it off of its UIfigure and load it into a plugin view

I would recommend changing the content of the existing samples:

redbutton

class firstplugin.mfiles.redbutton(external_handle)

Bases: matlab.apps.AppBase

delete(app)

Delete UIFigure when app is deleted delete(app.uif_redbutton)

main_Panel = None
redbutton(external_handle)

$_$ flipped

calculator

class firstplugin.mfiles.calculator(external_handle)

Bases: matlab.apps.AppBase

calculator(external_handle)

$_$ flipped

delete(app)

Delete UIFigure when app is deleted delete(app.UIFigure)

main_Panel = None