diff src/DLD-FUNCTIONS/fltk_backend.cc @ 8059:75c99d3f97d7

Octave to backend notification scheme
author John W. Eaton <jwe@octave.org>
date Tue, 26 Aug 2008 13:24:15 -0400
parents 6a6a030a3517
children 09f32aac8fbc
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/fltk_backend.cc	Tue Aug 26 13:23:27 2008 -0400
+++ b/src/DLD-FUNCTIONS/fltk_backend.cc	Tue Aug 26 13:24:15 2008 -0400
@@ -696,10 +696,31 @@
 
   bool is_valid (void) const { return true; }
 
-  void close_figure (const octave_value& ov) const
+  void object_destroyed (const graphics_object& go)
+  {
+    if (go.isa ("figure"))
+      {
+	octave_value ov = go.get (caseless_str ("__plot_stream__"));
+	figure_manager::Instance ().delete_window (ov.string_value ());
+      }
+  }
+
+  void property_changed (const graphics_object& go, int id)
   {
-    if (ov.is_string ())
-      figure_manager::Instance ().delete_window (ov.string_value ());
+    if (go.isa ("figure"))
+      {
+	octave_value ov = go.get (caseless_str ("__plot_stream__"));
+	
+	if (! ov.is_empty ())
+	  {
+	    switch (id)
+	      {
+	      case base_properties::VISIBLE:
+		// FIXME: something to do here
+		break;
+	      }
+	  }
+      }
   }
 
   void redraw_figure (const graphics_handle& fh) const