12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure PropertiesWindowButtonDownFcnstringButton press callback function. Use this property to define a callback routinethat <strong>MATLAB</strong> executes whenever you press a mouse button while the pointeris in the figure window. Define this routine as a string that is a valid <strong>MATLAB</strong>expression or the name of an M-file. The expression executes in the <strong>MATLAB</strong>workspace.See uicontrol for information on how this property is set when you click on auicontrol object.WindowButtonMotionFcn stringMouse motion callback function. Use this property to define a callback routinethat <strong>MATLAB</strong> executes whenever you move the pointer within the figurewindow. Define this routine as a string that is a valid <strong>MATLAB</strong> expression orthe name of an M-file. The expression executes in the <strong>MATLAB</strong> workspace.WindowButtonUpFcn stringButton release callback function. Use this property to define a callback routinethat <strong>MATLAB</strong> executes whenever you release a mouse button. Define thisroutine as a string that is a valid <strong>MATLAB</strong> expression or the name of an M-file.The expression executes in the <strong>MATLAB</strong> workspace.The button up event is associated with the figure window in which thepreceding button down event occurred. Therefore, the pointer need not be inthe figure window when you release the button to generate the button up event.If the callback routines defined by WindowButtonDownFcn orWindowButtonMotionFcn contain drawnow commands or call other functionsthat contain drawnow commands and the Interruptible property is set to off,the WindowButtonUpFcn may not be called. You can prevent this problem bysetting Interruptible to on.WindowStyle {normal} | modalNormal or modal window behavior. When WindowStyle is set to modal, thefigure window traps all keyboard and mouse events over all <strong>MATLAB</strong> windowsas long as they are visible. Windows belonging to applications other than<strong>MATLAB</strong> are unaffected. Modal figures remain stacked above all normalfigures and the <strong>MATLAB</strong> command window. When multiple modal windowsexist, the most recently created window keeps focus and stays above all other2-189

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!