comparison libinterp/corefcn/graphics.cc @ 19898:17d647821d61

maint: More cleanup of C++ code to follow Octave coding conventions. * gl-select.cc, betainc.cc, bitfcns.cc, bsxfun.cc, gl-render.cc, graphics.cc, load-save.cc, ls-mat-ascii.cc, ls-mat5.cc, lu.cc, oct-stream.cc, symtab.cc, variables.cc, __eigs__.cc, __magick_read__.cc, chol.cc, ov-base-sparse.cc, ov-class.cc, ov-classdef.cc, ov-fcn-inline.cc, ov-perm.cc, ov.cc, CMatrix.cc, CSparse.cc, MSparse.cc, MatrixType.cc, MatrixType.h, dMatrix.cc, dSparse.cc, fCMatrix.cc, fMatrix.cc, eigs-base.cc, lo-sysdep.cc, kpse.cc: Break long lines before && and ||.
author John W. Eaton <jwe@octave.org>
date Thu, 26 Feb 2015 13:07:04 -0500
parents 19755f4fc851
children 726df008104d
comparison
equal deleted inserted replaced
19897:09ed6f7538dd 19898:17d647821d61
2804 it != factory_pval.end (); it++) 2804 it != factory_pval.end (); it++)
2805 { 2805 {
2806 std::string pname = it->first; 2806 std::string pname = it->first;
2807 2807
2808 // Don't reset internal properties and handle_properties 2808 // Don't reset internal properties and handle_properties
2809 if (! obj.has_readonly_property (pname) && 2809 if (! obj.has_readonly_property (pname)
2810 pname.find ("__") != 0 && pname.find ("current") != 0 && 2810 && pname.find ("__") != 0 && pname.find ("current") != 0
2811 pname != "uicontextmenu" && pname != "parent") 2811 && pname != "uicontextmenu" && pname != "parent")
2812 { 2812 {
2813 // Store *mode prop/val in order to set them last 2813 // Store *mode prop/val in order to set them last
2814 if (pname.find ("mode") == (pname.length () - 4)) 2814 if (pname.find ("mode") == (pname.length () - 4))
2815 pval[pname] = it->second; 2815 pval[pname] = it->second;
2816 else 2816 else
3220 octave_map m = get ().map_value (); 3220 octave_map m = get ().map_value ();
3221 graphics_object obj = gh_manager::get_object (get_handle ()); 3221 graphics_object obj = gh_manager::get_object (get_handle ());
3222 3222
3223 for (octave_map::const_iterator pa = m.begin (); pa != m.end (); pa++) 3223 for (octave_map::const_iterator pa = m.begin (); pa != m.end (); pa++)
3224 { 3224 {
3225 if (pa->first != "children" && 3225 if (pa->first != "children"
3226 ! obj.has_readonly_property (pa->first)) 3226 && ! obj.has_readonly_property (pa->first))
3227 { 3227 {
3228 property p = get_properties ().get_property (pa->first); 3228 property p = get_properties ().get_property (pa->first);
3229 3229
3230 if (p.ok () && ! p.is_hidden ()) 3230 if (p.ok () && ! p.is_hidden ())
3231 { 3231 {
7373 } 7373 }
7374 7374
7375 void 7375 void
7376 axes::update_axis_limits (const std::string& axis_type) 7376 axes::update_axis_limits (const std::string& axis_type)
7377 { 7377 {
7378 if ((updating_axis_limits.find (get_handle ().value ()) != 7378 if ((updating_axis_limits.find (get_handle ().value ())
7379 updating_axis_limits.end ()) || 7379 != updating_axis_limits.end ())
7380 (updating_aspectratios.find (get_handle ().value ()) != 7380 || (updating_aspectratios.find (get_handle ().value ())
7381 updating_aspectratios.end ())) 7381 != updating_aspectratios.end ()))
7382 return; 7382 return;
7383 7383
7384 Matrix kids = xproperties.get_children (); 7384 Matrix kids = xproperties.get_children ();
7385 7385
7386 double min_val = octave_Inf; 7386 double min_val = octave_Inf;
8080 Conversion to proper coordinates is performed in get_extent. */ 8080 Conversion to proper coordinates is performed in get_extent. */
8081 set_extent (bbox); 8081 set_extent (bbox);
8082 8082
8083 #endif 8083 #endif
8084 8084
8085 if (autopos_tag_is ("xlabel") || autopos_tag_is ("ylabel") || 8085 if (autopos_tag_is ("xlabel") || autopos_tag_is ("ylabel")
8086 autopos_tag_is ("zlabel") || autopos_tag_is ("title")) 8086 || autopos_tag_is ("zlabel") || autopos_tag_is ("title"))
8087 update_autopos ("sync"); 8087 update_autopos ("sync");
8088 } 8088 }
8089 8089
8090 void 8090 void
8091 text::properties::request_autopos (void) 8091 text::properties::request_autopos (void)
8092 { 8092 {
8093 if (autopos_tag_is ("xlabel") || autopos_tag_is ("ylabel") || 8093 if (autopos_tag_is ("xlabel") || autopos_tag_is ("ylabel")
8094 autopos_tag_is ("zlabel") || autopos_tag_is ("title")) 8094 || autopos_tag_is ("zlabel") || autopos_tag_is ("title"))
8095 update_autopos (get_autopos_tag ()); 8095 update_autopos (get_autopos_tag ());
8096 } 8096 }
8097 8097
8098 void 8098 void
8099 text::properties::update_units (void) 8099 text::properties::update_units (void)
8174 Matrix yd = get_ydata ().matrix_value (); 8174 Matrix yd = get_ydata ().matrix_value ();
8175 Matrix zd = get_zdata ().matrix_value (); 8175 Matrix zd = get_zdata ().matrix_value ();
8176 NDArray cd = get_cdata ().array_value (); 8176 NDArray cd = get_cdata ().array_value ();
8177 8177
8178 bad_data_msg = std::string (); 8178 bad_data_msg = std::string ();
8179 if (xd.dims () != yd.dims () || 8179 if (xd.dims () != yd.dims ()
8180 (xd.dims () != zd.dims () && ! zd.is_empty ())) 8180 || (xd.dims () != zd.dims () && ! zd.is_empty ()))
8181 { 8181 {
8182 bad_data_msg = "x/y/zdata should have the same dimensions"; 8182 bad_data_msg = "x/y/zdata should have the same dimensions";
8183 return; 8183 return;
8184 } 8184 }
8185 8185
11232 if (args.length () == 2) 11232 if (args.length () == 2)
11233 go.delete_property_listener (pname, octave_value (), 11233 go.delete_property_listener (pname, octave_value (),
11234 POSTSET); 11234 POSTSET);
11235 else 11235 else
11236 { 11236 {
11237 if (args(2).is_string () && 11237 if (args(2).is_string ()
11238 args(2).string_value () == "persistent") 11238 && args(2).string_value () == "persistent")
11239 { 11239 {
11240 go.delete_property_listener (pname, octave_value (), 11240 go.delete_property_listener (pname, octave_value (),
11241 PERSISTENT); 11241 PERSISTENT);
11242 go.delete_property_listener (pname, octave_value (), 11242 go.delete_property_listener (pname, octave_value (),
11243 POSTSET); 11243 POSTSET);