aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-data.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-06-17 21:11:56 -0600
committerTom Tromey <tom@tromey.com>2019-06-25 07:48:43 -0600
commit5fcee43a960f0735c53a7c24823b2e4bc1460b9f (patch)
tree0d7da0fd71177323352c4eac6630a06556653f19 /gdb/tui/tui-data.h
parentd83f1fe65da075aa08ac7d6b6ef3508587c94600 (diff)
downloadgdb-5fcee43a960f0735c53a7c24823b2e4bc1460b9f.zip
gdb-5fcee43a960f0735c53a7c24823b2e4bc1460b9f.tar.gz
gdb-5fcee43a960f0735c53a7c24823b2e4bc1460b9f.tar.bz2
Introduce tui_win_info::make_visible_with_new_height
This changes make_visible_with_new_height to be a method on tui_win_info, letting us remove a spot that checks the window type. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-win.c (tui_source_window_base::update_tab_width): Call make_visible_with_new_height method. (tui_win_info::make_visible_with_new_height): New method. (tui_source_window_base::do_make_visible_with_new_height) (tui_data_window::do_make_visible_with_new_height) (tui_cmd_window::do_make_visible_with_new_height): New methods. (make_visible_with_new_height): Remove. (tui_resize_all, tui_adjust_win_heights): Use make_visible_with_new_height method. * tui/tui-data.h (struct tui_win_info) <do_make_visible_with_new_height, make_visible_with_new_height>: New methods. (struct tui_source_window_base, struct tui_data_window) (struct tui_cmd_window) <do_make_visible_with_new_height>: New methods.
Diffstat (limited to 'gdb/tui/tui-data.h')
-rw-r--r--gdb/tui/tui-data.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 7030e84..02bda6a 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -273,6 +273,10 @@ protected:
left_scroll and right_scroll. */
virtual void do_scroll_horizontal (int num_to_scroll) = 0;
+ /* Called after make_visible_with_new_height sets the new height.
+ Should update the window. */
+ virtual void do_make_visible_with_new_height () = 0;
+
public:
~tui_win_info () override
@@ -311,6 +315,9 @@ public:
{
}
+ /* Make the window visible after the height has been changed. */
+ void make_visible_with_new_height ();
+
/* Set whether this window is highglighted. */
void set_highlight (bool highlight)
{
@@ -343,6 +350,7 @@ protected:
DISABLE_COPY_AND_ASSIGN (tui_source_window_base);
void do_scroll_horizontal (int num_to_scroll) override;
+ void do_make_visible_with_new_height () override;
public:
@@ -465,6 +473,7 @@ protected:
void do_scroll_horizontal (int num_to_scroll) override
{
}
+ void do_make_visible_with_new_height () override;
};
struct tui_cmd_window : public tui_win_info
@@ -505,6 +514,8 @@ protected:
void do_scroll_horizontal (int num_to_scroll) override
{
}
+
+ void do_make_visible_with_new_height () override;
};
extern int tui_win_is_auxillary (enum tui_win_type win_type);