mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-04 12:28:35 +02:00
View
- Broke out View into ViewTask and ViewText, where the former uses an external std::vector <Task> as storage, thus eliminating the additional copy, and the latter that duplicates data and color into 2D vectors for rendering non-task data.
This commit is contained in:
parent
ac60ee8d33
commit
1a833af2a4
10 changed files with 513 additions and 249 deletions
|
@ -43,6 +43,7 @@
|
|||
#include <Date.h>
|
||||
#include <Duration.h>
|
||||
#include <Table.h>
|
||||
#include <ViewText.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
#include <main.h>
|
||||
|
@ -54,6 +55,14 @@ extern Context context;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int shortUsage (std::string& outs)
|
||||
{
|
||||
ViewText view;
|
||||
view.width (context.getWidth ());
|
||||
view.add ("");
|
||||
view.add ("");
|
||||
view.add ("");
|
||||
|
||||
|
||||
|
||||
Table table;
|
||||
|
||||
table.addColumn (" ");
|
||||
|
@ -284,6 +293,9 @@ int shortUsage (std::string& outs)
|
|||
std::stringstream out;
|
||||
out << table.render ()
|
||||
<< "\n"
|
||||
<< "-------------\n"
|
||||
<< view.render ()
|
||||
<< "-------------\n"
|
||||
<< "Documentation for taskwarrior can be found using 'man task', "
|
||||
<< "'man taskrc', 'man task-tutorial', 'man task-color', 'man task-faq' "
|
||||
<< "or at http://taskwarrior.org"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue