changeset 17527:76614e624818

Add "HitTestArea" property to certain hggroups for Matlab compatibility * scripts/plot/area.m, scripts/plot/private/__bar__.m, scripts/plot/private/__contour__.m, scripts/plot/private/__errplot__.m, scripts/plot/private/__quiver__.m, scripts/plot/private/__scatter__.m, scripts/plot/private/__stem__.m, scripts/plot/stairs.m: Add "HitTestArea" property for Matlab compatibility. Octave doesn't do anything with the property though.
author Rik <rik@octave.org>
date Tue, 01 Oct 2013 14:09:11 -0700
parents 4f1dd8a980df
children 1da32463b540
files scripts/plot/area.m scripts/plot/private/__bar__.m scripts/plot/private/__contour__.m scripts/plot/private/__errplot__.m scripts/plot/private/__quiver__.m scripts/plot/private/__scatter__.m scripts/plot/private/__stem__.m scripts/plot/stairs.m
diffstat 8 files changed, 25 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/area.m	Tue Oct 01 13:50:08 2013 -0700
+++ b/scripts/plot/area.m	Tue Oct 01 14:09:11 2013 -0700
@@ -176,6 +176,9 @@
     addproperty ("areagroup", hg, "data");
     set (retval, "areagroup", retval);
 
+    ## Matlab property, although Octave does not implement it.
+    addproperty ("hittestarea", hg, "radio", "on|{off}", "off");
+
     if (! isempty (args))
       set (hg, args{:});
     endif
--- a/scripts/plot/private/__bar__.m	Tue Oct 01 13:50:08 2013 -0700
+++ b/scripts/plot/private/__bar__.m	Tue Oct 01 14:09:11 2013 -0700
@@ -319,6 +319,10 @@
 
     addproperty ("bargroup", hg, "data");
     set (hglist, "bargroup", hglist);
+
+    ## Matlab property, although Octave does not implement it.
+    addproperty ("hittestarea", hg, "radio", "on|{off}", "off");
+
     if (! isempty (args))
       set (hg, args{:});
     endif
--- a/scripts/plot/private/__contour__.m	Tue Oct 01 13:50:08 2013 -0700
+++ b/scripts/plot/private/__contour__.m	Tue Oct 01 14:09:11 2013 -0700
@@ -165,6 +165,9 @@
   addproperty ("linestyle", hg, "linelinestyle", linespec.linestyle);
   addproperty ("linewidth", hg, "linelinewidth", 0.5);
 
+  ## Matlab property, although Octave does not implement it.
+  addproperty ("hittestarea", hg, "radio", "on|{off}", "off");
+
   addlistener (hg, "fill", {@update_data, "fill"});
 
   addlistener (hg, "zlevelmode", @update_zlevel);
--- a/scripts/plot/private/__errplot__.m	Tue Oct 01 13:50:08 2013 -0700
+++ b/scripts/plot/private/__errplot__.m	Tue Oct 01 14:09:11 2013 -0700
@@ -169,6 +169,9 @@
     addproperty ("markersize", hg, "linemarkersize",
                  get (hl(1), "markersize"));
 
+    ## Matlab property, although Octave does not implement it.
+    addproperty ("hittestarea", hg, "radio", "on|{off}", "off");
+
     fcn = {@update_props, hl};
     addlistener (hg, "color", fcn);
     addlistener (hg, "linestyle", fcn);
--- a/scripts/plot/private/__quiver__.m	Tue Oct 01 13:50:08 2013 -0700
+++ b/scripts/plot/private/__quiver__.m	Tue Oct 01 14:09:11 2013 -0700
@@ -320,6 +320,9 @@
     addlistener (hg, "markerfacecolor", @update_props);
     addlistener (hg, "markersize", @update_props);
 
+    ## Matlab property, although Octave does not implement it.
+    addproperty ("hittestarea", hg, "radio", "on|{off}", "off");
+
     if (! isempty (args))
       set (hg, args{:});
     endif
--- a/scripts/plot/private/__scatter__.m	Tue Oct 01 13:50:08 2013 -0700
+++ b/scripts/plot/private/__scatter__.m	Tue Oct 01 14:09:11 2013 -0700
@@ -259,6 +259,9 @@
   addlistener (hg, "markerfacecolor", @update_props);
   addlistener (hg, "markeredgecolor", @update_props);
 
+  ## Matlab property, although Octave does not implement it.
+  addproperty ("hittestarea", hg, "radio", "on|{off}", "off");
+
   if (! isempty (newargs))
     set (hg, newargs{:});
   endif
--- a/scripts/plot/private/__stem__.m	Tue Oct 01 13:50:08 2013 -0700
+++ b/scripts/plot/private/__stem__.m	Tue Oct 01 14:09:11 2013 -0700
@@ -143,6 +143,9 @@
       addlistener (hg, "ydata", @update_data);
       addlistener (hg, "zdata", @update_data);
 
+      ## Matlab property, although Octave does not implement it.
+      addproperty ("hittestarea", hg, "radio", "on|{off}", "off");
+
       if (! isempty (args))
         set (hg, args{:});
       endif
--- a/scripts/plot/stairs.m	Tue Oct 01 13:50:08 2013 -0700
+++ b/scripts/plot/stairs.m	Tue Oct 01 14:09:11 2013 -0700
@@ -218,6 +218,9 @@
         addlistener (hg, "markerfacecolor", @update_props);
         addlistener (hg, "markersize", @update_props);
 
+        ## Matlab property, although Octave does not implement it.
+        addproperty ("hittestarea", hg, "radio", "on|{off}", "off");
+
         if (! isempty (args))
           set (hg, args{:});
         endif