- Removed debugging code.
- Implemented intra, extra and alternate colorization.
- Column::factory now parses <type>.<style> and properly initializes
  the column objects.
This commit is contained in:
Paul Beckingham 2011-04-29 20:06:21 -04:00
parent a722064d80
commit 9849b4082d
5 changed files with 78 additions and 49 deletions

View file

@ -44,7 +44,7 @@ int main (int argc, char** argv)
context.config.set ("fontunderline", true);
// Two sample tasks.
Task t1 ("[project:\"Home\"]");
Task t1 ("[project:\"Home\" priority:\"H\"]");
t1.id = 1;
Task t2 ("[project:\"Garden Care\"]");
t2.id = 11;
@ -65,15 +65,15 @@ int main (int argc, char** argv)
View view;
view.add (Column::factory ("id"));
view.add (Column::factory ("project"));
view.width (16);
view.add (Column::factory ("priority"));
view.width (20);
view.leftMargin (4);
view.extraPadding (0);
view.intraPadding (1);
view.colorHeader (header_color);
// Render the view.
std::cout << view.render (data, sequence)
<< std::endl;
std::cout << view.render (data, sequence);
t.is (view.lines (), 4, "View::lines == 4");
}