Mercurial > hg > octave-max
changeset 8247:e41f420875db
set name of root_figure object to root
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 20 Oct 2008 12:22:28 -0400 |
parents | db19494c7c2a |
children | 08bb64396685 |
files | src/ChangeLog src/genprops.awk src/graphics.h.in |
diffstat | 3 files changed, 31 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2008-10-20 John W. Eaton <jwe@octave.org> + + * genprops.awk: Allow whitespace between BEGIN_PROPERTIES and + opening paren. Accept optional second argument for graphics + object name. + * graphics.h.in (root_figure properties): Pass "root" as second + arg to BEGIN_PROPERTIES. + 2008-10-16 John W. Eaton <jwe@octave.org> * graphics.cc (make_handle_fraction): New static function.
--- a/src/genprops.awk +++ b/src/genprops.awk @@ -558,7 +558,7 @@ if (! base) printf ("std::string %s::properties::go_name (\"%s\");\n\n", - class_name, class_name) >> filename; + class_name, object_name) >> filename; } } @@ -569,14 +569,22 @@ pcount = 0; } -/BEGIN_PROPERTIES\(.*\)/ { +/BEGIN_PROPERTIES *\(.*\)/ { gather = 1; idx = 0; str = $0; - k = index (str, "BEGIN_PROPERTIES("); - str = substr (str, k + 17); - l = index (str, ")"); - class_name = substr (str, 1, l-1); + beg = index (str, "(") + 1; + len = index (str, ")") - beg; + args = substr (str, beg, len); + n = split (args, arg_list, ","); + if (n > 0) + class_name = arg_list[1]; + if (n > 1) + object_name = arg_list[2]; + else + object_name = class_name; + gsub (/ /, "", class_name); + gsub (/ /, "", object_name); base = 0; next; }
--- a/src/graphics.h.in +++ b/src/graphics.h.in @@ -2094,7 +2094,7 @@ // See the genprops.awk script for an explanation of the // properties declarations. - BEGIN_PROPERTIES(root_figure) + BEGIN_PROPERTIES (root_figure, root) handle_property currentfigure S , graphics_handle () handle_property callbackobject Sr , graphics_handle () bool_property showhiddenhandles , "off" @@ -2260,7 +2260,7 @@ // See the genprops.awk script for an explanation of the // properties declarations. - BEGIN_PROPERTIES(figure) + BEGIN_PROPERTIES (figure) any_property __plot_stream__ h , Matrix () bool_property __enhanced__ h , "on" radio_property nextplot , "new|{add}|replace_children|replace" @@ -2541,7 +2541,7 @@ // properties which are not in matlab: interpreter - BEGIN_PROPERTIES(axes) + BEGIN_PROPERTIES (axes) array_property position u , default_axes_position () handle_property title SOf , gh_manager::make_graphics_handle ("text", __myhandle__) bool_property box , "on" @@ -2841,7 +2841,7 @@ // properties which are not in matlab: // ldata, udata, xldata, xudata, keylabel, interpreter - BEGIN_PROPERTIES(line) + BEGIN_PROPERTIES (line) row_vector_property xdata u , default_data () row_vector_property ydata u , default_data () row_vector_property zdata u , Matrix () @@ -2918,7 +2918,7 @@ // See the genprops.awk script for an explanation of the // properties declarations. - BEGIN_PROPERTIES(text) + BEGIN_PROPERTIES (text) string_property string , "" radio_property units , "{data}|pixels|normalized|inches|centimeters|points" array_property position u , Matrix (1, 3, 0.0) @@ -3016,7 +3016,7 @@ // See the genprops.awk script for an explanation of the // properties declarations. - BEGIN_PROPERTIES(image) + BEGIN_PROPERTIES (image) row_vector_property xdata u , Matrix () row_vector_property ydata u , Matrix () array_property cdata u , Matrix () @@ -3101,7 +3101,7 @@ // See the genprops.awk script for an explanation of the // properties declarations. - BEGIN_PROPERTIES(patch) + BEGIN_PROPERTIES (patch) array_property xdata u , Matrix () array_property ydata u , Matrix () array_property zdata u , Matrix () @@ -3219,7 +3219,7 @@ // See the genprops.awk script for an explanation of the // properties declarations. - BEGIN_PROPERTIES(surface) + BEGIN_PROPERTIES (surface) array_property xdata u , Matrix () array_property ydata u , Matrix () array_property zdata u , Matrix () @@ -3366,7 +3366,7 @@ // See the genprops.awk script for an explanation of the // properties declarations. - BEGIN_PROPERTIES(hggroup) + BEGIN_PROPERTIES (hggroup) // hidden properties for limit computation row_vector_property xlim hr , Matrix() row_vector_property ylim hr , Matrix()