[gdb/tui] Factor out tui_noscroll_window et al
I noticed that tui_locator_window has an empty do_scroll_vertical and
do_scroll_horizontal, like tui_cmd_window, but unlike tui_cmd_window doesn't
have:
...
bool can_scroll () const override
{
return false;
}
...
I suspect that it probably doesn't matter, but regardless it's good to have
the same implementations of basic properties in all windows.
Ensure this by adding a class tui_noscroll_window, that has:
- an empty do_scroll_vertical and do_scroll_horizontal, and
- a can_scroll returning false
which both tui_locator_window and tui_cmd_window inherit.
Make all methods final to ensure no accidental overrides are left in the
inheriting classes.
Likewise add new classes representing basic window properties:
- tui_nofocus_window,
- tui_oneline_window,
- tui_nobox_window,
- tui_norefresh_window, and
- tui_always_visible_window.
The changes are only a refactoring, apart from adding the "final", which does
limit the range of behaviours for subclasses.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>