Documentation of BanghamLab utilities: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
{| border="0" cellpadding="5" cellspacing="5" | {| border="0" cellpadding="5" cellspacing="5" | ||
|- valign="top" | |- valign="top" | ||
|width="200"|Working template created by GuiDemo. | |width="200"|Working template created by GuiDemo. <br><br> | ||
It has names (GuiDemo), menus, buttons and a graphics window. All of which can readily be changed or deleted. | |||
|width="150pt"|[[Image:ConnectedSetsGUI1.png|Heartdrawing]] | |width="150pt"|[[Image:ConnectedSetsGUI1.png|Heartdrawing]] | ||
|} | |} | ||
<ol start="4"> | |||
<li>Text and the left hand, GUI, panel is specified by the text file ''ConnectedSetsLayout.txt''. A small fragment is shown here</li> | |||
figure { | |||
string "GuiDemo" | |||
tag figure_GuiDemo | |||
callback GuiDemo | |||
inherit callback | |||
menu { string "File" size "0 0" | |||
menu { string "New Project" } | |||
menu { string "Open Project..." } | |||
menu { string "Save Project As..." } | |||
menu { string "Close Project" } | |||
menu { string "Show Project On Desktop" } | |||
} | |||
[[GuiDemo Template|Full listing of template]]<br><br> | |||
</ol> |
Revision as of 12:23, 30 March 2013
In preparation
GuiDemo for rapidly creating user interfaces from simple dialogues to full applications
Whilst the Matlab guide is very useful for rapidly creating graphical user interfaces (GUIs) with an arbitrary layout, we find that it is even quicker to base a GUI on GuiDemo.
Why? Because we find it easier to delete things we don't want, and modify those that we do want, rather than starting with a blank screen.
Creating a GUI based on GuiDemo
Description of how the ConnectedSets Gui was created.
- Copy the contents of \DArT_Toolshed\ToolBag\Demo of JRK GUI to your working directory.
- Rename, e.g. GuiDemo.m to ConnectedSets.m and GuiDemoLayout.txt to ConnectedSetsLayout.txt
- Within ConnectedSets.m replace all strings GuiDemo by ConnectedSets. We now have a working template.
Working template created by GuiDemo. It has names (GuiDemo), menus, buttons and a graphics window. All of which can readily be changed or deleted. |
- Text and the left hand, GUI, panel is specified by the text file ConnectedSetsLayout.txt. A small fragment is shown here figure { string "GuiDemo" tag figure_GuiDemo callback GuiDemo inherit callback menu { string "File" size "0 0" menu { string "New Project" } menu { string "Open Project..." } menu { string "Save Project As..." } menu { string "Close Project" } menu { string "Show Project On Desktop" } } Full listing of template