diff libinterp/octave-value/ov-struct.cc @ 24668:d4dd741b2794

new octave_value functions for formatting output * ov.h, ov.cc, ov-base.h, ov-base.cc, and numeric/matrix-like objects: (get_edit_display_format): New function. (edit_display): Pass float_display_format as argument. * pr-output.h, pr-output.cc: New variants of the octave_print_internal functions that accept display formats. Expose functions for getting display formats. * variable-editor-model.cc: Maintain display format for model.
author John W. Eaton <jwe@octave.org>
date Thu, 01 Feb 2018 06:36:50 -0500
parents a4ea36915e38
children aaf7bcea71dd
line wrap: on
line diff
--- a/libinterp/octave-value/ov-struct.cc	Wed Jan 31 22:21:51 2018 -0600
+++ b/libinterp/octave-value/ov-struct.cc	Thu Feb 01 06:36:50 2018 -0500
@@ -657,7 +657,8 @@
 }
 
 std::string
-octave_struct::edit_display (octave_idx_type r, octave_idx_type c) const
+octave_struct::edit_display (const float_display_format& fmt,
+                             octave_idx_type r, octave_idx_type c) const
 {
   octave_value val;
   if (map.rows () == 1 || map.columns () == 1)
@@ -1359,7 +1360,8 @@
 }
 
 std::string
-octave_scalar_struct::edit_display (octave_idx_type r, octave_idx_type) const
+octave_scalar_struct::edit_display (const float_display_format& fmt,
+                                    octave_idx_type r, octave_idx_type) const
 {
   // Scalar struct.  Rows are fields, single column for values.