Examples¶
Built in Example¶
The git project comes with a basic but nontheless working example consisting of:
documentation sample
host application
pop-up views
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:
it is located in the host folder within the project root folder
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¶
Bases:
matlab.apps.AppBase
Delete UIFigure when app is deleted delete(app.uif_redbutton)
$_$ flipped