/////////////////////////////////////////////////////////////////////////// Set the minimum and maximum widths for the value.
| 51 | //////////////////////////////////////////////////////////////////////////////// |
| 52 | // Set the minimum and maximum widths for the value. |
| 53 | void ColumnProject::measure(Task& task, unsigned int& minimum, unsigned int& maximum) { |
| 54 | minimum = maximum = 0; |
| 55 | if (task.has(_name)) { |
| 56 | std::string project = task.get(_name); |
| 57 | |
| 58 | if (_style == "parent") { |
| 59 | auto period = project.find('.'); |
| 60 | if (period != std::string::npos) project = project.substr(0, period); |
| 61 | } else if (_style == "indented") { |
| 62 | project = indentProject(project, " ", '.'); |
| 63 | } |
| 64 | |
| 65 | minimum = longestWord(project); |
| 66 | maximum = utf8_width(project); |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | //////////////////////////////////////////////////////////////////////////////// |
| 71 | void ColumnProject::render(std::vector<std::string>& lines, Task& task, int width, Color& color) { |
nothing calls this directly
no test coverage detected