2019-08-13 Tom Tromey <tom@tromey.com>
+ * tui/tui-winsource.c (tui_erase_source_content)
+ (tui_show_source_content, tui_source_window_base::refresh_all):
+ Update.
+ * tui/tui-wingeneral.h
+ (tui_check_and_display_highlight_if_needed): Don't declare.
+ * tui/tui-wingeneral.c
+ (tui_win_info::check_and_display_highlight_if_needed): Rename from
+ check_and_display_highlight_if_needed.
+ * tui/tui-win.c (tui_rehighlight_all)
+ (tui_win_info::make_visible_with_new_height): Update.
+ * tui/tui-regs.c (tui_data_window::display_registers_from_line)
+ (tui_data_window::erase_data_content)
+ (tui_data_window::display_all_data): Update.
+ * tui/tui-data.h (struct tui_win_info)
+ <check_and_display_highlight_if_needed>: Declare.
+
+2019-08-13 Tom Tromey <tom@tromey.com>
+
* tui/tui-win.c (tui_resize_all): Call
tui_delete_invisible_windows.
* tui/tui-layout.c (show_layout): Call
return true;
}
+ void check_and_display_highlight_if_needed ();
+
/* Can this window ever be highlighted? */
bool can_highlight = true;
int
tui_data_window::display_registers_from_line (int line_no)
{
- tui_check_and_display_highlight_if_needed (this);
+ check_and_display_highlight_if_needed ();
if (!regs_content.empty ())
{
int element_no;
tui_data_window::erase_data_content (const char *prompt)
{
werase (handle);
- tui_check_and_display_highlight_if_needed (this);
+ check_and_display_highlight_if_needed ();
if (prompt != NULL)
{
int half_width = (width - 2) / 2;
{
erase_data_content (NULL);
delete_data_content_windows ();
- tui_check_and_display_highlight_if_needed (this);
+ check_and_display_highlight_if_needed ();
display_registers_from (0);
}
}
tui_rehighlight_all (void)
{
for (tui_win_info *win_info : all_tui_windows ())
- tui_check_and_display_highlight_if_needed (win_info);
+ win_info->check_and_display_highlight_if_needed ();
}
/* Resize all the windows based on the terminal size. This function
tui_win_info::make_visible_with_new_height ()
{
make_visible (true);
- tui_check_and_display_highlight_if_needed (this);
+ check_and_display_highlight_if_needed ();
do_make_visible_with_new_height ();
}
}
void
-tui_check_and_display_highlight_if_needed (struct tui_win_info *win_info)
+tui_win_info::check_and_display_highlight_if_needed ()
{
- if (win_info != NULL && win_info->can_highlight)
+ if (can_highlight)
{
- if (win_info->is_highlighted)
- tui_highlight_win (win_info);
+ if (is_highlighted)
+ tui_highlight_win (this);
else
- tui_unhighlight_win (win_info);
-
+ tui_unhighlight_win (this);
}
}
extern void tui_unhighlight_win (struct tui_win_info *);
extern void tui_make_window (struct tui_gen_win_info *, enum tui_box);
extern void tui_highlight_win (struct tui_win_info *);
-extern void tui_check_and_display_highlight_if_needed (struct tui_win_info *);
extern void tui_refresh_all ();
extern void tui_delete_win (WINDOW *window);
if (win_info->handle != NULL)
{
werase (win_info->handle);
- tui_check_and_display_highlight_if_needed (win_info);
+ win_info->check_and_display_highlight_if_needed ();
const char *no_src_str;
else
tui_erase_source_content (win_info);
- tui_check_and_display_highlight_if_needed (win_info);
+ win_info->check_and_display_highlight_if_needed ();
win_info->refresh_window ();
}
tui_source_window_base::refresh_all ()
{
tui_show_source_content (this);
- tui_check_and_display_highlight_if_needed (this);
+ check_and_display_highlight_if_needed ();
tui_erase_exec_info_content (this);
tui_update_exec_info (this);
}