///////////////////////////////////////////////////////////////////////////
| 69 | |
| 70 | //////////////////////////////////////////////////////////////////////////////// |
| 71 | void ColumnProject::render(std::vector<std::string>& lines, Task& task, int width, Color& color) { |
| 72 | if (task.has(_name)) { |
| 73 | std::string project = task.get(_name); |
| 74 | if (_style == "parent") { |
| 75 | auto period = project.find('.'); |
| 76 | if (period != std::string::npos) project = project.substr(0, period); |
| 77 | } else if (_style == "indented") { |
| 78 | project = indentProject(project, " ", '.'); |
| 79 | } |
| 80 | |
| 81 | std::vector<std::string> raw; |
| 82 | wrapText(raw, project, width, _hyphenate); |
| 83 | |
| 84 | for (const auto& i : raw) renderStringLeft(lines, width, color, i); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | //////////////////////////////////////////////////////////////////////////////// |
| 89 | void ColumnProject::modify(Task& task, const std::string& value) { |
nothing calls this directly
no test coverage detected