[Lldb-commits] [PATCH] D104395: [LLDB][GUI] Add initial forms support
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 22 16:07:35 PDT 2021
clayborg added a comment.
Just a few questions on how buttons should be handled since we are making new sweeping changes! See inlined comments and let me know what you think
================
Comment at: lldb/source/Core/IOHandlerCursesGUI.cpp:1396-1405
+ // ___<Form Name>_________________________________________________
+ // | |
+ // | |
+ // | Form elements here. |
+ // | |
+ // | ... |
+ // |-------------------------------------------------------------|
----------------
Should we put a cancel button and "Submit" button in the window's bottom line to save space? Any errors could be popped up with a modal dialog when the user tries to submit. The help for a form could specify that "Esc" will cancel the dialog and we wouldn't have to write it into the bottom of the window.
================
Comment at: lldb/source/Core/IOHandlerCursesGUI.cpp:1438
+
+ window.DrawTitleBox(window.GetName(), "Press Esc to cancel");
+
----------------
As mentioned above, it might be cleaner to put the "Cancel" and "Submit" into the bottom line of the dialog box to save space?
================
Comment at: lldb/source/Core/IOHandlerCursesGUI.cpp:1450
+ // Draw the centered submit button.
+ const char *button_text = "[Submit]";
+ int x = (window.GetWidth() - sizeof(button_text) - 1) / 2;
----------------
Maybe we want to add a ButtonDelegate class and each window can add a list of button delegates. Then the window draw code would know to draw them?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104395/new/
https://reviews.llvm.org/D104395
More information about the lldb-commits
mailing list