Create subclasses for different window types
authorTom Tromey <tom@tromey.com>
Sun, 16 Jun 2019 16:13:13 +0000 (10:13 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 25 Jun 2019 13:48:24 +0000 (07:48 -0600)
commit33b906abfa7721128791883875d90394f8e2e7c2
tree9a70d1592112232a2d178afe1beea0bc3d28ea58
parente7e11af42dca6482302833c4106974176aa66052
Create subclasses for different window types

This changes the TUI so that each different major window type has its
own subclass.

gdb/ChangeLog
2019-06-25  Tom Tromey  <tom@tromey.com>

* tui/tui-data.h (struct tui_win_info): Make constructor
protected.  Make destructor virtual.  Add initializers.
(tui_source_window, tui_data_window, tui_cmd_window): New
classes.
* tui/tui-data.c (tui_win_info): Rename from init_win_info.  Now a
constructor.  Add "type" parameter.
(tui_source_window, tui_data_window, tui_cmd_window): New
constructors.
(tui_alloc_win_info): Instantiate the appropriate subclass.
gdb/ChangeLog
gdb/tui/tui-data.c
gdb/tui/tui-data.h