| 142 | } |
| 143 | |
| 144 | void FileContentLayout::LoadFile(const std::string &path, const std::string &pres_path, fs::Explorer *exp, const bool read_hex) { |
| 145 | this->path = path; |
| 146 | this->read_hex = read_hex; |
| 147 | this->file_exp = exp; |
| 148 | this->line_offset = 0; |
| 149 | this->x_offset = 0; |
| 150 | this->cur_read_lines_max_length = 0; |
| 151 | |
| 152 | if(read_hex) { |
| 153 | g_MainApplication->LoadCommonIconMenuData(true, cfg::Strings.GetString(507), CommonIconKind::BinaryFile, cfg::Strings.GetString(468) + ": " + pres_path); |
| 154 | } |
| 155 | else { |
| 156 | g_MainApplication->LoadCommonIconMenuData(true, cfg::Strings.GetString(508), CommonIconKind::TextFile, cfg::Strings.GetString(467) + ": " + pres_path); |
| 157 | } |
| 158 | |
| 159 | this->read_lines = this->ReadLines(this->line_offset, this->available_line_count); |
| 160 | this->UpdateLineLimits(); |
| 161 | this->UpdateLines(); |
| 162 | } |
| 163 | |
| 164 | } |
no test coverage detected