diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-07-16 12:43:42 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-07-16 12:43:46 +0200 |
commit | 6268974f886ce1a6a63b67c3b0aa5ede586a6b0e (patch) | |
tree | 7c05e38a0498dadf5dd7481cb7356066b8c7ee83 /src/shared/format-table.h | |
parent | dea55040df2e29562024c00818a1ebe9aa9b38c7 (diff) | |
download | systemd-6268974f886ce1a6a63b67c3b0aa5ede586a6b0e.tar.gz |
format-table: add ability to set cell attributes within table_add_many()
table_add_many() is so much shorter and easier to read than
table_add_cell() with its accessors. Let's teach table_add_many() more
tricks, so that reverting to table_add_cell() is not needed that often
anymore.
Diffstat (limited to 'src/shared/format-table.h')
-rw-r--r-- | src/shared/format-table.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/shared/format-table.h b/src/shared/format-table.h index 62e2d146db..e1c0dab4d0 100644 --- a/src/shared/format-table.h +++ b/src/shared/format-table.h @@ -25,6 +25,18 @@ typedef enum TableDataType { TABLE_PERCENT, TABLE_IFINDEX, _TABLE_DATA_TYPE_MAX, + + /* The following are not really data types, but commands for table_add_cell_many() to make changes to + * a cell just added. */ + TABLE_SET_MINIMUM_WIDTH, + TABLE_SET_MAXIMUM_WIDTH, + TABLE_SET_WEIGHT, + TABLE_SET_ALIGN_PERCENT, + TABLE_SET_ELLIPSIZE_PERCENT, + TABLE_SET_COLOR, + TABLE_SET_URL, + TABLE_SET_UPPERCASE, + _TABLE_DATA_TYPE_INVALID = -1, } TableDataType; |