diff src/DLD-FUNCTIONS/__init_fltk__.cc @ 14111:c5222658dc3c stable

doc: Build documentation for functions even when they are unavailable on a particular platform due to lack of libraries. syscalls.cc (F_DUPFD, F_GETFD, F_GETFL, F_SETFD, F_SETFL, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY): Build documentation for functions even when they are not available due to lack of libraries. __init_fltk__.cc (Fgui_mode, Fmouse_wheel_zoom): Build documentation for functions even when they are not available due to lack of libraries.
author Rik <octave@nomad.inbox5.com>
date Mon, 26 Dec 2011 10:38:45 -0800
parents e3bed294b117
children 72c96de7a403
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/__init_fltk__.cc	Mon Dec 26 10:17:47 2011 -0500
+++ b/src/DLD-FUNCTIONS/__init_fltk__.cc	Mon Dec 26 10:38:45 2011 -0800
@@ -35,6 +35,9 @@
 #include <config.h>
 #endif
 
+#include "defun-dld.h"
+#include "error.h"
+
 #if defined (HAVE_FLTK)
 
 #include <map>
@@ -69,8 +72,6 @@
 #include "cmd-edit.h"
 #include "lo-ieee.h"
 
-#include "defun-dld.h"
-#include "error.h"
 #include "file-ops.h"
 #include "gl-render.h"
 #include "gl2ps-renderer.h"
@@ -2004,6 +2005,8 @@
   return retval;
 }
 
+#endif
+
 // 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
@@ -2021,6 +2024,7 @@
 @seealso{gui_mode}\n\
 @end deftypefn")
 {
+#if defined (HAVE_FLTK)
   octave_value retval = wheel_zoom_speed;
 
   if (args.length () == 1)
@@ -2032,6 +2036,10 @@
     }
 
   return retval;
+#else 
+  error ("mouse_wheel_zoom: not available without OpenGL and FLTK libraries");
+  return octave_value ();
+#endif
 }
 
 DEFUN_DLD (gui_mode, args, ,
@@ -2055,6 +2063,7 @@
 @seealso{mouse_wheel_zoom}\n\
 @end deftypefn")
 {
+#if defined (HAVE_FLTK)
   caseless_str mode_str;
 
   if (gui_mode == pan_zoom)
@@ -2089,6 +2098,9 @@
     error ("MODE must be one of the strings: \"2D\", \"3D\", or \"none\"");
 
   return octave_value (mode_str);
+#else
+  error ("mouse_wheel_zoom: not available without OpenGL and FLTK libraries");
+  return octave_value ();
+#endif
 }
 
-#endif