Column: Implemented ::renderInteger

This commit is contained in:
Paul Beckingham 2015-10-31 15:16:51 -04:00
parent dc72a22887
commit b8ae54275e
2 changed files with 16 additions and 1 deletions

View file

@ -25,9 +25,9 @@
////////////////////////////////////////////////////////////////////////////////
#include <cmake.h>
#include <Column.h>
#include <algorithm>
#include <Context.h>
#include <Column.h>
#include <ColDepends.h>
#include <ColDescription.h>
#include <ColDue.h>
@ -265,3 +265,15 @@ bool Column::validate (std::string& input)
}
////////////////////////////////////////////////////////////////////////////////
void Column::renderInteger (
std::vector <std::string>& lines,
int width,
Color& color,
int value)
{
lines.push_back (
color.colorize (
rightJustify (value, width)));
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -65,6 +65,9 @@ public:
virtual void render (std::vector <std::string>&, Task&, int, Color&) {};
virtual std::string modify (std::string& input) { return input; };
protected:
void renderInteger (std::vector <std::string>&, int, Color&, int);
protected:
std::string _name;
std::string _type;