Mercurial > hg > octave-terminal
changeset 7406:e9b2e44f9341
[project @ 2008-01-19 07:37:56 by jwe]
author | jwe |
---|---|
date | Sat, 19 Jan 2008 07:42:15 +0000 |
parents | b0734cf13ad4 |
children | 8433bb7865bd |
files | src/ChangeLog src/genprops.awk src/graphics.h.in |
diffstat | 3 files changed, 18 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-01-19 John W. Eaton <jwe@octave.org> + + * genprops.awk (emit_source): Use "pname" for property name argument. + 2008-01-19 Shai Ayal <shaiay@users.sourceforge.net> * graphics.h.in (class figure::properties): New properties:
--- a/src/genprops.awk +++ b/src/genprops.awk @@ -205,9 +205,9 @@ printf ("public:\n"); printf (" properties (const graphics_handle& mh, const graphics_handle& p);\n\n"); printf (" ~properties (void) { }\n\n"); - printf (" void set (const caseless_str& name, const octave_value& val);\n\n"); + printf (" void set (const caseless_str& pname, const octave_value& val);\n\n"); printf (" octave_value get (bool all = false) const;\n\n"); - printf (" octave_value get (const caseless_str& name) const;\n\n"); + printf (" octave_value get (const caseless_str& pname) const;\n\n"); printf (" std::string graphics_object_name (void) const { return go_name; }\n\n"); printf (" static property_list::pval_map_type factory_defaults (void);\n\n"); printf ("private:\n static std::string go_name;\n\n"); @@ -337,17 +337,17 @@ ## set method - printf ("void\n%s::properties::set (const caseless_str& name, const octave_value& val)\n{\n", + printf ("void\n%s::properties::set (const caseless_str& pname, const octave_value& val)\n{\n", class_name) >> filename; for (i = 1; i <= idx; i++) { if (! readonly[i]) - printf (" %sif (name.compare (\"%s\"))\n set_%s (val);\n", + printf (" %sif (pname.compare (\"%s\"))\n set_%s (val);\n", (i > 1 ? "else " : ""), name[i], name[i]) >> filename; } - printf (" else\n base_properties::set (name, val);\n}\n\n") >> filename; + printf (" else\n base_properties::set (pname, val);\n}\n\n") >> filename; ## get "all" method @@ -368,19 +368,19 @@ ## get "one" method - printf ("octave_value\n%s::properties::get (const caseless_str& name) const\n{\n", + printf ("octave_value\n%s::properties::get (const caseless_str& pname) const\n{\n", class_name) >> filename; printf (" octave_value retval;\n\n") >> filename; for (i = 1; i<= idx; i++) { - printf (" %sif (name.compare (\"%s\"))\n", + printf (" %sif (pname.compare (\"%s\"))\n", (i > 1 ? "else " : ""), name[i]) >> filename; printf (" retval = get_%s ()%s;\n", name[i], (type[i] == "handle_property" ? ".as_octave_value ()" : "")) >> filename; } - printf (" else\n retval = base_properties::get (name);\n\n") >> filename; + printf (" else\n retval = base_properties::get (pname);\n\n") >> filename; printf (" return retval;\n}\n\n") >> filename; ## factory defaults method
--- a/src/graphics.h.in +++ b/src/graphics.h.in @@ -968,7 +968,7 @@ buttondownfcn ("buttondownfcn", mh, Matrix ()), children (), clipping ("clipping", mh, true), - createfcn ("createfcn" , mh, Matrix ()), + createfcn ("createfcn", mh, Matrix ()), deletefcn ("deletefcn", mh, Matrix ()), handlevisibility ("handlevisibility", mh, "{on}|callback|off"), hittest ("hittest", mh, true), @@ -1807,11 +1807,11 @@ void init (void) { colormap.add_constraint (dim_vector (-1, 3)); - alphamap.add_constraint (dim_vector (-1 , 1)); - paperposition.add_constraint (dim_vector (1 , 4)); - pointershapecdata.add_constraint (dim_vector (16 , 16)); - pointershapehotspot.add_constraint (dim_vector (1 , 2)); - position.add_constraint (dim_vector (1 , 4)); + alphamap.add_constraint (dim_vector (-1, 1)); + paperposition.add_constraint (dim_vector (1, 4)); + pointershapecdata.add_constraint (dim_vector (16, 16)); + pointershapehotspot.add_constraint (dim_vector (1, 2)); + position.add_constraint (dim_vector (1, 4)); } };