Introduce new layout code
authorTom Tromey <tom@tromey.com>
Tue, 8 Oct 2019 00:03:02 +0000 (18:03 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 11 Dec 2019 22:49:01 +0000 (15:49 -0700)
commit389e7ddbc2b08bd5cac8c8f44a03e93609fd43d1
treeec0e670d8caa28b67bccb1673e19041993200223
parentfb3184d8ee941e75d61b3d9ce8fcf7028c8877b8
Introduce new layout code

This introduces a new approach to window layout for the TUI.  The idea
behind this code is that a layout should be specified in a declarative
way, and then be applied by generic code that does not need to know
the specifics of every possible layout.

This patch itself does not change any behavior, because the new layout
engine isn't yet connected to anything.  That is, this merely
introduces the implementation.

This generic approach makes the code more maintainable.  It also
enables some future changes:

* New window types are simpler to add;
* User-specified layouts are possible; and
* Horizontal layouts are more attainable

gdb/ChangeLog
2019-12-11  Tom Tromey  <tom@tromey.com>

* tui/tui-layout.h (class tui_layout_base)
(class tui_layout_window, class tui_layout_split): New.
* tui/tui-layout.c (tui_get_window_by_name)
(tui_layout_window::clone, tui_layout_window::apply)
(tui_layout_window::get_sizes, tui_layout_window::add_split)
(tui_layout_split::add_window, tui_layout_split::clone)
(tui_layout_split::get_sizes)
(tui_layout_split::set_weights_from_heights)
(tui_layout_split::adjust_size, tui_layout_split::apply): New
functions.
(tui_layout_split::add_split, tui_layout_split::add_split)
(tui_layout_split::set_weights_from_heights)
(tui_layout_split::set_weights_from_heights): New functions.

Change-Id: I3a4cae666327b617d862aaa356f8179f945c6a4e
gdb/ChangeLog
gdb/tui/tui-layout.c
gdb/tui/tui-layout.h
This page took 0.026034 seconds and 4 git commands to generate.