mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Column: Implemented ::renderStringLeft, ::renderStringRight
This commit is contained in:
parent
43e4f8a485
commit
04c3e9e537
2 changed files with 28 additions and 2 deletions
|
@ -292,3 +292,27 @@ void Column::renderDouble (
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Column::renderStringLeft (
|
||||
std::vector <std::string>& lines,
|
||||
int width,
|
||||
Color& color,
|
||||
const std::string& value)
|
||||
{
|
||||
lines.push_back (
|
||||
color.colorize (
|
||||
leftJustify (value, width)));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Column::renderStringRight (
|
||||
std::vector <std::string>& lines,
|
||||
int width,
|
||||
Color& color,
|
||||
const std::string& value)
|
||||
{
|
||||
lines.push_back (
|
||||
color.colorize (
|
||||
rightJustify (value, width)));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -66,8 +66,10 @@ public:
|
|||
virtual std::string modify (std::string& input) { return input; };
|
||||
|
||||
protected:
|
||||
void renderInteger (std::vector <std::string>&, int, Color&, int);
|
||||
void renderDouble (std::vector <std::string>&, int, Color&, double);
|
||||
void renderInteger (std::vector <std::string>&, int, Color&, int);
|
||||
void renderDouble (std::vector <std::string>&, int, Color&, double);
|
||||
void renderStringLeft (std::vector <std::string>&, int, Color&, const std::string&);
|
||||
void renderStringRight (std::vector <std::string>&, int, Color&, const std::string&);
|
||||
|
||||
protected:
|
||||
std::string _name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue