# HG changeset patch # User Shai Ayal # Date 1271272534 -10800 # Node ID 6538ff56294975865bb7e285f9f294fa5aa73b4a # Parent 4d1fc073fbb72ced78512a1012360eba5327ee73 document keypress and mouse callback properties diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-04-14 Shai Ayal + + * NEWS: Update. + 2010-04-08 Marco Atzeri * Makefile.am (make-version-links, remove-version-links): diff --git a/NEWS b/NEWS --- a/NEWS +++ b/NEWS @@ -1,6 +1,12 @@ Summary of important user-visible changes for version 3.3: --------------------------------------------------------- + ** The fltk graphics backend now implements the following callback + properties: keypressfcn, keyreleasefcn, windowbuttondownfcn, + windowbuttonmotionfcn, windowbuttonupfcn, and currentpoint. These + enable keyboard and mouse interaction, an example of which can be + seen in the __fltk_ginput__.m script. + ** BLAS and LAPACK libraries are now required to build Octave. The subset of the reference BLAS and LAPACK libraries has been removed from the Octave sources. diff --git a/doc/ChangeLog b/doc/ChangeLog --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2010-04-14 Shai Ayal + + * interpreter/plot.txi: Document keypress and mouse callback + properties + 2010-04-07 John W. Eaton * interpreter/testfun.txi: Document runtests. diff --git a/doc/interpreter/plot.txi b/doc/interpreter/plot.txi --- a/doc/interpreter/plot.txi +++ b/doc/interpreter/plot.txi @@ -939,7 +939,7 @@ color menubar resize wvisualmode colormap mincolormap resizefcn xdisplay createfcn name selected xvisual -current_point nextplot selectionhighlight xvisualmode +currentpoint nextplot selectionhighlight xvisualmode currentaxes numbertitle selectiontype currentcharacter paperorientation tag @end verbatim @@ -1238,7 +1238,11 @@ Handle to graphics object of current axes. @item currentcharacter @item currentobject -@item current_point +@item currentpoint +Holds the coordinates of the point over which the mouse pointer was when +the mouse button was pressed. If a mouse callback function is defined, +@code{"currentpoint"} holds the coordinates of the point over which the +mouse pointer is when the function gets called. @item deletefcn @item dockcontrols --- Values: "on," "off" @@ -1253,7 +1257,23 @@ --- Values: "on," "off" @item inverthardcopy @item keypressfcn +see @code{"keypressfcn"} @item keyreleasefcn +With @code{"keypressfcn"}, The keyboard callback functions. These +callback functions get called when a key is pressed/released +respectively. The functions are called with two input arguments. The +first argument holds the handle of the calling figure. The second +argument holds the event structure which has the following members: +@table @code +@item Character +The ASCII value of the key +@item Key +lowercase value of the key +@item Modifier +A cell array containing strings representing the modifiers pressed with +the key. Possible values are @code{"shift"}, @code{"alt"}, and +@code{"control"}. +@end table @item menubar @item mincolormap @item name @@ -1294,8 +1314,15 @@ @item visible Either @code{"on"} or @code{"off"} to toggle display of the figure. @item windowbuttondownfcn +See @code{"windowbuttonupfcn"} @item windowbuttonmotionfcn +See @code{"windowbuttonupfcn"} @item windowbuttonupfcn +With @code{"windowbuttondownfcn"} and @code{"windowbuttonmotionfcn"}, +The mouse callback functions. These callback functions get called when +the mouse button is pressed, dragged, and released respectively. When +these callback functions are called, the @code{"currentpoint"} property +holds the current coordinates of the cursor. @item windowbuttonwheelfcn @item windowstyle @item wvisual @@ -1344,6 +1371,10 @@ @item colororder @item createfcn @item currentpoint +Holds the coordinates of the point over which the mouse pointer was when +the mouse button was pressed. If a mouse callback function is defined, +@code{"currentpoint"} holds the coordinates of the point over which the +mouse pointer is when the function gets called. @item dataaspectratio A two-element vector specifying the relative height and width of the data displayed in the axes. Setting @code{dataaspectratio} to @samp{1,