MCPcopy Create free account
hub / github.com/XorTroll/Goldleaf / UpdateLines

Method UpdateLines

Goldleaf/source/ui/ui_FileContentLayout.cpp:115–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers 2

OnInputMethod · 0.95
LoadFileMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected