[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master fffcb59 2/6: Consolidate documentation
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master fffcb59 2/6: Consolidate documentation |
Date: |
Sun, 22 Apr 2018 14:56:59 -0400 (EDT) |
branch: master
commit fffcb59547cea4da9ef0e2c94e3ab7446ead8a52
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Consolidate documentation
---
wx_table_generator.cpp | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/wx_table_generator.cpp b/wx_table_generator.cpp
index 27839e7..ade6fdc 100644
--- a/wx_table_generator.cpp
+++ b/wx_table_generator.cpp
@@ -224,10 +224,15 @@ void wx_table_generator::do_compute_column_widths()
// should it be asserted that no column's final width is zero?
int num_expand = 0;
- // Total width of all non-hidden columns, reflecting header width
- // and the "999,999" mask for column contents, and including the
- // margins that have already been added in (but may be removed
- // later).
+ // Total width of all non-hidden fixed-width columns.
+ // The width of each fixed-width column reflects:
+ // - a mask like "999,999" (ideally, there would instead be a
+ // quasi-global data structure mapping symbolic column names
+ // to their corresponding headers and maximal widths)
+ // - the header width
+ // - the bilateral margins that have already been added
+ // The margins may be slightly reduced by this function to make
+ // everything fit when it otherwise wouldn't.
int total_fixed = 0;
for(auto const& i : columns_)
@@ -250,15 +255,6 @@ void wx_table_generator::do_compute_column_widths()
else
{
total_fixed += i.width_;
-// Total width of all "fixed" columns, including the margins on both sides.
-//
-// This width_ is determined from a mask like "999,999".
-// (We should instead have a global map with the field names as keys
-// and their names and maximal width as values.)
-//
-// It's calculated from the mask, then increased to the header width, if
-// it's greater, and then increased by 2*column_margin_. All this happens in
-// wx_table_generator::add_column().
}
}
- [lmi-commits] [lmi] master updated (132fcb2 -> 7146202), Greg Chicares, 2018/04/22
- [lmi-commits] [lmi] master fffcb59 2/6: Consolidate documentation,
Greg Chicares <=
- [lmi-commits] [lmi] master 7146202 6/6: Explain the connection between "variable" and "expand", Greg Chicares, 2018/04/22
- [lmi-commits] [lmi] master da9e57d 4/6: Improve documentation, resolving a question or two, Greg Chicares, 2018/04/22
- [lmi-commits] [lmi] master 5c0c360 5/6: Resolve several questions, Greg Chicares, 2018/04/22
- [lmi-commits] [lmi] master c902746 1/6: Add and use is_variable_width() const accessor, Greg Chicares, 2018/04/22
- [lmi-commits] [lmi] master 24dacaa 3/6: Consolidate 'total_width_' commentary, Greg Chicares, 2018/04/22