From a7c28aa20057525a9247d0ae69eb063b53b21811 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 22 May 2010 19:17:13 -0400 Subject: Added new option --prepend-width This is useful for making sure that the column containing the results of --prepend-format is a consistent width throughout the report (including those lines where it is not applied). Fixes 64F9D913-75E1-4830-A3D9-29B72442E68B --- src/output.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/output.h') diff --git a/src/output.h b/src/output.h index 3a7b68df..00c664c1 100644 --- a/src/output.h +++ b/src/output.h @@ -56,17 +56,19 @@ class report_t; class format_posts : public item_handler { protected: - report_t& report; - format_t first_line_format; - format_t next_lines_format; - format_t between_format; - format_t prepend_format; - xact_t * last_xact; - post_t * last_post; + report_t& report; + format_t first_line_format; + format_t next_lines_format; + format_t between_format; + format_t prepend_format; + std::size_t prepend_width; + xact_t * last_xact; + post_t * last_post; public: format_posts(report_t& _report, const string& format, - const optional& _prepend_format = none); + const optional& _prepend_format = none, + std::size_t _prepend_width = 0); virtual ~format_posts() { TRACE_DTOR(format_posts); } @@ -83,13 +85,15 @@ protected: format_t total_line_format; format_t separator_format; format_t prepend_format; + std::size_t prepend_width; predicate_t disp_pred; std::list posted_accounts; public: format_accounts(report_t& _report, const string& _format, - const optional& _prepend_format = none); + const optional& _prepend_format = none, + std::size_t _prepend_width = 0); virtual ~format_accounts() { TRACE_DTOR(format_accounts); } -- cgit v1.2.3