This is an archive of the discontinued LLVM Phabricator instance.

[LLDB][GUI] Refactor form drawing using subsurfaces
ClosedPublic

Authored by OmarEmaraDev on Aug 9 2021, 5:38 AM.

Details

Summary

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.

Diff Detail

Event Timeline

OmarEmaraDev created this revision.Aug 9 2021, 5:38 AM
OmarEmaraDev requested review of this revision.Aug 9 2021, 5:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2021, 5:38 AM

This is a reimplementation of D107182, which was committed and then reverted because the is_pad function is not universally supported. The updated patch adds an explicit type member to identify the backing object of the surface.

@clayborg Perhaps you missed this, it is essential the same as D107182 but without the unsupported function. It would be good to have this committed.

This revision was not accepted when it landed; it landed in state Needs Review.Aug 17 2021, 4:54 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.

@clayborg Perhaps you missed this, it is essential the same as D107182 but without the unsupported function. It would be good to have this committed.

It is in!