comparison libinterp/dldfcn/__init_fltk__.cc @ 30390:a61e1a0f6024 stable

maint: style check C++ files in libinterp/ ahead of 7.1 release. * Cell.cc, __eigs__.cc, __ichol__.cc, __ilu__.cc, __magick_read__.cc, __qp__.cc, bitfcns.cc, bsxfun.cc, c-file-ptr-stream.h, ccolamd.cc, cellfun.cc, data.cc, debug.cc, defun-int.h, dlmread.cc, event-manager.cc, fftn.cc, file-io.cc, ft-text-renderer.cc, gl2ps-print.cc, graphics.cc, graphics.in.h, gzfstream.cc, gzfstream.h, jsondecode.cc, jsonencode.cc, latex-text-renderer.cc, ls-mat5.cc, lu.cc, mex.cc, oct-stream.cc, oct-strstrm.cc, ordqz.cc, pager.h, pr-output.cc, qz.cc, schur.cc, sparse-xdiv.cc, sparse-xpow.cc, sparse.cc, stack-frame.h, strfns.cc, svd.cc, symrcm.cc, symscope.h, sysdep.cc, text-engine.h, text-renderer.h, tril.cc, variables.h, xdiv.h, __glpk__.cc, __init_fltk__.cc, __init_gnuplot__.cc, __voronoi__.cc, audiodevinfo.cc, cdef-class.cc, cdef-class.h, cdef-manager.cc, cdef-manager.h, cdef-method.cc, cdef-object.cc, ov-base-diag.cc, ov-base-diag.h, ov-base-int.cc, ov-base-int.h, ov-base-mat.cc, ov-base-mat.h, ov-base-scalar.h, ov-base-sparse.cc, ov-base-sparse.h, ov-base.h, ov-bool-mat.cc, ov-cell.cc, ov-cell.h, ov-class.cc, ov-class.h, ov-dld-fcn.cc, ov-intx.h, ov-lazy-idx.cc, ov-lazy-idx.h, ov-mex-fcn.h, ov-perm.cc, ov-perm.h, ov-range.cc, ov-re-mat.cc, ov-re-mat.h, ov-str-mat.h, ov-struct.cc, ov-typeinfo.h, ov-usr-fcn.cc, ov.h, parse.h, pt-cell.cc, pt-stmt.cc, pt-tm-const.cc, pt-walk.cc: Style check C++ files in libinterp/ ahead of 7.1 release.
author Rik <rik@octave.org>
date Sun, 28 Nov 2021 21:52:08 -0800
parents 66763afc32c9
children fe6d1711feea 796f54d4ddbf
comparison
equal deleted inserted replaced
30388:bf4cea7b9ba8 30390:a61e1a0f6024
1275 axes::properties& ap 1275 axes::properties& ap
1276 = dynamic_cast<axes::properties&> (ax.get_properties ()); 1276 = dynamic_cast<axes::properties&> (ax.get_properties ());
1277 std::stringstream cbuf; 1277 std::stringstream cbuf;
1278 cbuf.precision (4); 1278 cbuf.precision (4);
1279 cbuf.width (6); 1279 cbuf.width (6);
1280 Matrix v (1,2,0); 1280 Matrix v (1, 2, 0);
1281 v = ap.get ("view").matrix_value (); 1281 v = ap.get ("view").matrix_value ();
1282 cbuf << "[azimuth: " << v(0) << ", elevation: " << v(1) << ']'; 1282 cbuf << "[azimuth: " << v(0) << ", elevation: " << v(1) << ']';
1283 1283
1284 m_status->value (cbuf.str ().c_str ()); 1284 m_status->value (cbuf.str ().c_str ());
1285 } 1285 }
1314 Matrix x_zlim = ap.get_transform_zlim (); 1314 Matrix x_zlim = ap.get_transform_zlim ();
1315 Matrix pos (2, 3, 0.0); 1315 Matrix pos (2, 3, 0.0);
1316 1316
1317 // front point (nearest to the viewer) 1317 // front point (nearest to the viewer)
1318 ColumnVector tmp = ap.get_transform ().untransform (px, py, x_zlim(0)); 1318 ColumnVector tmp = ap.get_transform ().untransform (px, py, x_zlim(0));
1319 pos(0,0) = tmp(0); 1319 pos(0, 0) = tmp(0);
1320 pos(0,1) = tmp(1); 1320 pos(0, 1) = tmp(1);
1321 pos(0,2) = tmp(2); 1321 pos(0, 2) = tmp(2);
1322 1322
1323 // back point (furthest from the viewer) 1323 // back point (furthest from the viewer)
1324 tmp = ap.get_transform ().untransform (px, py, x_zlim(1)); 1324 tmp = ap.get_transform ().untransform (px, py, x_zlim(1));
1325 pos(1,0) = tmp(0); 1325 pos(1, 0) = tmp(0);
1326 pos(1,1) = tmp(1); 1326 pos(1, 1) = tmp(1);
1327 pos(1,2) = tmp(2); 1327 pos(1, 2) = tmp(2);
1328 1328
1329 ap.set_currentpoint (pos); 1329 ap.set_currentpoint (pos);
1330 if (ap.get_tag () != "legend" && ap.get_tag () != "colorbar") 1330 if (ap.get_tag () != "legend" && ap.get_tag () != "colorbar")
1331 m_fp.set_currentaxes (ap.get___myhandle__ ().value ()); 1331 m_fp.set_currentaxes (ap.get___myhandle__ ().value ());
1332 } 1332 }
1746 } 1746 }
1747 else if (Fl::event_button () == 3) 1747 else if (Fl::event_button () == 3)
1748 { 1748 {
1749 pixel2status (m_ax_obj, m_pos_x, m_pos_y, 1749 pixel2status (m_ax_obj, m_pos_x, m_pos_y,
1750 Fl::event_x (), Fl::event_y () - menu_dy ()); 1750 Fl::event_x (), Fl::event_y () - menu_dy ());
1751 Matrix zoom_box (1,4,0); 1751 Matrix zoom_box (1, 4, 0);
1752 zoom_box(0) = m_pos_x; 1752 zoom_box(0) = m_pos_x;
1753 zoom_box(1) = m_pos_y; 1753 zoom_box(1) = m_pos_y;
1754 zoom_box(2) = Fl::event_x (); 1754 zoom_box(2) = Fl::event_x ();
1755 zoom_box(3) = Fl::event_y () - menu_dy (); 1755 zoom_box(3) = Fl::event_y () - menu_dy ();
1756 m_canvas->set_zoom_box (zoom_box); 1756 m_canvas->set_zoom_box (zoom_box);
1815 { 1815 {
1816 // End of drag -- zoom. 1816 // End of drag -- zoom.
1817 if (m_canvas->zoom ()) 1817 if (m_canvas->zoom ())
1818 { 1818 {
1819 m_canvas->zoom (false); 1819 m_canvas->zoom (false);
1820 double x0,y0,x1,y1; 1820 double x0, y0, x1, y1;
1821 if (m_ax_obj && m_ax_obj.isa ("axes")) 1821 if (m_ax_obj && m_ax_obj.isa ("axes"))
1822 { 1822 {
1823 axes::properties& ap = dynamic_cast<axes::properties&> 1823 axes::properties& ap = dynamic_cast<axes::properties&>
1824 (m_ax_obj.get_properties ()); 1824 (m_ax_obj.get_properties ());
1825 pixel2pos (m_ax_obj, m_pos_x, m_pos_y, x0, y0); 1825 pixel2pos (m_ax_obj, m_pos_x, m_pos_y, x0, y0);
1826 int pos_x1 = Fl::event_x (); 1826 int pos_x1 = Fl::event_x ();
1827 int pos_y1 = Fl::event_y () - menu_dy (); 1827 int pos_y1 = Fl::event_y () - menu_dy ();
1828 pixel2pos (m_ax_obj, pos_x1, pos_y1, x1, y1); 1828 pixel2pos (m_ax_obj, pos_x1, pos_y1, x1, y1);
1829 Matrix xl (1,2,0); 1829 Matrix xl (1, 2, 0);
1830 Matrix yl (1,2,0); 1830 Matrix yl (1, 2, 0);
1831 int dx = abs (m_pos_x - pos_x1); 1831 int dx = abs (m_pos_x - pos_x1);
1832 int dy = abs (m_pos_y - pos_y1); 1832 int dy = abs (m_pos_y - pos_y1);
1833 // Smallest zoom box must be 4 pixels square 1833 // Smallest zoom box must be 4 pixels square
1834 if ((dx > 4) && (dy > 4)) 1834 if ((dx > 4) && (dy > 4))
1835 { 1835 {
2021 2021
2022 // Singleton -- hide all of the above. 2022 // Singleton -- hide all of the above.
2023 2023
2024 static int curr_index; 2024 static int curr_index;
2025 2025
2026 typedef std::map<int, plot_window*> window_map; 2026 typedef std::map<int, plot_window *> window_map;
2027 2027
2028 typedef window_map::iterator wm_iterator;; 2028 typedef window_map::iterator wm_iterator;;
2029 2029
2030 window_map windows; 2030 window_map windows;
2031 2031
2199 } 2199 }
2200 2200
2201 static int str2idx (const caseless_str& clstr) 2201 static int str2idx (const caseless_str& clstr)
2202 { 2202 {
2203 int ind; 2203 int ind;
2204 if (clstr.find (fltk_idx_header,0) == 0) 2204 if (clstr.find (fltk_idx_header, 0) == 0)
2205 { 2205 {
2206 std::istringstream istr (clstr.substr (fltk_idx_header.size ())); 2206 std::istringstream istr (clstr.substr (fltk_idx_header.size ()));
2207 if (istr >> ind) 2207 if (istr >> ind)
2208 return ind; 2208 return ind;
2209 } 2209 }