Column: Implemented ::renderInteger
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user