comparison src/DLD-FUNCTIONS/__init_fltk__.cc @ 12306:eedeed3ee849 release-3-4-x

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 2b7aa04f6b53
children c8da31f12c1d
comparison
equal deleted inserted replaced
12305:f8891edcfd35 12306:eedeed3ee849
1964 } 1964 }
1965 1965
1966 return retval; 1966 return retval;
1967 } 1967 }
1968 1968
1969 DEFUN_DLD (fltk_mouse_wheel_zoom, args, , 1969 /* FIXME: This function should be abstracted and made potentially available
1970 to all graphics toolkits. This suggests putting it in graphics.cc
1971 as is done for drawnow() and having the master mouse_wheel_zoom
1972 function call fltk_mouse_wheel_zoom. The same should be done for
1973 gui_mode and fltk_gui_mode. For now (2011.01.30), just
1974 changing function names and docstrings.
1975 */
1976
1977 DEFUN_DLD (mouse_wheel_zoom, args, ,
1970 "-*- texinfo -*-\n\ 1978 "-*- texinfo -*-\n\
1971 @deftypefn {Built-in Function} {@var{speed} =} fltk_mouse_wheel_zoom ()\n\ 1979 @deftypefn {Built-in Function} {@var{speed} =} mouse_wheel_zoom ()\n\
1972 @deftypefnx {Built-in Function} {} fltk_mouse_wheel_zoom (@var{speed})\n\ 1980 @deftypefnx {Built-in Function} {} mouse_wheel_zoom (@var{speed})\n\
1973 Query or set the mouse wheel zoom factor in the FLTK graphics toolkit.\n\ 1981 Query or set the mouse wheel zoom factor.\n\
1974 @seealso{fltk_gui_mode}\n\ 1982 \n\
1983 This function is currently implemented only for the FLTK graphics toolkit.\n\
1984 @seealso{gui_mode}\n\
1975 @end deftypefn") 1985 @end deftypefn")
1976 { 1986 {
1977 octave_value retval = wheel_zoom_speed; 1987 octave_value retval = wheel_zoom_speed;
1978 1988
1979 if (args.length () == 1) 1989 if (args.length () == 1)
1980 { 1990 {
1981 if (args(0).is_real_scalar ()) 1991 if (args(0).is_real_scalar ())
1982 wheel_zoom_speed = args(0).double_value (); 1992 wheel_zoom_speed = args(0).double_value ();
1983 else 1993 else
1984 error ("fltk_mouse_wheel_zoom: SPEED must be a real scalar"); 1994 error ("mouse_wheel_zoom: SPEED must be a real scalar");
1985 } 1995 }
1986 1996
1987 return retval; 1997 return retval;
1988 } 1998 }
1989 1999
1990 DEFUN_DLD (fltk_gui_mode, args, , 2000 DEFUN_DLD (gui_mode, args, ,
1991 "-*- texinfo -*-\n\ 2001 "-*- texinfo -*-\n\
1992 @deftypefn {Built-in Function} {@var{mode} =} fltk_gui_mode ()\n\ 2002 @deftypefn {Built-in Function} {@var{mode} =} gui_mode ()\n\
1993 @deftypefnx {Built-in Function} {} fltk_gui_mode (@var{mode})\n\ 2003 @deftypefnx {Built-in Function} {} gui_mode (@var{mode})\n\
1994 Query or set the GUI mode for the fltk graphics toolkit.\n\ 2004 Query or set the GUI mode for the current graphics toolkit.\n\
1995 The @var{mode} argument can be one of the following strings:\n\ 2005 The @var{mode} argument can be one of the following strings:\n\
1996 @table @asis\n\ 2006 @table @asis\n\
1997 @item '2d'\n\ 2007 @item '2d'\n\
1998 Allows panning and zooming of current axes.\n\ 2008 Allows panning and zooming of current axes.\n\
1999 \n\ 2009 \n\
2001 Allows rotating and zooming of current axes.\n\ 2011 Allows rotating and zooming of current axes.\n\
2002 \n\ 2012 \n\
2003 @item 'none'\n\ 2013 @item 'none'\n\
2004 Mouse inputs have no effect.\n\ 2014 Mouse inputs have no effect.\n\
2005 @end table\n\ 2015 @end table\n\
2006 @seealso{fltk_mouse_wheel_zoom}\n\ 2016 \n\
2017 This function is currently implemented only for the FLTK graphics toolkit.\n\
2018 @seealso{mouse_wheel_zoom}\n\
2007 @end deftypefn") 2019 @end deftypefn")
2008 { 2020 {
2009 caseless_str mode_str; 2021 caseless_str mode_str;
2010 2022
2011 if (gui_mode == pan_zoom) 2023 if (gui_mode == pan_zoom)