tui_gen_win_info::refresh_window ()
{
if (handle != NULL)
- wrefresh (handle);
+ {
+ touchwin (handle);
+ wrefresh (handle);
+ }
}
/* See tui-data.h. */
void
tui_data_window::refresh_window ()
{
- if (content_size > 0)
+ if (!regs_content.empty ())
{
- for (int i = 0; i < content_size; i++)
+ for (auto &&win : regs_content)
{
- struct tui_gen_win_info *data_item_win_ptr;
-
- data_item_win_ptr = content[i]->which_element.data_window;
- if (data_item_win_ptr != NULL
- && data_item_win_ptr->handle != NULL)
- wrefresh (data_item_win_ptr->handle);
+ if (win != NULL)
+ win->refresh_window ();
}
}
- else
- tui_gen_win_info::refresh_window ();
+ tui_gen_win_info::refresh_window ();
}
/* Function to delete the curses window, checking for NULL. */
{
if (window != NULL)
delwin (window);
-
- return;
}
void
tui_check_and_display_highlight_if_needed (struct tui_win_info *win_info)
{
- if (win_info != NULL && win_info->type != CMD_WIN)
+ if (win_info != NULL && win_info->can_highlight)
{
if (win_info->is_highlighted)
tui_highlight_win (win_info);
{
if (!is_visible)
{
- tui_make_window (this, (tui_win_is_auxillary (type)
+ tui_make_window (this, (tui_win_is_auxiliary (type)
? DONT_BOX_WINDOW : BOX_WINDOW));
is_visible = true;
}
static void
make_all_visible (bool visible)
{
- int i;
-
- for (i = 0; i < MAX_MAJOR_WINDOWS; i++)
- {
- if (tui_win_list[i] != NULL)
- tui_win_list[i]->make_visible (visible);
- }
-
- return;
+ for (tui_win_info *win_info : all_tui_windows ())
+ win_info->make_visible (visible);
}
void
/* See tui-data.h. */
void
-tui_win_info::refresh ()
+tui_source_window_base::refresh_window ()
{
- touchwin (handle);
- refresh_window ();
-}
-
-/* See tui-data.h. */
-
-void
-tui_source_window_base::refresh ()
-{
- touchwin (execution_info->handle);
execution_info->refresh_window ();
- tui_win_info::refresh ();
+ tui_win_info::refresh_window ();
}
/* Function to refresh all the windows currently displayed. */
void
-tui_refresh_all (struct tui_win_info **list)
+tui_refresh_all ()
{
- int type;
- struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
+ struct tui_locator_window *locator = tui_locator_win_info_ptr ();
- for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
+ for (tui_win_info *win_info : all_tui_windows ())
{
- if (list[type] && list[type]->is_visible)
- list[type]->refresh ();
+ if (win_info->is_visible)
+ win_info->refresh_window ();
}
if (locator->is_visible)
- {
- touchwin (locator->handle);
- locator->refresh_window ();
- }
+ locator->refresh_window ();
}