Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ImGui Minimal Console Feature #2099

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3ca2e69
Added binding for minimal console mode, added option and documentatio…
wizzebit Mar 23, 2025
d81f926
renamed option, added minimal console behavior
wizzebit Mar 23, 2025
721bbd3
Merge branch 'f3d-app:master' into ImGUI-minimal
wizzebit Mar 24, 2025
f87d1db
extra functionality, need to make comments
wizzebit Mar 25, 2025
6826c62
Merge branch 'f3d-app:master' into ImGUI-minimal
wizzebit Mar 26, 2025
8cfc009
new version of minimal console
wizzebit Mar 27, 2025
09f411c
Merge branch 'ImGUI-minimal' of https://github.com/wizzebit/f3d into …
wizzebit Mar 27, 2025
afb0c81
updated options.md
wizzebit Mar 28, 2025
d8da20a
Update library/src/interactor_impl.cxx
wizzebit Mar 28, 2025
0f8c910
Update library/src/interactor_impl.cxx
wizzebit Mar 28, 2025
4a6968a
Update vtkext/private/module/vtkF3DImguiConsole.cxx
wizzebit Mar 28, 2025
4cd259b
Update vtkext/private/module/vtkF3DImguiConsole.cxx
wizzebit Mar 28, 2025
ca8a7a8
Update vtkext/private/module/vtkF3DImguiConsole.cxx
wizzebit Mar 28, 2025
66d100d
minor fixes
wizzebit Mar 28, 2025
84830af
- changed minimal console format
wizzebit Mar 28, 2025
cb29634
Merge branch 'f3d-app:master' into ImGUI-minimal
wizzebit Mar 28, 2025
d264b9d
Update vtkext/private/module/vtkF3DImguiConsole.cxx
wizzebit Mar 28, 2025
c920c8b
Update vtkext/private/module/vtkF3DImguiConsole.h
wizzebit Mar 28, 2025
22d9533
Update vtkext/private/module/vtkF3DImguiConsole.h
wizzebit Mar 28, 2025
56e860a
attempt to fix github actions issue
wizzebit Mar 28, 2025
523c83c
Update vtkext/private/module/vtkF3DImguiConsole.h
wizzebit Mar 28, 2025
cf5e92e
added priority for console
wizzebit Mar 29, 2025
d990f59
Update library/src/interactor_impl.cxx
wizzebit Mar 29, 2025
a362e58
Update library/src/window_impl.cxx
wizzebit Mar 29, 2025
9f65921
merged master and imgui minimal mode branch
wizzebit Mar 30, 2025
5daeb5a
Update doc/libf3d/OPTIONS.md
wizzebit Mar 30, 2025
aab3048
Update doc/libf3d/OPTIONS.md
wizzebit Mar 30, 2025
9396a05
added colon binding
wizzebit Mar 30, 2025
f86fcc5
Merge branch 'ImGUI-minimal' of https://github.com/wizzebit/f3d into …
wizzebit Mar 30, 2025
2ec2782
fixed flashing issue
wizzebit Apr 4, 2025
e5ef03a
Fixed unresponsive badge issue
wizzebit Apr 4, 2025
463a92b
Merge branch 'f3d-app:master' into ImGUI-minimal
wizzebit Apr 4, 2025
99493fa
styling fixes
wizzebit Apr 4, 2025
b7f412d
styling
wizzebit Apr 4, 2025
a45c06b
styling
wizzebit Apr 4, 2025
31d4c02
styling
wizzebit Apr 4, 2025
2291004
styling
wizzebit Apr 4, 2025
26a4296
Merge branch 'ImGUI-minimal' of https://github.com/wizzebit/f3d into …
wizzebit Apr 4, 2025
91fb582
Update vtkF3DUIActor.h
wizzebit Apr 4, 2025
30eb9a3
Merge branch 'f3d-app:master' into ImGUI-minimal
wizzebit Apr 13, 2025
307fb93
Added Minimal Console Interaction Tests
wizzebit Apr 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions application/testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,13 @@ f3d_test(NAME TestInteractionConsoleAutoCompleteHide DATA BoxAnimated.gltf INTER
f3d_test(NAME TestInteractionConsoleHistory DATA BoxAnimated.gltf INTERACTION UI) #Escape;ro;Tab;45;Enter;set_c;Tab;top;Enter;Up;Up;Enter;Up;Up;Up;Up;Down;Down;Down;Down
f3d_test(NAME TestInteractionConsoleHistoryEmpty DATA BoxAnimated.gltf INTERACTION UI)#Escape;Up;Down
f3d_test(NAME TestInteractionConsoleHistoryHide DATA BoxAnimated.gltf INTERACTION UI)#Escape;a;Enter;b;Enter;Up;Escape;Escape;Escape;Up
f3d_test(NAME TestInteractionMinimalConsoleOpen DATA f3d.glb INTERACTION UI) #Colon
f3d_test(NAME TestInteractionMinimalConsoleEscape DATA f3d.glb INTERACTION UI) #Colon;Escape
f3d_test(NAME TestInteractionMinimalConsoleReturn DATA f3d.glb INTERACTION UI) #Colon;Return
f3d_test(NAME TestInteractionMinimalConsoleValidCommand DATA f3d.glb INTERACTION UI) #Colon;clear;Return
f3d_test(NAME TestInteractionMinimalConsoleInvalidCommand DATA f3d.glb INTERACTION UI) #Colon;foo;Return
f3d_test(NAME TestInteractionMinimalConsoleResize DATA f3d.glb INTERACTION UI) #Colon;foo;Return;Colon
f3d_test(NAME TestInteractionMinimalConsoleBadgeRemains DATA f3d.glb INTERACTION UI) #Colon;foo;Return;Colon;Escape

if (F3D_MODULE_TINYFILEDIALOGS)
f3d_test(NAME TestInteractionFileOpen INTERACTION NO_BASELINE ENV CTEST_OPEN_DIALOG_FILE=${F3D_SOURCE_DIR}/testing/data/cow.vtp)
Expand Down
1 change: 1 addition & 0 deletions doc/libf3d/OPTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ See the [APIs](#APIs) details below for more info.
| ui.scalar_bar | bool<br>false<br>render | Show _scalar bar_ of the coloring by data array. | \-\-bar |
| ui.cheatsheet | bool<br>false<br>render | Show a interactor cheatsheet | - |
| ui.console | bool<br>false<br>render | Show the console | - |
| ui.minimal_console | bool<br>false<br>render | Show the minimal console. Useful to execute a quick command and exit. | - |
| ui.filename | bool<br>false<br>render | Display the _filename info content_ on top of the window. | \-\-filename |
| ui.filename_info | string<br>-<br>render | Content of _filename info_ to display. | - |
| ui.font_file | path<br>optional<br>render | Use the provided FreeType compatible font file to display text.<br>Can be useful to display non-ASCII filenames. | \-\-font-file |
Expand Down
3 changes: 2 additions & 1 deletion doc/user/INTERACTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ Other hotkeys and interactions are available:

- <kbd>H</kbd>: key to toggle the display of a cheat sheet showing all these hotkeys and their statuses.
- <kbd>CTRL</kbd> + <kbd>Q</kbd>: close the window and quit F3D.
- <kbd>Esc</kbd>: display/hide the console.
- <kbd>Esc</kbd>: display the console or hide console/minimal console.
- <kbd>:</kbd>: display the minimal console
- <kbd>Space</kbd>: play the animation if any.
- <kbd>&larr;</kbd>: load the previous file if any and reset the camera.
- <kbd>&rarr;</kbd>: load the next file if any and reset the camera.
Expand Down
4 changes: 4 additions & 0 deletions library/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@
"type": "bool",
"default_value": "false"
},
"minimal_console": {
"type": "bool",
"default_value": "false"
},
"dropzone": {
"type": "bool",
"default_value": "false"
Expand Down
14 changes: 11 additions & 3 deletions library/src/interactor_impl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,17 @@ class interactor_impl::internals
const char* commandWithArgs = static_cast<const char*>(data);
self->Interactor.SetCommandBuffer(commandWithArgs);
}
else if (event == vtkF3DConsoleOutputWindow::ShowEvent ||
event == vtkF3DConsoleOutputWindow::HideEvent)
else if (event == vtkF3DConsoleOutputWindow::ShowEvent)
{
self->Options.ui.console = (event == vtkF3DConsoleOutputWindow::ShowEvent);
// Invoked when console badge is clicked
self->Options.ui.console = true;
}
else if (event == vtkF3DConsoleOutputWindow::HideEvent)
{
// Invoked when esc key is pressed while in minimal console or console display, or when
// something is submitted to minimal console
self->Options.ui.console = false;
self->Options.ui.minimal_console = false;
}

self->RenderRequested = true;
Expand Down Expand Up @@ -1158,6 +1165,7 @@ interactor& interactor_impl::initBindings()
#if F3D_MODULE_UI
this->addBinding({mod_t::NONE, "H"}, "toggle ui.cheatsheet", "Others", std::bind(docStr, "Toggle cheatsheet display"));
this->addBinding({mod_t::NONE, "Escape"}, "toggle ui.console", "Others", std::bind(docStr, "Toggle console display"));
this->addBinding({mod_t::ANY, "Colon"}, "toggle ui.minimal_console", "Others", std::bind(docStr, "Toggle minimal console display"));
#endif
this->addBinding({mod_t::CTRL, "Q"}, "stop_interactor", "Others", std::bind(docStr, "Stop the interactor"));
this->addBinding({mod_t::NONE, "Return"}, "reset_camera", "Others", std::bind(docStr, "Reset camera to initial parameters"));
Expand Down
1 change: 1 addition & 0 deletions library/src/window_impl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ void window_impl::UpdateDynamicOptions()
renderer->ShowMetaData(opt.ui.metadata);
renderer->ShowCheatSheet(opt.ui.cheatsheet);
renderer->ShowConsole(opt.ui.console);
renderer->ShowMinimalConsole(opt.ui.minimal_console);
renderer->ShowDropZone(opt.ui.dropzone);
renderer->SetDropZoneInfo(opt.ui.dropzone_info);
renderer->ShowArmature(opt.render.armature.enable);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions testing/baselines/TestInteractionMinimalConsoleEscape.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions testing/baselines/TestInteractionMinimalConsoleOpen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions testing/baselines/TestInteractionMinimalConsoleResize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions testing/baselines/TestInteractionMinimalConsoleReturn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading