OmarEmaraDev added a comment.

@clayborg I tried implementing scrolling mechanisms as suggested. My first 
trial essentially defined a "visible area" rectangle which gets updated with 
every time the selection changes, then when it comes to drawing, each field 
checks if it is completely contained in the visible area and draws itself with 
an offset that we get from from the visible area origin. This worked, but 
fields that spans multiple columns can completely disappear leaving mostly no 
fields on the window, so it worked in most cases, but not all. My second trial 
was about drawing to an ncurses pad that is large enough to fit all contents, 
then the window is refreshed from that pad. This used manual ncurses calls 
because we don't support pads at the moment, so I scratched that for now. I 
think support for pads would be good for those kind of applications in the 
future. I plan to work on a proposal that would include support for pads and 
lightweight subwindows, I will detail that later.

I eventually opted to create "pages" for the forms. Basically, during form 
construction, if the number of fields is large and can't fit in the window, the 
user can call `NewPage()` to create a new page, all fields after that call gets 
added to the new page. As the user selects fields, the form can scroll to 
different pages. This is similar to the ncurses form scrolling functionality. 
Visual indicator for the current pages and the active page is added to the form 
if there is more than one page. I hope this solution is satisfactory.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104395/new/

https://reviews.llvm.org/D104395

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to