Desktop Tools and Development Environment |
Adding Your Own Toolboxes to the Start Button
If you offer a toolbox or a collection of M-files to other users, you can provide access to it from the Start button.
In summary, the Start button determines what information to display using info.xml
files that reside on the search path or in the current directory. You create an info.xml
file for your toolbox, which contains tags for all of the subentries you want on the Start button. The term toolbox is used here for convenience, but the same concept applies to a blockset or any name you give to your M-file collection.
You can view and modify the file used for this example, which is located in matlab/help/techdoc/matlab_env/examples
; it adds the SpecSim (Example) Toolbox to the Start button:
startinfo.xml
to a directory for which you have write access. Rename it to info.xml
. Add the directory to the search path.
info.xml
file, which you will use as a basis for your own toolbox--for this example, select the info.xml
file for SpecSim (Example).
info.xml
file so they pertain to your toolbox. For details, see the illustration and table after step 9.
Line |
XML Tag |
Value for Example |
Notes |
---|---|---|---|
6 |
|
14 |
MATLAB release. |
7 |
|
SpecSim (Example) |
Name of the toolbox. |
8 |
|
toolbox |
The product category. Allowable values are matlab , simulink, toolbox , blockset , other . This determines where the entry appears in the Start button. SpecSim (Example) appears under Start -> Toolboxes. Within a category, entries are displayed in alphabetical order. |
9 |
<icon> |
specsimicon.gif |
Assumes the toolbox has the icon, specsimicon.gif . You can use icons supplied with MATLAB, which are in matlab/toolbox/matlab . You can specify a relative path, that is relative to the location of the info.xml file. For the example, specsimicon.gif is included in the matlab/help/techdoc/matlab_env/ . |
10 |
<help_location> |
|
Location of HTML help files you provide for the toolbox. This has no corresponding entry on the Start button, but impacts the Help browser. For details, see Adding Your Own Help Files in the Help Browser. You can specify a relative path, that is, relative to the location of the info.xml file. For the example, there is no entry. |
12 to 15 |
<label> |
SpecSim GUI |
Name of a tool in the toolbox. You must have at least one list- listitem-label-callback set of tags for the toolbox to appear in the Start button. |
16 |
<callback> |
saviewer |
Function in the toolbox that runs the SpecSim GUI. This is the statement that runs when you select Start -> Toolboxes -> SpecSim (Example) -> SpecSim GUI. For example, saviewer starts the SpecSim GUI. |
17 |
<icon> |
$toolbox/signal/.../ fdatoolicon.gif |
Use the FDA tool icon for the toolbox. This value uses a relative pathname: $toolbox is the matlab/toolbox directory. |
21 |
<label> |
Examples |
For examples you provide with the toolbox. |
22 |
<callback> |
sa_examples |
This is the statement that runs when you select the Start -> Toolboxes -> SpecSim (Examples) -> Examples menu item for the SpecSim (Example) Toolbox. In this example, sa_examples is an M-file that contains example code. |
23 |
<icon> |
$toolbox/matlab |
Use the standard MATLAB demo and example icon. This value uses a relative pathname: $toolbox is the matlab/toolbox directory. |
27 |
<label> |
SpecSim Web Site |
Provide a link to the toolbox's Web site. |
28 |
<callback> |
web http://www. |
This is the statement that runs when you select the Start -> Toolboxes -> SpecSim (Example) -> SpecSim Web Site menu item. In this example, it displays the Web site for the SpecSim (Example) Toolbox in the system browser. |
|
</listitem> </list> |
none |
Designates end of list and productinfo entries in the Start button for the toolbox. |
Editing the info.xml File for Your Own Toolbox
After making changes to the info.xml
files for your own toolboxes, you need to perform these steps so that your changes appear in the Start button:
Adding Your Own Toolboxes to the Development Environment | Adding Your Own Help Files in the Help Browser |
© 1994-2005 The MathWorks, Inc.