Basics of a form
An application is defined as a namespace containing several main functions with predefined names (starting with
gui) and syntax. These are described in the table below.
For MATLAB the namespace must be a package. For Python it must be a module.
Simian GUI must be able to find the namespace on the path.
Simian GUI will try to execute the
gui functions during initialization and when handling events.
The form code can be in other files and functions, as long as the
gui functions call these other functions in turn.
When the functions are not found or cannot be executed for any other reason, the form will not function correctly.
|✓||Form initialization code. See Form definition.|
|✓||Event handling code. See Handling events.|
|Download content from the form. This is triggered instead of guiEvent when the |
|Upload content to the form. This is triggered instead of |
|Define what should happen when the application is closed. For example, data may need to be saved or the workspace might need to be cleaned up. In addition to what is executed in your custom function, the cache is cleared.|
The functions must be in a package (or module) to prevent shadowing these functions implemented for other potential applications created with Simian GUI. Once these functions have been created and the code and Simian are on the path, the form can be initialized locally by using:
import simian.local simian.local.Uiformio("my.namespace")
"my.namespace" is the unique namespace of your form.
The following extra options can be specified:
Uiformio(_, "FigureHandle", figHandle)Specifies a custom parent figure.
Uiformio(_, "FigureProps", props)Specifies additional options (cell array) to use for the uihtml component.
Uiformio(_, "Fullscreen", fullscreen)Sets the figure full screen on start when true.
Uiformio(_, "Maximized", maximized)Maximizes the figure on start when true.
Uiformio(_, "Size", size)Sets the initial size [width, height] of the figure.
Uiformio(_, "WindowTitle", title)Specifies a title for the figure.
Uiformio(_, debug=debug)Sets the application debug flag.
Uiformio(_, fullscreen=fullscreen)Sets the window full screen on start when true.
Uiformio(_, size=size)Sets the initial window size [width, height].
Uiformio(_, window_title=window_title)Specifies a title for the application window.
For deploying the form on a server please refer to the deployment chapter.