has_bookmark() приватный Метод

private has_bookmark ( int line_idx ) : bool
line_idx int
Результат bool
Пример #1
0
        public virtual Color fg(log_view parent)
        {
            Color result;

#if old_code
            if (parent.has_bookmark(base.line_idx))
            {
                result = parent.bookmark_fg;
            }
            else
#endif
            if (override_fg != util.transparent)
            {
                result = override_fg;
            }
            else if (parent.filter.matches.binary_search(line_idx).Item2 < 0)
            {
                result = font_info.full_log_gray.fg;
            }
            else
            {
                result = font.fg;
            }

            if (result == util.transparent)
            {
                result = app.inst.fg;
            }
            return(result);
        }
Пример #2
0
        public virtual Color bg(log_view parent)
        {
            Color result;

#if old_code
            if (parent.has_bookmark(base.line_idx))
            {
                result = parent.bookmark_bg;
            }
            else
#endif
            if (override_bg != util.transparent)
            {
                result = override_bg;
            }
            else
            {
                result = font.bg;
            }

            // 1.6.6 - if user has searched for something only visible in description pane, show it a bit darker, so the user knows it's a match on this line
            if (result == util.transparent)
            {
                if (parent.is_searching)
                {
                    var  view_visible        = parent.view_visible_column_types();
                    bool search_matches_view = search_matches_any_column(parent, view_visible);
                    if (!search_matches_view)
                    {
                        var all_visible     = parent.all_visible_column_types();
                        var details_visible = all_visible.Where(x => !view_visible.Contains(x)).ToList();
                        if (search_matches_any_column(parent, details_visible))
                        {
                            result = search_form_history.inst.default_search.bg;
                        }
                    }
                }
            }


            if (result == util.transparent)
            {
                result = app.inst.bg;
            }
            return(result);
        }
Пример #3
0
        public virtual Color bg(log_view parent)
        {
            Color result;

            if (parent.has_bookmark(base.line_idx))
            {
                result = parent.bookmark_bg;
            }
            else if (override_bg != util.transparent)
            {
                result = override_bg;
            }
            else
            {
                result = font.bg;
            }

            if (result == util.transparent)
            {
                result = app.inst.bg;
            }
            return(result);
        }
Пример #4
0
        // 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);
        }
Пример #5
0
        public virtual Color fg(log_view parent) {
            Color result;

#if old_code
            if (parent.has_bookmark(base.line_idx))
                result = parent.bookmark_fg;
            else 
#endif
            if (override_fg != util.transparent)
                result = override_fg;
            else if (parent.filter.matches.binary_search(line_idx).Item2 < 0)
                result = font_info.full_log_gray.fg;
            else 
                result = font.fg;

            if (result == util.transparent)
                result = app.inst.fg;
            return result;
        }
Пример #6
0
        // 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;
        } 
Пример #7
0
        public virtual Color bg(log_view parent) {
            Color result;
#if old_code
            if (parent.has_bookmark(base.line_idx))
                result = parent.bookmark_bg;
            else 
#endif
            if (override_bg != util.transparent)
                result = override_bg;
            else 
                result = font.bg;

            // 1.6.6 - if user has searched for something only visible in description pane, show it a bit darker, so the user knows it's a match on this line
            if (result == util.transparent) 
                if (parent.is_searching()) {
                    var view_visible = parent.view_visible_column_types();
                    bool search_matches_view = search_matches_any_column(parent, view_visible);
                    if (!search_matches_view) {
                        var all_visible = parent.all_visible_column_types();
                        var details_visible = all_visible.Where( x => !view_visible.Contains(x) ).ToList();
                        if (search_matches_any_column(parent, details_visible))
                            result = search_form_history.inst.default_search.bg;
                    }
                }
            

            if (result == util.transparent)
                result = app.inst.bg;
            return result;
        }
Пример #8
0
        public virtual Color bg(log_view parent) {
            Color result;
            if (parent.has_bookmark(base.line_idx))
                result = parent.bookmark_bg;
            else if (override_bg != util.transparent)
                result = override_bg;
            else 
                result = font.bg;

            if (result == util.transparent)
                result = app.inst.bg;
            return result;
        }