Overview of the Maplet Builder
|
A Maplet is a graphical user interface containing windows, textbox regions, and other visual interfaces, which gives a user point-and-click access to the power of Maple. For more information, see Overview of Maplets.
|
|
You can create Maplets using the:
|
•
|
Maplets package, a set of routines for authoring Maplets in the worksheet or command-line interface. For more information, see Overview of the Maplets Package.
|
•
|
Maplet Builder, a graphical interface to the Maplets package. Using the Maplet Builder, you can define the layout of a Maplet, drag and drop elements (visual and functional components of Maplets), set actions associated with elements, and directly run a Maplet. The Maplet Builder is available only in the Standard Worksheet interface.
|
|
This help page describes the Maplet Builder window and how to create Maplets using the Maplet Builder.
|
|
Maplet Builder Interface
|
|
|
The Maplet Builder contains four panes.
|
•
|
The Layout pane displays the visual elements that you have added to the Maplet.
|
•
|
The Command pane displays the commands and corresponding actions that you have created in the Maplet.
|
•
|
The Properties pane displays the properties of an instance of an element in the Maplet.
|
|
|
Palette Pane
|
|
•
|
The Maplet Builder contains Body, Dialog, Menu, ToolBar, Other, Layout, and Command element palettes. To expand or collapse a palette, click the arrow in the upper-left corner.
|
•
|
To display the element name for a palette icon, position the mouse pointer on the icon.
|
•
|
To add an element from the Body, ToolBar, or Layout palette, drag the element to the desired location in the Layout pane. To add an element from the Dialog, Menu, Other, or Command palette, drag the element to the Command pane.
|
•
|
When you add a layout element to a Maplet, any corresponding actions are automatically placed in the Command pane. For example, dragging a Button element to the Layout pane automatically creates an action called clickButton. You must specify a command for this action.
|
|
|
Layout Pane
|
|
•
|
The Layout pane is the focal point of the Maplet Builder because it shows the visual layout of the Maplet.
|
•
|
To add a layout element (from the Body, ToolBar, or Layout palette), drag the element to the desired location in the Layout pane.
|
•
|
The Maplet Builder indicates BoxColumn and BoxRow elements in the Layout pane using borders.
|
•
|
To set the number of columns and rows for a box layout element, select the element in the Properties pane drop-down menu, and then change the numrows or numcolumns property.
|
•
|
To set the number of rows for a grid layout element, select the GridLayout element in the Properties pane drop-down menu, and then change the numrows property.
|
•
|
The Maplet Builder adds a BoxColumn element when you place additional Body elements in the same row if the number of columns in the row is not defined. Similarly, the Maplet Builder adds BoxRow elements as required.
|
•
|
Clicking an element in the Layout or Command pane displays the corresponding properties in the Properties pane. To select a Layout element, click the border of the layout region. You can also select the element from the drop-down menu in the Properties pane.
|
|
|
Command Pane
|
|
•
|
The Command pane displays actions, commands, and menu items for the Maplet.
|
|
|
Properties Pane
|
|
•
|
The Properties pane allows you to set properties for the elements in your Maplet. For example, the properties of a Button include:
|
|
* foreground - To set the color of the button caption, double-click the black foreground color region, which launches a color dialog.
|
|
* onclick - To set the action that the Maplet performs when the user clicks the button, from the onclick drop-down menu, select one of the available Action elements.
|
|
* caption - To set the label on the button, in the caption text field, enter a string.
|
•
|
To display the properties of an element, select the element from the drop-down menu at the top of the Properties pane or click the element in the Layout or Command pane.
|
|
|
Saving, Opening, and Running a Maplet
|
|
•
|
To save a Maplet designed with the Maplet Builder, from the File menu, select Save or Save As. This will save the Maplet as a .maplet file.
|
•
|
To open a .maplet file in the Maplet Builder, from the File menu, select Open. Opening a .maplet file edited outside of the Maplet Builder may not work properly.
|
•
|
To run a Maplet designed with the Maplet Builder, from the File menu, select Run.
|
|
|