changeset 20628:3af34e1ef330

Preliminary inclusion of uixx objects properties in the manual (bug #46076) * doc/interpreter/genpropdoc.m: add uixx objects to the list of supported graphics objects * doc/interpreter/genpropdoc.m (get_doc): add uixx objects and their specific properties (currently empty documentation) * doc/interpreter/plot.txi("Interacting with Plots"): add a note and a reference about ui* family of functions. * doc/interpreter/plot.txi("Interacting with Plots"): for consistency, remove "uimenu" reference. All the other uixx are already in the gui section * doc/interpreter/plot.txi("graphics data structure"): add uixx objects * doc/interpreter/gui.txi("UI Elements"): add "uimenu" function reference * doc/module.mk: add rules to build uixx properties texi files. * graphics.in.h: make uixx "__object__" property (Octave internal) hidden so that it does not appear in the documentation.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Fri, 09 Oct 2015 16:25:27 +0200
parents 56333f6df823
children 46edfbd31ad7
files doc/interpreter/genpropdoc.m doc/interpreter/gui.txi doc/interpreter/plot.txi doc/module.mk libinterp/corefcn/graphics.in.h
diffstat 5 files changed, 241 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/genpropdoc.m	Fri Oct 09 19:29:28 2015 -0700
+++ b/doc/interpreter/genpropdoc.m	Fri Oct 09 16:25:27 2015 +0200
@@ -30,7 +30,9 @@
 
 function genpropdoc (objname, fname)
   objnames = {"root", "figure", "axes", "line", ...
-              "text", "image", "patch", "surface"};
+              "text", "image", "patch", "surface", ...
+              "uimenu", "uicontextmenu", "uipanel", ...
+              "uicontrol", "uitoolbar", "uipushtool", "uitoggletool"};
 
   ## Base properties
   base = getstructure ("base");
@@ -1235,6 +1237,140 @@
         s.valid = valid_vecmat;
 
     endswitch
+      
+  ## uimenu properties
+  elseif (strcmp (objname, "uimenu"))
+    switch (field)
+      ## Overridden shared properties
+      case "buttondownfcn"
+        s.doc = doc_unused;
+
+      ## Specific properties
+      case "accelerator"
+      case "callback"
+      case "checked"
+      case "enable"
+      case "foregroundcolor"
+      case "label"
+      case "position"
+      case "separator"  
+        
+    endswitch
+
+  ## uicontextmenu properties
+  elseif (strcmp (objname, "uicontextmenu"))
+    switch (field)
+      ## Overridden shared properties
+      case "buttondownfcn"
+        s.doc = doc_unused;
+
+      ## Specific properties
+      case "callback"
+      case "position" 
+        
+    endswitch
+
+  ## uipanel properties
+  elseif (strcmp (objname, "uipanel"))
+    switch (field)
+      ## Overridden shared properties
+
+      ## Specific properties
+      case "backgroundcolor"
+      case "bordertype"
+      case "borderwidth"
+      case "fontangle"
+      case "fontname"
+      case "fontsize"
+      case "fontunits"
+      case "fontweight"
+      case "foregroundcolor"
+      case "highlightcolor"
+      case "position"
+      case "resizefcn"
+      case "shadowcolor"
+      case "title"
+      case "titleposition"
+      case "units"
+
+    endswitch
+
+  ## uicontrol properties
+  elseif (strcmp (objname, "uicontrol"))
+    switch (field)
+      ## Overridden shared properties
+
+      ## Specific properties
+      case "backgroundcolor"
+      case "callback"
+      case "cdata"
+      case "enable"
+      case "extent"
+      case "fontangle"
+      case "fontname"
+      case "fontsize"
+      case "fontunits"
+      case "fontweight"
+      case "foregroundcolor"
+      case "horizontalalignment"
+      case "keypressfcn"
+      case "listboxtop"
+      case "max"
+      case "min"
+      case "position"
+      case "sliderstep"
+      case "string"
+      case "style"
+      case "tooltipstring"
+      case "units"
+      case "value"
+      case "verticalalignment"
+
+    endswitch
+
+  ## uitoolbar properties
+  elseif (strcmp (objname, "uitoolbar"))
+    switch (field)
+      ## Overridden shared properties
+      case "buttondownfcn"
+        s.doc = doc_unused;
+
+    endswitch
+
+  ## uipushtool properties
+  elseif (strcmp (objname, "uipushtool"))
+    switch (field)
+      ## Overridden shared properties
+      case "buttondownfcn"
+        s.doc = doc_unused;
+
+      ## Specific properties
+      case "cdata"
+      case "clickedcallback"
+      case "enable"
+      case "separator"
+      case "tooltipstring"
+
+    endswitch
+
+  ## uitoggletool properties
+  elseif (strcmp (objname, "uitoggletool"))
+    switch (field)
+      ## Overridden shared properties
+      case "buttondownfcn"
+        s.doc = doc_unused;
+
+      ## Specific properties
+      case "cdata"
+      case "clickedcallback"
+      case "enable"
+      case "offcallback"
+      case "oncallback"
+      case "separator"
+      case "state"
+      case "tooltipstring"
+
+    endswitch
   endif
 
   ## Replace keywords
--- a/doc/interpreter/gui.txi	Fri Oct 09 19:29:28 2015 -0700
+++ b/doc/interpreter/gui.txi	Fri Oct 09 16:25:27 2015 +0200
@@ -71,6 +71,8 @@
 toolkit, although some functionality is available with the @code{fltk} toolkit.
 There is no support for the @code{gnuplot} toolkit.
 
+@DOCSTRING(uimenu)
+
 @DOCSTRING(uicontextmenu)
 
 @DOCSTRING(uicontrol)
--- a/doc/interpreter/plot.txi	Fri Oct 09 19:29:28 2015 -0700
+++ b/doc/interpreter/plot.txi	Fri Oct 09 16:25:27 2015 +0200
@@ -1003,9 +1003,8 @@
 @subsection Interacting with Plots
 
 The user can select points on a plot with the @code{ginput} function or
-selection the position at which to place text on the plot with the
-@code{gtext} function using the mouse.  Menus may also be created
-and populated with specific user commands via the @code{uimenu} function.
+select the position at which to place text on the plot with the
+@code{gtext} function using the mouse.  
 
 @DOCSTRING(ginput)
 
@@ -1013,7 +1012,8 @@
 
 @DOCSTRING(gtext)
 
-@DOCSTRING(uimenu)
+More sophisticated user interaction mechanisms can be obtained using the ui*
+family of functions, @pxref{UI Elements}.
 
 @node Test Plotting Functions
 @subsection Test Plotting Functions
@@ -1370,6 +1370,13 @@
 * Image Properties::
 * Patch Properties::
 * Surface Properties::
+* Uimenu Properties::
+* Uicontextmenu Properties::
+* Uipanel Properties::
+* Uicontrol Properties::
+* Uitoolbar Properties::
+* Uipushtool Properties::
+* Uitoggletool Properties::
 @end menu
 
 In this Section the graphics object properties are discussed in detail, starting
@@ -1455,6 +1462,61 @@
 
 @include plot-surfaceproperties.texi
 
+@node Uimenu Properties
+@subsubsection Uimenu Properties
+@cindex uimenu properties
+
+The @code{uimenu} properties are:
+
+@include plot-uimenuproperties.texi
+
+@node Uicontextmenu Properties
+@subsubsection Uicontextmenu Properties
+@cindex uicontextmenu properties
+
+The @code{uicontextmenu} properties are:
+
+@include plot-uicontextmenuproperties.texi
+
+@node Uipanel Properties
+@subsubsection Uipanel Properties
+@cindex uipanel properties
+
+The @code{uipanel} properties are:
+
+@include plot-uipanelproperties.texi
+
+@node Uicontrol Properties
+@subsubsection Uicontrol Properties
+@cindex uicontrol properties
+
+The @code{uicontrol} properties are:
+
+@include plot-uicontrolproperties.texi
+
+@node Uitoolbar Properties
+@subsubsection Uitoolbar Properties
+@cindex uitoolbar properties
+
+The @code{uitoolbar} properties are:
+
+@include plot-uitoolbarproperties.texi
+
+@node Uipushtool Properties
+@subsubsection Uipushtool Properties
+@cindex uipushtool properties
+
+The @code{uipushtool} properties are:
+
+@include plot-uipushtoolproperties.texi
+
+@node Uitoggletool Properties
+@subsubsection Uitoggletool Properties
+@cindex uitoggletool properties
+
+The @code{uitoggletool} properties are:
+
+@include plot-uitoggletoolproperties.texi
 
 @node Searching Properties
 @subsection Searching Properties
--- a/doc/module.mk	Fri Oct 09 19:29:28 2015 -0700
+++ b/doc/module.mk	Fri Oct 09 16:25:27 2015 +0200
@@ -59,7 +59,14 @@
   doc/interpreter/plot-patchproperties.texi \
   doc/interpreter/plot-rootproperties.texi \
   doc/interpreter/plot-surfaceproperties.texi \
-  doc/interpreter/plot-textproperties.texi
+  doc/interpreter/plot-textproperties.texi \
+  doc/interpreter/plot-uimenuproperties.texi \
+  doc/interpreter/plot-uicontextmenuproperties.texi \
+  doc/interpreter/plot-uipanelproperties.texi \
+  doc/interpreter/plot-uicontrolproperties.texi \
+  doc/interpreter/plot-uitoolbarproperties.texi \
+  doc/interpreter/plot-uipushtoolproperties.texi \
+  doc/interpreter/plot-uitoggletoolproperties.texi
 
 $(GRAPH_PROP_TEXI_SRC): | $(OCTAVE_INTERPRETER_TARGETS)
 
@@ -93,6 +100,27 @@
 doc/interpreter/plot-textproperties.texi: doc/interpreter/genpropdoc.m
 	$(AM_V_GEN)$(call gen-propdoc-texi,text)
 
+doc/interpreter/plot-uimenuproperties.texi: doc/interpreter/genpropdoc.m
+	$(AM_V_GEN)$(call gen-propdoc-texi,uimenu)
+
+doc/interpreter/plot-uicontextmenuproperties.texi: doc/interpreter/genpropdoc.m
+	$(AM_V_GEN)$(call gen-propdoc-texi,uicontextmenu)
+
+doc/interpreter/plot-uipanelproperties.texi: doc/interpreter/genpropdoc.m
+	$(AM_V_GEN)$(call gen-propdoc-texi,uipanel)
+
+doc/interpreter/plot-uicontrolproperties.texi: doc/interpreter/genpropdoc.m
+	$(AM_V_GEN)$(call gen-propdoc-texi,uicontrol)
+
+doc/interpreter/plot-uitoolbarproperties.texi: doc/interpreter/genpropdoc.m
+	$(AM_V_GEN)$(call gen-propdoc-texi,uitoolbar)
+
+doc/interpreter/plot-uipushtoolproperties.texi: doc/interpreter/genpropdoc.m
+	$(AM_V_GEN)$(call gen-propdoc-texi,uipushtool)
+
+doc/interpreter/plot-uitoggletoolproperties.texi: doc/interpreter/genpropdoc.m
+	$(AM_V_GEN)$(call gen-propdoc-texi,uitoggletool)
+
 dist_man_MANS = \
   doc/interpreter/mkoctfile.1 \
   doc/interpreter/octave-cli.1 \
--- a/libinterp/corefcn/graphics.in.h	Fri Oct 09 19:29:28 2015 -0700
+++ b/libinterp/corefcn/graphics.in.h	Fri Oct 09 16:25:27 2015 +0200
@@ -5321,7 +5321,7 @@
     // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (uimenu)
-      any_property __object__ , Matrix ()
+      any_property __object__ h , Matrix ()
       string_property accelerator , ""
       callback_property callback , Matrix ()
       bool_property checked , "off"
@@ -5387,7 +5387,7 @@
     // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (uicontextmenu)
-      any_property __object__ , Matrix ()
+      any_property __object__ h , Matrix ()
       callback_property callback , Matrix ()
       array_property position , Matrix (1, 2, 0.0)
     END_PROPERTIES
@@ -5449,7 +5449,7 @@
     // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (uicontrol)
-      any_property __object__ , Matrix ()
+      any_property __object__ h , Matrix ()
       color_property backgroundcolor , color_values (1, 1, 1)
       callback_property callback , Matrix ()
       array_property cdata , Matrix ()
@@ -5547,7 +5547,7 @@
     // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (uipanel)
-      any_property __object__ , Matrix ()
+      any_property __object__ h , Matrix ()
       color_property backgroundcolor , color_values (1, 1, 1)
       radio_property bordertype , "none|{etchedin}|etchedout|beveledin|beveledout|line"
       double_property borderwidth , 1
@@ -5615,7 +5615,7 @@
     // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (uitoolbar)
-      any_property __object__ , Matrix ()
+      any_property __object__ h , Matrix ()
     END_PROPERTIES
 
   protected:
@@ -5715,7 +5715,7 @@
     // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (uipushtool)
-      any_property __object__ , Matrix ()
+      any_property __object__ h , Matrix ()
       array_property cdata , Matrix ()
       callback_property clickedcallback , Matrix ()
       bool_property enable , "on"
@@ -5771,7 +5771,7 @@
     // Programming note: Keep property list sorted if new ones are added.
 
     BEGIN_PROPERTIES (uitoggletool)
-      any_property __object__ , Matrix ()
+      any_property __object__ h , Matrix ()
       array_property cdata , Matrix ()
       callback_property clickedcallback , Matrix ()
       bool_property enable , "on"