Looking for some suggestions on handling user interaction in a formula builder. Example UI attached.
I'm implementing a formula builder for mathematical expressions that can also handle objects within my application. The screenshot is a good example of the UI type.
I'm fine with:
constraining the Formula box to specific characters, e.g. mathematical operators, parenthesis, etc.
managing a hierarchy of functions (Insert Functions) and adding these to the formula box
I'm struggling a little with:
a nice way to enable deletion of an inserted Function from the Formula box. I'm toying with:
having the Function displayed as a small button (but then it's not an editable text box that they can use to type operators), then click to select and the delete key, or a right click popup menu, or a popup menu enabling the Function to be changed or deleted. What's most intuitive I think would be to have the user place the cursor to the right of the button or object and press the delete key. I feel like I have an inherent conflict between avoiding displaying it in square brackets (which seems nasty) and having it as a widget
a nice way to handle user-inserted parentheses to deal with calculation precedence. If it's a freely editable text box (with character input constraints) then this is quite simple (subject to syntax checking). If it's more object/wizard-based, then I'm struggling with how a user can define where they want to place the parentheses
Any tips, suggestions, examples would be great. Thx!
Version/Branch of Dear ImGui:
Version 1.95.1, Branch: master
Back-ends:
imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler, OS:
Windows 10 + MSVC 2022
Full config/build information:
No response
Details:
Looking for some suggestions on handling user interaction in a formula builder. Example UI attached.
I'm implementing a formula builder for mathematical expressions that can also handle objects within my application. The screenshot is a good example of the UI type.
I'm fine with:
I'm struggling a little with:
Any tips, suggestions, examples would be great. Thx!
Screenshots/Video:
Minimal, Complete and Verifiable Example code:
No response