Mercurial > octave-libtiff
changeset 22622:4191f8b5070c
Add '__' to start/end of hidden Octave-only graphics properties (bug #49205).
* QtHandlesUtils.cc (computeFont): get_fontsize_points ->
get___fontsize_points__.
* gl-render.cc (opengl_renderer::set_font): fontsize_points ->
__fontsize_points__.
* gl2ps-print.cc (gl2ps_renderer::set_font): fontsize_points ->
__fontsize_points__.
* graphics.cc (axes::properties::init, axes::properties::set_xlabel,
axes::properties::set_ylabel, axes::properties::set_zlabel,
axes::properties::set_title, axes::properties::set_defaults,
text::properties::update_text_extent, text::properties::request_autopos):
autopos_tag -> __autopos_tag__.
* graphics.cc (axes::properties::update_font,
text::properties::get___fontsize_points__,
uicontrol::properties::get___fontsize_points__,
uibuttongroup::properties::get___fontsize_points__,
uipanel::properties::get___fontsize_points__):
fontsize_points -> __fontsize_points__.
* graphics.in.h: fontsize_points -> __fontsize_points__.
autopos_tag -> __autopos_tag__. fltk_label -> __fltk_label__.
* __init_fltk__.cc: fltk_label -> __fltk_label__.
* plotyy.m, hdl2struct.m, struct2hdl.m: autopos_tag -> __autopos_tag__.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 14 Oct 2016 14:46:25 -0700 |
parents | e7699adac1d0 |
children | 76f1164d2135 |
files | libgui/graphics/QtHandlesUtils.cc libinterp/corefcn/gl-render.cc libinterp/corefcn/gl2ps-print.cc libinterp/corefcn/graphics.cc libinterp/corefcn/graphics.in.h libinterp/dldfcn/__init_fltk__.cc scripts/plot/draw/plotyy.m scripts/plot/util/hdl2struct.m scripts/plot/util/struct2hdl.m |
diffstat | 9 files changed, 57 insertions(+), 57 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/graphics/QtHandlesUtils.cc Fri Oct 14 06:59:29 2016 -0700 +++ b/libgui/graphics/QtHandlesUtils.cc Fri Oct 14 14:46:25 2016 -0700 @@ -124,7 +124,7 @@ mapsInitialized = true; } - f.setPointSizeF (props.get_fontsize_points (height)); + f.setPointSizeF (props.get___fontsize_points__ (height)); f.setWeight (weightMap[props.get_fontweight ()]); f.setStyle (angleMap[props.get_fontangle ()]);
--- a/libinterp/corefcn/gl-render.cc Fri Oct 14 06:59:29 2016 -0700 +++ b/libinterp/corefcn/gl-render.cc Fri Oct 14 14:46:25 2016 -0700 @@ -3587,7 +3587,7 @@ txt_renderer.set_font (props.get ("fontname").string_value (), props.get ("fontweight").string_value (), props.get ("fontangle").string_value (), - props.get ("fontsize_points").double_value ()); + props.get ("__fontsize_points__").double_value ()); } void
--- a/libinterp/corefcn/gl2ps-print.cc Fri Oct 14 06:59:29 2016 -0700 +++ b/libinterp/corefcn/gl2ps-print.cc Fri Oct 14 14:46:25 2016 -0700 @@ -678,7 +678,7 @@ if (props.has_property ("interpreter")) set_interpreter (props.get ("interpreter").string_value ()); - fontsize = props.get ("fontsize_points").double_value (); + fontsize = props.get ("__fontsize_points__").double_value (); caseless_str fn = props.get ("fontname").xtolower ().string_value (); bool isbold =
--- a/libinterp/corefcn/graphics.cc Fri Oct 14 06:59:29 2016 -0700 +++ b/libinterp/corefcn/graphics.cc Fri Oct 14 14:46:25 2016 -0700 @@ -4552,10 +4552,10 @@ xset (zlabel.handle_value (), "clipping", "off"); xset (title.handle_value (), "clipping", "off"); - xset (xlabel.handle_value (), "autopos_tag", "xlabel"); - xset (ylabel.handle_value (), "autopos_tag", "ylabel"); - xset (zlabel.handle_value (), "autopos_tag", "zlabel"); - xset (title.handle_value (), "autopos_tag", "title"); + xset (xlabel.handle_value (), "__autopos_tag__", "xlabel"); + xset (ylabel.handle_value (), "__autopos_tag__", "ylabel"); + xset (zlabel.handle_value (), "__autopos_tag__", "zlabel"); + xset (title.handle_value (), "__autopos_tag__", "title"); adopt (xlabel.handle_value ()); adopt (ylabel.handle_value ()); @@ -4743,7 +4743,7 @@ xset (xlabel.handle_value (), "verticalalignmentmode", "auto"); xset (xlabel.handle_value (), "clipping", "off"); xset (xlabel.handle_value (), "color", get_xcolor ()); - xset (xlabel.handle_value (), "autopos_tag", "xlabel"); + xset (xlabel.handle_value (), "__autopos_tag__", "xlabel"); update_xlabel_position (); } @@ -4757,7 +4757,7 @@ xset (ylabel.handle_value (), "verticalalignmentmode", "auto"); xset (ylabel.handle_value (), "clipping", "off"); xset (ylabel.handle_value (), "color", get_ycolor ()); - xset (ylabel.handle_value (), "autopos_tag", "ylabel"); + xset (ylabel.handle_value (), "__autopos_tag__", "ylabel"); update_ylabel_position (); } @@ -4771,7 +4771,7 @@ xset (zlabel.handle_value (), "verticalalignmentmode", "auto"); xset (zlabel.handle_value (), "clipping", "off"); xset (zlabel.handle_value (), "color", get_zcolor ()); - xset (zlabel.handle_value (), "autopos_tag", "zlabel"); + xset (zlabel.handle_value (), "__autopos_tag__", "zlabel"); update_zlabel_position (); } @@ -4785,7 +4785,7 @@ xset (title.handle_value (), "verticalalignment", "bottom"); xset (title.handle_value (), "verticalalignmentmode", "auto"); xset (title.handle_value (), "clipping", "off"); - xset (title.handle_value (), "autopos_tag", "title"); + xset (title.handle_value (), "__autopos_tag__", "title"); update_title_position (); } @@ -5013,10 +5013,10 @@ xset (zlabel.handle_value (), "clipping", "off"); xset (title.handle_value (), "clipping", "off"); - xset (xlabel.handle_value (), "autopos_tag", "xlabel"); - xset (ylabel.handle_value (), "autopos_tag", "ylabel"); - xset (zlabel.handle_value (), "autopos_tag", "zlabel"); - xset (title.handle_value (), "autopos_tag", "title"); + xset (xlabel.handle_value (), "__autopos_tag__", "xlabel"); + xset (ylabel.handle_value (), "__autopos_tag__", "ylabel"); + xset (zlabel.handle_value (), "__autopos_tag__", "zlabel"); + xset (title.handle_value (), "__autopos_tag__", "title"); update_transform (); sync_positions (); @@ -6264,7 +6264,7 @@ txt_renderer.set_font (get ("fontname").string_value (), get ("fontweight").string_value (), get ("fontangle").string_value (), - get ("fontsize_points").double_value ()); + get ("__fontsize_points__").double_value ()); } // The INTERNAL flag defines whether position or outerposition is used. @@ -6588,7 +6588,7 @@ } double -axes::properties::get_fontsize_points (double box_pix_height) const +axes::properties::get___fontsize_points__ (double box_pix_height) const { double fontsz = get_fontsize (); double parent_height = box_pix_height; @@ -8040,7 +8040,7 @@ txt_renderer.set_font (get ("fontname").string_value (), get ("fontweight").string_value (), get ("fontangle").string_value (), - get ("fontsize_points").double_value ()); + get ("__fontsize_points__").double_value ()); txt_renderer.set_color (get_color_rgb ()); } @@ -8082,17 +8082,17 @@ // performed in get_extent. set_extent (bbox); - if (autopos_tag_is ("xlabel") || autopos_tag_is ("ylabel") - || autopos_tag_is ("zlabel") || autopos_tag_is ("title")) + if (__autopos_tag___is ("xlabel") || __autopos_tag___is ("ylabel") + || __autopos_tag___is ("zlabel") || __autopos_tag___is ("title")) update_autopos ("sync"); } void text::properties::request_autopos (void) { - if (autopos_tag_is ("xlabel") || autopos_tag_is ("ylabel") - || autopos_tag_is ("zlabel") || autopos_tag_is ("title")) - update_autopos (get_autopos_tag ()); + if (__autopos_tag___is ("xlabel") || __autopos_tag___is ("ylabel") + || __autopos_tag___is ("zlabel") || __autopos_tag___is ("title")) + update_autopos (get___autopos_tag__ ()); } void @@ -8131,7 +8131,7 @@ } double -text::properties::get_fontsize_points (double box_pix_height) const +text::properties::get___fontsize_points__ (double box_pix_height) const { double fontsz = get_fontsize (); double parent_height = box_pix_height; @@ -8863,7 +8863,7 @@ } double -uicontrol::properties::get_fontsize_points (double box_pix_height) const +uicontrol::properties::get___fontsize_points__ (double box_pix_height) const { double fontsz = get_fontsize (); double parent_height = box_pix_height; @@ -8995,7 +8995,7 @@ } double -uibuttongroup::properties::get_fontsize_points (double box_pix_height) const +uibuttongroup::properties::get___fontsize_points__ (double box_pix_height) const { double fontsz = get_fontsize (); double parent_height = box_pix_height; @@ -9166,7 +9166,7 @@ } double -uipanel::properties::get_fontsize_points (double box_pix_height) const +uipanel::properties::get___fontsize_points__ (double box_pix_height) const { double fontsz = get_fontsize (); double parent_height = box_pix_height;
--- a/libinterp/corefcn/graphics.in.h Fri Oct 14 06:59:29 2016 -0700 +++ b/libinterp/corefcn/graphics.in.h Fri Oct 14 14:46:25 2016 -0700 @@ -3661,7 +3661,7 @@ Matrix get_extent (bool with_text = false, bool only_text_height=false) const; - double get_fontsize_points (double box_pix_height = 0) const; + double get___fontsize_points__ (double box_pix_height = 0) const; void update_boundingbox (void) { @@ -3927,7 +3927,7 @@ // Octave-specific properties double_property mousewheelzoom , 0.5 // hidden properties for alignment of subplots - radio_property autopos_tag h , "{none}|subplot" + radio_property __autopos_tag__ h , "{none}|subplot" // hidden properties for inset array_property looseinset hu , Matrix (1, 4, 0.0) // hidden properties for transformation computation @@ -3941,7 +3941,7 @@ row_vector_property ymtick h , Matrix () row_vector_property zmtick h , Matrix () // hidden property for text rendering - double_property fontsize_points hgr , 0 + double_property __fontsize_points__ hgr , 0 END_PROPERTIES protected: @@ -4447,7 +4447,7 @@ class OCTINTERP_API properties : public base_properties { public: - double get_fontsize_points (double box_pix_height = 0) const; + double get___fontsize_points__ (double box_pix_height = 0) const; void set_position (const octave_value& val) { @@ -4510,9 +4510,9 @@ radio_property rotationmode hu , "{auto}|manual" radio_property horizontalalignmentmode hu , "{auto}|manual" radio_property verticalalignmentmode hu , "{auto}|manual" - radio_property autopos_tag h , "{none}|xlabel|ylabel|zlabel|title" + radio_property __autopos_tag__ h , "{none}|xlabel|ylabel|zlabel|title" // hidden property for text rendering - double_property fontsize_points hgr , 0 + double_property __fontsize_points__ hgr , 0 END_PROPERTIES Matrix get_data_position (void) const; @@ -5375,7 +5375,7 @@ double_property position , 0 bool_property separator , "off" // Octave-specific properties - string_property fltk_label h , "" + string_property __fltk_label__ h , "" END_PROPERTIES protected: @@ -5486,7 +5486,7 @@ Matrix get_boundingbox (bool internal = false, const Matrix& parent_pix_size = Matrix ()) const; - double get_fontsize_points (double box_pix_height = 0) const; + double get___fontsize_points__ (double box_pix_height = 0) const; // See the genprops.awk script for an explanation of the // properties declarations. @@ -5584,7 +5584,7 @@ Matrix get_boundingbox (bool internal = false, const Matrix& parent_pix_size = Matrix ()) const; - double get_fontsize_points (double box_pix_height = 0) const; + double get___fontsize_points__ (double box_pix_height = 0) const; // See the genprops.awk script for an explanation of the // properties declarations. @@ -5669,7 +5669,7 @@ Matrix get_boundingbox (bool internal = false, const Matrix& parent_pix_size = Matrix ()) const; - double get_fontsize_points (double box_pix_height = 0) const; + double get___fontsize_points__ (double box_pix_height = 0) const; // See the genprops.awk script for an explanation of the // properties declarations.
--- a/libinterp/dldfcn/__init_fltk__.cc Fri Oct 14 06:59:29 2016 -0700 +++ b/libinterp/dldfcn/__init_fltk__.cc Fri Oct 14 14:46:25 2016 -0700 @@ -423,7 +423,7 @@ void delete_entry (uimenu::properties& uimenup) { - std::string fltk_label = uimenup.get_fltk_label (); + std::string fltk_label = uimenup.get___fltk_label__ (); int idx = find_index_by_name (fltk_label.c_str ()); if (idx >= 0) @@ -432,7 +432,7 @@ void update_accelerator (uimenu::properties& uimenup) { - std::string fltk_label = uimenup.get_fltk_label (); + std::string fltk_label = uimenup.get___fltk_label__ (); if (! fltk_label.empty ()) { Fl_Menu_Item* item = const_cast<Fl_Menu_Item*> (menubar->find_item ( @@ -451,7 +451,7 @@ void update_callback (uimenu::properties& uimenup) { - std::string fltk_label = uimenup.get_fltk_label (); + std::string fltk_label = uimenup.get___fltk_label__ (); if (! fltk_label.empty ()) { Fl_Menu_Item* item = const_cast<Fl_Menu_Item*> (menubar->find_item ( @@ -469,7 +469,7 @@ void update_enable (uimenu::properties& uimenup) { - std::string fltk_label = uimenup.get_fltk_label (); + std::string fltk_label = uimenup.get___fltk_label__ (); if (! fltk_label.empty ()) { Fl_Menu_Item* item = const_cast<Fl_Menu_Item*> (menubar->find_item ( @@ -486,7 +486,7 @@ void update_foregroundcolor (uimenu::properties& uimenup) { - std::string fltk_label = uimenup.get_fltk_label (); + std::string fltk_label = uimenup.get___fltk_label__ (); if (! fltk_label.empty ()) { Fl_Menu_Item* item = const_cast<Fl_Menu_Item*> (menubar->find_item ( @@ -509,7 +509,7 @@ // Matlab places the separator before the current // menu entry, while fltk places it after. So we need to find // the previous item in this menu/submenu. (Kai) - std::string fltk_label = uimenup.get_fltk_label (); + std::string fltk_label = uimenup.get___fltk_label__ (); if (! fltk_label.empty ()) { int itemflags = 0, idx; @@ -539,7 +539,7 @@ void update_visible (uimenu::properties& uimenup) { - std::string fltk_label = uimenup.get_fltk_label (); + std::string fltk_label = uimenup.get___fltk_label__ (); if (! fltk_label.empty ()) { Fl_Menu_Item* item @@ -563,7 +563,7 @@ void add_entry (uimenu::properties& uimenup) { - std::string fltk_label = uimenup.get_fltk_label (); + std::string fltk_label = uimenup.get___fltk_label__ (); if (! fltk_label.empty ()) { @@ -606,7 +606,7 @@ } } while (! item_added); - uimenup.set_fltk_label (fltk_label); + uimenup.set___fltk_label__ (fltk_label); } } @@ -615,7 +615,7 @@ std::vector<int> delayed_menus; Matrix kids = find_uimenu_children (uimenup); int len = kids.numel (); - std::string fltk_label = uimenup.get_fltk_label (); + std::string fltk_label = uimenup.get___fltk_label__ (); int count = 0; add_entry (uimenup); @@ -897,7 +897,7 @@ { uimenu::properties& uimenup = dynamic_cast<uimenu::properties&> (uimenu_obj.get_properties ()); - std::string fltk_label = uimenup.get_fltk_label (); + std::string fltk_label = uimenup.get___fltk_label__ (); graphics_object fig = uimenu_obj.get_ancestor ("figure"); figure::properties& figp = dynamic_cast<figure::properties&> (fig.get_properties ()); @@ -2218,7 +2218,7 @@ } } - void uimenu_set_fltk_label (graphics_object uimenu_obj) + void uimenu_set___fltk_label__ (graphics_object uimenu_obj) { if (uimenu_obj.valid_object ()) { @@ -2228,7 +2228,7 @@ graphics_object go = gh_manager::get_object (uimenu_obj.get_parent ()); if (go.isa ("uimenu")) fltk_label = dynamic_cast<const uimenu::properties&> - (go.get_properties ()).get_fltk_label () + (go.get_properties ()).get___fltk_label__ () + "/" + fltk_label; else if (go.isa ("figure") || go.isa ("uicontextmenu")) @@ -2236,7 +2236,7 @@ else error ("invalid parent object\n"); - uimenup.set_fltk_label (fltk_label); + uimenup.set___fltk_label__ (fltk_label); } } @@ -2295,7 +2295,7 @@ else if (go.isa ("uimenu")) { if (id == uimenu::properties::ID_LABEL) - uimenu_set_fltk_label (go); + uimenu_set___fltk_label__ (go); graphics_object fig = go.get_ancestor ("figure"); figure_manager::uimenu_update (fig.get_handle (), go.get_handle (), id);
--- a/scripts/plot/draw/plotyy.m Fri Oct 14 06:59:29 2016 -0700 +++ b/scripts/plot/draw/plotyy.m Fri Oct 14 14:46:25 2016 -0700 @@ -121,8 +121,8 @@ colors = get (ax(1), "colororder"); set (ax(2), "colororder", [colors(2:end,:); colors(1,:)]); - if (strcmp (get (ax(1), "autopos_tag"), "subplot")) - set (ax(2), "autopos_tag", "subplot"); + if (strcmp (get (ax(1), "__autopos_tag__"), "subplot")) + set (ax(2), "__autopos_tag__", "subplot"); else set (ax, "activepositionproperty", "position"); endif
--- a/scripts/plot/util/hdl2struct.m Fri Oct 14 06:59:29 2016 -0700 +++ b/scripts/plot/util/hdl2struct.m Fri Oct 14 14:46:25 2016 -0700 @@ -160,7 +160,7 @@ endwhile ## hidden properties - hidden = {"autopos_tag", "looseinset"}; + hidden = {"__autopos_tag__", "looseinset"}; for ii = 1:numel (hidden) if (isprop (h, hidden{ii})) prpstr.(hidden{ii}) = get (h, hidden{ii});
--- a/scripts/plot/util/struct2hdl.m Fri Oct 14 06:59:29 2016 -0700 +++ b/scripts/plot/util/struct2hdl.m Fri Oct 14 14:46:25 2016 -0700 @@ -181,7 +181,7 @@ if (! any (strcmpi (s.properties.tag, {"colorbar", "legend"}))) ## regular axes propval = {"position", s.properties.position}; - hid = {"autopos_tag", "looseinset"}; + hid = {"__autopos_tag__", "looseinset"}; for ii = 1:numel (hid) prop = hid{ii}; if (isfield (s.properties, prop)) @@ -646,7 +646,7 @@ function addmissingprops (h, props) - hid = {"autopos_tag", "looseinset"}; + hid = {"__autopos_tag__", "looseinset"}; oldfields = fieldnames (props); curfields = fieldnames (get (h)); missing = ! ismember (oldfields, curfields);