| 113 | } |
| 114 | |
| 115 | void FileContentLayout::UpdateLines() { |
| 116 | std::string new_cnt; |
| 117 | for(auto &line: this->read_lines) { |
| 118 | const auto l_offset = std::min(line.length(), static_cast<size_t>(this->x_offset)); |
| 119 | const auto l_length = std::min(line.length() - l_offset, static_cast<size_t>(this->max_line_length)); |
| 120 | |
| 121 | const auto ad_line = line.substr(l_offset, l_length); |
| 122 | new_cnt += ad_line + "\n"; |
| 123 | } |
| 124 | this->cnt_text->SetText(new_cnt); |
| 125 | } |
| 126 | |
| 127 | FileContentLayout::FileContentLayout() { |
| 128 | const s32 text_x = 15; |