Professional Documents
Culture Documents
Guide & Mouse Event
Guide & Mouse Event
2008.11.27
Computational Physics
Sogang Univ. Of Physics
Guide & Mouse Event 2
Simplicity of Layout
Graphical layout is intuitive for GUI development and provides a
well organized structure for complex designs
Automatic Code Generation
Guide will generate callback function code and main GUI code
allowing you to focus on details of the GUI design
Object Property Control
The property inspector and object browser provide a complete view
of available properties and hierarchy allowing you to modify GUI
component behavior efficiently
But
Using Guide for high-level development does not eliminate the
possibility of using low-level UIcontrol and UImenu functions within
your code
Guide & Mouse Event 3
guide
guide fui_name
Guide & Mouse Event 4
Guide options
Besize Behavior
Non-resizable
Proportional
Other(Use ResizeFcn)
Command-line Accessibility
Callback(Gui becomes current figure within callbacks)
Off(Gui never becomes current figure)
On(Gui may become figure from command line)
Other(Use settings from property inspector)
Generate fig-file and M-file
generate callback function prototypes
Gui allows only one instance to run(single ton)
Use system color scheme for background
Generate fig-file only
Guide & Mouse Event 5
Property Inspector
Double click a Gui object(quickest)
Right click over a Gui object and select property inspector from
the item list
Click the property Inspector icon on the shortcut toolbar in Guide
Object Browser
Right click over a Gui object and select Object Browser from the
item list
Click the Object Browser icon on the shortcut toolbar in Guide
Guide & Mouse Event 6
Example
Guide & Mouse Event 7
Mouse Event
Mouse Event Callback Associated Basic Description
Function HG Objects
WindowButtonDownFcn Figure callback fcn that executes
when mouse button is
pressed within a figure
window
WindowButtonUpFcn Figure calback fcn that executes
when mouse button is
depressed within a figure
window
WindowButtonMotionFcn Figure callback fcn that executes
when mouse moves within
a figure window
ButtonDownFcn All objects callback fcn that executes
whenever either a left or
right mouse button is
pressed over an object.
Guide & Mouse Event 8
Example
Guide & Mouse Event 10
Exercise