[LLDB][GUI] Refactor form drawing using subsurfaces
authorOmar Emara <mail@OmarEmara.dev>
Tue, 17 Aug 2021 23:06:46 +0000 (16:06 -0700)
committerGreg Clayton <gclayton@fb.com>
Tue, 17 Aug 2021 23:54:41 +0000 (16:54 -0700)
commit79e950a29e004f2f0ac590f6090b61b3043503e2
treeaaff7519672e9b37c0b8c538249923b2ce7a3929
parent0479afb3d6a31668631464653f07154d6850e4a1
[LLDB][GUI] Refactor form drawing using subsurfaces

This patch adds a new method SubSurface to the Surface class. The method
returns another surface that is a subset of this surface. This is
important to further abstract away drawing from the ncurses objects. For
instance, fields could previously be drawn on subpads only but can now
be drawn on any surface. This is needed to create the file search
dialogs and similar functionalities.

There is an opportunity to refactor window drawing in general using
surfaces, but we shall consider this separately later.

Differential Revision: https://reviews.llvm.org/D107761
lldb/source/Core/IOHandlerCursesGUI.cpp