Mercurial > hg > octave-lyh
changeset 12226:8cc154f45e37
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.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 30 Jan 2011 09:36:11 -0800 |
parents | cb4ac5e4d987 |
children | d519450e251b |
files | doc/ChangeLog doc/interpreter/octave.texi doc/interpreter/plot.txi src/ChangeLog src/DLD-FUNCTIONS/__init_fltk__.cc |
diffstat | 5 files changed, 48 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,11 @@ +2011-01-30 Rik <octave@nomad.inbox5.com> + + * 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 <octave@nomad.inbox5.com> * interpreter/optim.txi: Deprecate glpkmex function and remove
--- a/doc/interpreter/octave.texi +++ b/doc/interpreter/octave.texi @@ -560,8 +560,7 @@ Graphics Toolkits -* Interaction with gnuplot:: -* Interaction with FLTK:: +* Customizing Toolkit Behavior:: Matrix Manipulation
--- a/doc/interpreter/plot.txi +++ b/doc/interpreter/plot.txi @@ -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)
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-01-30 Rik <octave@nomad.inbox5.com> + + * DLD-FUNCTIONS/__init_fltk__.cc (mouse_wheel_zoom, gui_mode): Rename + functions and strip "fltk_" prefix. Improve docstrings. + 2011-01-30 John W. Eaton <jwe@octave.org> * txt-eng-ft.cc (ft_manager::ft_manager): Omit fc_init_done from
--- a/src/DLD-FUNCTIONS/__init_fltk__.cc +++ b/src/DLD-FUNCTIONS/__init_fltk__.cc @@ -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;