diff --git a/application/testing/CMakeLists.txt b/application/testing/CMakeLists.txt index d491b06555..0f86b53317 100644 --- a/application/testing/CMakeLists.txt +++ b/application/testing/CMakeLists.txt @@ -821,6 +821,7 @@ f3d_test(NAME TestInteractionConsoleOpenWarningClick DATA f3d.glb ARGS --positio f3d_test(NAME TestInteractionConsoleToggleGrid DATA f3d.glb INTERACTION UI) #Escape;toggle render.grid.enable;Return;Escape f3d_test(NAME TestInteractionConsoleInvalidCommand DATA f3d.glb INTERACTION UI) #Escape;foo;Return f3d_test(NAME TestInteractionConsoleInvalidOption DATA f3d.glb INTERACTION UI) #Escape;toggle foo;Return +f3d_test(NAME TestInteractionConsoleClear DATA dragon.vtu INTERACTION UI) #Escape;clear;Return f3d_test(NAME TestInteractionConsoleTypingSceneInfo DATA f3d.glb INTERACTION UI) #Escape;e;Escape;printt;BackSpace;_scee;Left;Right;_info;Return if (F3D_MODULE_TINYFILEDIALOGS) diff --git a/doc/user/COMMANDS.md b/doc/user/COMMANDS.md index d3942a6324..85576d9ab9 100644 --- a/doc/user/COMMANDS.md +++ b/doc/user/COMMANDS.md @@ -19,6 +19,8 @@ The libf3d provides a few commands, many related to manipulating libf3d (options `reset option.name`: A command to reset a libf3d option to its default values, eg: `reset render.background.blur.coc`. +`clear`: A command to clear ImGui console. No argmument. + `print option.name`: A command to print the value of an libf3d option, eg: `print scene.up.direction`. `cycle_animation`: A specific command to cycle `scene.animation.index` option using model information, No argument. diff --git a/testing/baselines/TestInteractionConsoleClear.png b/testing/baselines/TestInteractionConsoleClear.png new file mode 100644 index 0000000000..1f265e22ce --- /dev/null +++ b/testing/baselines/TestInteractionConsoleClear.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:adc89bb41a18c71ffe2941a80b2d0a45f2976c406ef3cc9eb8078f8f02ff4e8e +size 17706 diff --git a/testing/recordings/TestInteractionConsoleClear.log b/testing/recordings/TestInteractionConsoleClear.log new file mode 100644 index 0000000000..8c6b809c4c --- /dev/null +++ b/testing/recordings/TestInteractionConsoleClear.log @@ -0,0 +1,129 @@ +# StreamVersion 1.2 +RenderEvent 0 0 0 0 0 0 0 + +KeyPressEvent 0 0 0 27 1 Escape 0 +CharEvent 0 0 0 27 1 Escape 0 +KeyReleaseEvent 0 0 0 27 1 Escape 0 + +KeyPressEvent 0 0 0 101 1 e 0 +CharEvent 0 0 0 101 1 e 0 +KeyReleaseEvent 0 0 0 101 1 e 0 + +KeyPressEvent 0 0 0 27 1 Escape 0 +CharEvent 0 0 0 27 1 Escape 0 +KeyReleaseEvent 0 0 0 27 1 Escape 0 + +KeyPressEvent 0 0 0 112 1 p 0 +CharEvent 0 0 0 112 1 p 0 +KeyReleaseEvent 0 0 0 112 1 p 0 + +KeyPressEvent 0 0 0 114 1 r 0 +CharEvent 0 0 0 114 1 r 0 +KeyReleaseEvent 0 0 0 114 1 r 0 + +KeyPressEvent 0 0 0 105 1 i 0 +CharEvent 0 0 0 105 1 i 0 +KeyReleaseEvent 0 0 0 105 1 i 0 + +KeyPressEvent 0 0 0 110 1 n 0 +CharEvent 0 0 0 110 1 n 0 +KeyReleaseEvent 0 0 0 110 1 n 0 + +KeyPressEvent 0 0 0 116 1 t 0 +CharEvent 0 0 0 116 1 t 0 +KeyReleaseEvent 0 0 0 116 1 t 0 + +KeyPressEvent 0 0 0 116 1 t 0 +CharEvent 0 0 0 116 1 t 0 +KeyReleaseEvent 0 0 0 116 1 t 0 + +KeyPressEvent 0 0 0 8 1 BackSpace 0 +CharEvent 0 0 0 8 1 BackSpace 0 +KeyReleaseEvent 0 0 0 8 1 BackSpace 0 + +KeyPressEvent 0 0 1 0 1 Shift_L 0 +KeyPressEvent 0 0 1 95 1 underscore 0 +CharEvent 0 0 1 95 1 underscore 0 +KeyReleaseEvent 0 0 1 95 1 underscore 0 +KeyReleaseEvent 0 0 0 0 1 Shift_L 0 + +KeyPressEvent 0 0 0 115 1 s 0 +CharEvent 0 0 0 115 1 s 0 +KeyReleaseEvent 0 0 0 115 1 s 0 + +KeyPressEvent 0 0 0 99 1 c 0 +CharEvent 0 0 0 99 1 c 0 +KeyReleaseEvent 0 0 0 99 1 c 0 + +KeyPressEvent 0 0 0 101 1 e 0 +CharEvent 0 0 0 101 1 e 0 +KeyReleaseEvent 0 0 0 101 1 e 0 + +KeyPressEvent 0 0 0 101 1 e 0 +CharEvent 0 0 0 101 1 e 0 +KeyReleaseEvent 0 0 0 101 1 e 0 + +KeyPressEvent 0 0 0 0 1 Left 0 +KeyReleaseEvent 0 0 0 0 1 Left 0 + +KeyPressEvent 0 0 0 110 1 n 0 +CharEvent 0 0 0 110 1 n 0 +KeyReleaseEvent 0 0 0 110 1 n 0 + +KeyPressEvent 0 0 0 0 1 Right 0 +KeyReleaseEvent 0 0 0 0 1 Right 0 + +KeyPressEvent 0 0 1 0 1 Shift_L 0 +KeyPressEvent 0 0 1 95 1 underscore 0 +CharEvent 0 0 1 95 1 underscore 0 +KeyReleaseEvent 0 0 1 95 1 underscore 0 +KeyReleaseEvent 0 0 0 0 1 Shift_L 0 + +KeyPressEvent 0 0 0 105 1 i 0 +CharEvent 0 0 0 105 1 i 0 +KeyReleaseEvent 0 0 0 105 1 i 0 + +KeyPressEvent 0 0 0 110 1 n 0 +CharEvent 0 0 0 110 1 n 0 +KeyReleaseEvent 0 0 0 110 1 n 0 + +KeyPressEvent 0 0 0 102 1 f 0 +CharEvent 0 0 0 102 1 f 0 +KeyReleaseEvent 0 0 0 102 1 f 0 + +KeyPressEvent 0 0 0 111 1 o 0 +CharEvent 0 0 0 111 1 o 0 +KeyReleaseEvent 0 0 0 111 1 o 0 + +KeyPressEvent 0 0 0 13 1 Return 0 +CharEvent 0 0 0 13 1 Return 0 +KeyReleaseEvent 0 0 0 13 1 Return 0 + +KeyPressEvent 0 0 0 99 1 c 0 +CharEvent 0 0 0 99 1 c 0 +KeyReleaseEvent 0 0 0 99 1 c 0 + + +KeyPressEvent 0 0 0 108 1 l 0 +CharEvent 0 0 0 108 1 l 0 +KeyReleaseEvent 0 0 0 108 1 l 0 + + +KeyPressEvent 0 0 0 101 1 e 0 +CharEvent 0 0 0 101 1 e 0 +KeyReleaseEvent 0 0 0 101 1 e 0 + + +KeyPressEvent 0 0 0 97 1 a 0 +CharEvent 0 0 0 97 1 a 0 +KeyReleaseEvent 0 0 0 97 1 a 0 + + +KeyPressEvent 0 0 0 114 1 r 0 +CharEvent 0 0 0 114 1 r 0 +KeyReleaseEvent 0 0 0 114 1 r 0 + + +KeyPressEvent 0 0 0 13 1 Return 0 +CharEvent 0 0 0 13 1 Return 0 +KeyReleaseEvent 0 0 0 13 1 Return 0 \ No newline at end of file diff --git a/vtkext/private/module/vtkF3DImguiConsole.cxx b/vtkext/private/module/vtkF3DImguiConsole.cxx index 7c3672d69b..87e60db1f9 100644 --- a/vtkext/private/module/vtkF3DImguiConsole.cxx +++ b/vtkext/private/module/vtkF3DImguiConsole.cxx @@ -205,9 +205,3 @@ void vtkF3DImguiConsole::Clear() this->Pimpl->NewError = false; this->Pimpl->NewWarning = false; } - -//---------------------------------------------------------------------------- -size_t vtkF3DImguiConsole::GetLogsSize() -{ - return this->Pimpl->Logs.size(); -} \ No newline at end of file diff --git a/vtkext/private/module/vtkF3DImguiConsole.h b/vtkext/private/module/vtkF3DImguiConsole.h index fd78e8539c..e62fb427ad 100644 --- a/vtkext/private/module/vtkF3DImguiConsole.h +++ b/vtkext/private/module/vtkF3DImguiConsole.h @@ -48,11 +48,6 @@ class vtkF3DImguiConsole : public vtkF3DConsoleOutputWindow */ void Clear(); - /** - * Get console history size - */ - size_t GetLogsSize(); - protected: vtkF3DImguiConsole(); ~vtkF3DImguiConsole() override;