public formatted_text_cache(log_view parent, column_formatter_base.format_cell.location_type location) { parent_ = parent; location_ = location; }
// returns the overrides, sorted by index in the string to print public column_formatter_base.format_cell override_print(log_view parent, string text, int col_idx, column_formatter_base.format_cell.location_type location) { int row_idx = parent.item_index(this); int top_row_idx = parent.top_row_idx; string prev_text = ""; if (row_idx > 0) { prev_text = log_view_cell.cell_value(parent.item_at(row_idx - 1), col_idx); } int sel_index = parent.sel_row_idx_ui_thread; bool is_bokmark = parent.has_bookmark(line_idx); var cell = new column_formatter_base.format_cell(this, parent, col_idx, log_view_cell.cell_idx_to_type(col_idx), new formatted_text(text), row_idx, top_row_idx, sel_index, is_bokmark, prev_text, location); parent.formatter.format_before(cell); var print = override_print_from_all_places(parent, cell.format_text.text, col_idx); cell.format_text.add_parts(print); parent.formatter.format_after(cell); return(cell); }
// IMPORTANT: here, when doing preview, we don't show any results from find/find-as-you-type/running filters private formatted_text override_print(match_item i, string text, int col_idx, column_formatter_base.format_cell.location_type location) { int row_idx = list_.IndexOf(i); Debug.Assert(row_idx >= 0); int top_row_idx = top_idx(); string prev_text = ""; if (row_idx > 0) { prev_text = log_view_cell.cell_value(list_.GetItem(row_idx - 1).RowObject as match_item, col_idx); } int sel_index = parent_.sel_row_idx_ui_thread; bool is_bokmark = parent_.has_bookmark(i.line_idx); var cell = new column_formatter_base.format_cell(i, parent_, col_idx, log_view_cell.cell_idx_to_type(col_idx), new formatted_text(text), row_idx, top_row_idx, sel_index, is_bokmark, prev_text, location); formatter_.format_before(cell); formatter_.format_after(cell); return(cell.format_text); }
public formatted_text_cache(log_view parent, column_formatter_base.format_cell.location_type location) { parent_ = parent; location_ = location; }