MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / render

Method render

src/columns/ColProject.cpp:71–86  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

69
70////////////////////////////////////////////////////////////////////////////////
71void 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////////////////////////////////////////////////////////////////////////////////
89void ColumnProject::modify(Task& task, const std::string& value) {

Callers

nothing calls this directly

Calls 4

indentProjectFunction · 0.85
findMethod · 0.80
hasMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected