# HG changeset patch # User Rik # Date 1296408971 28800 # Node ID eedeed3ee849d5a0693851085f236af2b4979f97 # Parent f8891edcfd350c21b5fd3e1ca8f297f5903b6b2a Rename fltk_mouse_wheel_zoom, fltk_gui_mode functions to remove fltk_ prefix. Add new section to plot.txi to document functions which change toolkit behavior. diff -r f8891edcfd35 -r eedeed3ee849 doc/ChangeLog --- a/doc/ChangeLog Sun Jan 30 12:01:35 2011 -0500 +++ b/doc/ChangeLog Sun Jan 30 09:36:11 2011 -0800 @@ -1,3 +1,11 @@ +2011-01-30 Rik + + * interpreter/octave.texi: Add new section + "Customizing Toolkit Behavior" + + * interpreter/plot.txi: Add functions gnuplot_binary, mouse_wheel_zoom, + and gui_mode to new section. + 2011-01-30 Rik * interpreter/optim.txi: Deprecate glpkmex function and remove diff -r f8891edcfd35 -r eedeed3ee849 doc/interpreter/octave.texi --- a/doc/interpreter/octave.texi Sun Jan 30 12:01:35 2011 -0500 +++ b/doc/interpreter/octave.texi Sun Jan 30 09:36:11 2011 -0800 @@ -560,8 +560,7 @@ Graphics Toolkits -* Interaction with gnuplot:: -* Interaction with FLTK:: +* Customizing Toolkit Behavior:: Matrix Manipulation diff -r f8891edcfd35 -r eedeed3ee849 doc/interpreter/plot.txi --- a/doc/interpreter/plot.txi Sun Jan 30 12:01:35 2011 -0500 +++ b/doc/interpreter/plot.txi Sun Jan 30 09:36:11 2011 -0800 @@ -3222,20 +3222,19 @@ @DOCSTRING(available_graphics_toolkits) @menu -* Interaction with gnuplot:: -* Interaction with FLTK:: +* Customizing Toolkit Behavior:: @end menu -@node Interaction with gnuplot -@subsubsection Interaction with @code{gnuplot} -@cindex gnuplot interaction +@node Customizing Toolkit Behavior +@subsubsection Customizing Toolkit Behavior +@cindex toolkit customization + +The specific behavior of the backend toolkit may be modified using the +following utility functions. Note: Not all functions apply to every +graphics toolkit. @DOCSTRING(gnuplot_binary) -@node Interaction with FLTK -@subsubsection Interaction with FLTK - -@DOCSTRING(fltk_gui_mode) - -@DOCSTRING(fltk_mouse_wheel_zoom) - +@DOCSTRING(gui_mode) + +@DOCSTRING(mouse_wheel_zoom) diff -r f8891edcfd35 -r eedeed3ee849 src/ChangeLog --- a/src/ChangeLog Sun Jan 30 12:01:35 2011 -0500 +++ b/src/ChangeLog Sun Jan 30 09:36:11 2011 -0800 @@ -1,3 +1,8 @@ +2011-01-30 Rik + + * DLD-FUNCTIONS/__init_fltk__.cc (mouse_wheel_zoom, gui_mode): Rename + functions and strip "fltk_" prefix. Improve docstrings. + 2011-01-30 John W. Eaton * txt-eng-ft.cc (ft_manager::ft_manager): Omit fc_init_done from diff -r f8891edcfd35 -r eedeed3ee849 src/DLD-FUNCTIONS/__init_fltk__.cc --- a/src/DLD-FUNCTIONS/__init_fltk__.cc Sun Jan 30 12:01:35 2011 -0500 +++ b/src/DLD-FUNCTIONS/__init_fltk__.cc Sun Jan 30 09:36:11 2011 -0800 @@ -1966,12 +1966,22 @@ return retval; } -DEFUN_DLD (fltk_mouse_wheel_zoom, args, , +/* FIXME: This function should be abstracted and made potentially available + to all graphics toolkits. This suggests putting it in graphics.cc + as is done for drawnow() and having the master mouse_wheel_zoom + function call fltk_mouse_wheel_zoom. The same should be done for + gui_mode and fltk_gui_mode. For now (2011.01.30), just + changing function names and docstrings. +*/ + +DEFUN_DLD (mouse_wheel_zoom, args, , "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {@var{speed} =} fltk_mouse_wheel_zoom ()\n\ -@deftypefnx {Built-in Function} {} fltk_mouse_wheel_zoom (@var{speed})\n\ -Query or set the mouse wheel zoom factor in the FLTK graphics toolkit.\n\ -@seealso{fltk_gui_mode}\n\ +@deftypefn {Built-in Function} {@var{speed} =} mouse_wheel_zoom ()\n\ +@deftypefnx {Built-in Function} {} mouse_wheel_zoom (@var{speed})\n\ +Query or set the mouse wheel zoom factor.\n\ +\n\ +This function is currently implemented only for the FLTK graphics toolkit.\n\ +@seealso{gui_mode}\n\ @end deftypefn") { octave_value retval = wheel_zoom_speed; @@ -1981,17 +1991,17 @@ if (args(0).is_real_scalar ()) wheel_zoom_speed = args(0).double_value (); else - error ("fltk_mouse_wheel_zoom: SPEED must be a real scalar"); + error ("mouse_wheel_zoom: SPEED must be a real scalar"); } return retval; } -DEFUN_DLD (fltk_gui_mode, args, , +DEFUN_DLD (gui_mode, args, , "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {@var{mode} =} fltk_gui_mode ()\n\ -@deftypefnx {Built-in Function} {} fltk_gui_mode (@var{mode})\n\ -Query or set the GUI mode for the fltk graphics toolkit.\n\ +@deftypefn {Built-in Function} {@var{mode} =} gui_mode ()\n\ +@deftypefnx {Built-in Function} {} gui_mode (@var{mode})\n\ +Query or set the GUI mode for the current graphics toolkit.\n\ The @var{mode} argument can be one of the following strings:\n\ @table @asis\n\ @item '2d'\n\ @@ -2003,7 +2013,9 @@ @item 'none'\n\ Mouse inputs have no effect.\n\ @end table\n\ -@seealso{fltk_mouse_wheel_zoom}\n\ +\n\ +This function is currently implemented only for the FLTK graphics toolkit.\n\ +@seealso{mouse_wheel_zoom}\n\ @end deftypefn") { caseless_str mode_str;