|
FlowArithmeticCalculator 1.0.0
Flow Arithmetic Calculator
|
Class responsible for managing the GLFW main window, any Qt dialogs / modals and their lifecycle. More...
#include <GLFWQtWindowImpl.h>
Inheritance diagram for gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >:
Collaboration diagram for gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >:Public Member Functions | |
| GLFWQtWindowImpl (int width, int height, const char *title) | |
| Constructs a new GLFWQtWindowImpl. | |
| GLFWQtWindowImpl (const GLFWQtWindowImpl &)=delete | |
| GLFWQtWindowImpl & | operator= (const GLFWQtWindowImpl &)=delete |
| GLFWQtWindowImpl (GLFWQtWindowImpl &&)=delete | |
| GLFWQtWindowImpl & | operator= (GLFWQtWindowImpl &&)=delete |
| void | postInitialize () |
| ~GLFWQtWindowImpl () override | |
| Destructor that cleans up the GLFW window and terminates GLFW. | |
| void | run () override |
| Runs the main window loop. | |
| operator GLFWwindow * () const | |
| Allows conversion of GLFWQtWindowImpl instance that gets the underlying GLFW window handle. | |
Public Member Functions inherited from gui::window::WindowBase< Canvas > | |
| WindowBase (int width, int height, std::shared_ptr< spdlog::logger > logger) | |
| ~WindowBase () override=default | |
| WindowBase (const WindowBase &)=delete | |
| WindowBase & | operator= (const WindowBase &)=delete |
| WindowBase (WindowBase &&) noexcept=default | |
| WindowBase & | operator= (WindowBase &&) noexcept=default |
| void | handleMouseDown () |
| Handles the mouse down event; should be called internally by the window implementation. | |
| void | handleMouseUp () |
| Handles the mouse up event; should be called internally by the window implementation. | |
| void | handleNumericKeyPress (int number) |
| Handles the numeric key press event; should be called internally by the window implementation. | |
| void | handleEscapeKeyPress () |
| Handles the ESC key press event; should be called internally by the window implementation. | |
| void | handleRightClick () |
| Handles the right click event; should be called internally by the window implementation. | |
| void | handleMouseMove (int x, int y) |
| Handles the mouse move event; should be called internally by the window implementation. | |
| business_logic::geometry::Size2D | getWindowSize () override |
| Get the window size. | |
| business_logic::geometry::Size2D | getFramebufferSize () override |
| Get the framebuffer size. | |
Public Member Functions inherited from business_logic::delegate::IWindowDelegate | |
| virtual | ~IWindowDelegate ()=default |
Static Public Member Functions | |
| static GLFWQtWindowImpl< RendererImpl, Canvas > | MakeFullscreen (const char *title) |
| Constructs a new GLFWQtWindowImpl that takes the full size of the primary monitor. | |
Private Member Functions | |
| bool | shouldClose () const override |
| Whether the window should close. | |
| void | initializeGLFWWindow (int width, int height, const char *title) |
| Initializes the GLFW window. | |
| void | focusWindow () override |
| Focus the window. | |
| void | showWarning (const std::string &title, const std::string &message) override |
| Show a warning message. | |
| std::optional< FloatingPoint > | promptFloatingPointInput (const std::string &title, const std::string &message, const std::optional< FloatingPoint > &defaultValue) override |
| Prompt for a floating point input. | |
| bool | promptConfirmation (const std::string &title, const std::string &message) override |
| Prompt for user confirmation. | |
Static Private Member Functions | |
| static void | initGLFW () |
| Initializes GLFW. | |
| static void | handleWindowResized (GLFWwindow *window, int winWidth, int winHeight) |
| Handles the window resized event. | |
Private Attributes | |
| GLFWwindow * | glfwWindow {} |
| std::unique_ptr< RendererImpl > | renderer |
Static Private Attributes | |
| static bool | initializedGLFW |
Additional Inherited Members | |
Protected Member Functions inherited from business_logic::Loggable< GLFWQtWindowImpl< RendererImpl, Canvas > > | |
| Loggable () | |
Protected Member Functions inherited from gui::window::WindowBase< Canvas > | |
| WindowBase (int width, int height, std::shared_ptr< spdlog::logger > logger) | |
| ~WindowBase () override=default | |
| WindowBase (const WindowBase &)=delete | |
| WindowBase & | operator= (const WindowBase &)=delete |
| WindowBase (WindowBase &&) noexcept=default | |
| WindowBase & | operator= (WindowBase &&) noexcept=default |
| void | handleMouseDown () |
| Handles the mouse down event; should be called internally by the window implementation. | |
| void | handleMouseUp () |
| Handles the mouse up event; should be called internally by the window implementation. | |
| void | handleNumericKeyPress (int number) |
| Handles the numeric key press event; should be called internally by the window implementation. | |
| void | handleEscapeKeyPress () |
| Handles the ESC key press event; should be called internally by the window implementation. | |
| void | handleRightClick () |
| Handles the right click event; should be called internally by the window implementation. | |
| void | handleMouseMove (int x, int y) |
| Handles the mouse move event; should be called internally by the window implementation. | |
| business_logic::geometry::Size2D | getWindowSize () override |
| Get the window size. | |
| business_logic::geometry::Size2D | getFramebufferSize () override |
| Get the framebuffer size. | |
Protected Member Functions inherited from business_logic::delegate::IWindowDelegate | |
| virtual | ~IWindowDelegate ()=default |
Protected Attributes inherited from business_logic::Loggable< GLFWQtWindowImpl< RendererImpl, Canvas > > | |
| std::shared_ptr< spdlog::logger > | logger |
Protected Attributes inherited from gui::window::WindowBase< Canvas > | |
| std::shared_ptr< business_logic::BlocksManager > | blocksManager |
| std::shared_ptr< spdlog::logger > | logger |
| business_logic::geometry::Size2D | winSize |
| business_logic::geometry::Size2D | framebufferSize |
Class responsible for managing the GLFW main window, any Qt dialogs / modals and their lifecycle.
| RendererImpl | The renderer implementation type |
| Canvas | The canvas type |
Definition at line 25 of file GLFWQtWindowImpl.h.
|
inlineexplicit |
Constructs a new GLFWQtWindowImpl.
| width | Initial window width |
| height | Initial window height |
| title | GLFWQtWindowImpl title |
Definition at line 35 of file GLFWQtWindowImpl.h.
References gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::initGLFW(), gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::initializeGLFWWindow(), and gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::postInitialize().
Here is the call graph for this function:
|
delete |
|
delete |
|
inlineoverride |
Destructor that cleans up the GLFW window and terminates GLFW.
Definition at line 90 of file GLFWQtWindowImpl.h.
References gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::glfwWindow, gui::window::WindowBase< Canvas >::logger, and business_logic::stringifyAddressOf().
Here is the call graph for this function:
|
inlineoverrideprivatevirtual |
Focus the window.
Helpful e.g. when closing a Qt dialog.
Implements business_logic::delegate::IWindowDelegate.
Definition at line 297 of file GLFWQtWindowImpl.h.
References gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::glfwWindow.
|
inlinestaticprivate |
Handles the window resized event.
| window | The GLFW window |
| winWidth | The width of the window |
| winHeight | The height of the window |
Definition at line 262 of file GLFWQtWindowImpl.h.
References business_logic::stringifyAddressOf().
Referenced by gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::initializeGLFWWindow().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestaticprivate |
Initializes GLFW.
Definition at line 140 of file GLFWQtWindowImpl.h.
References gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::initializedGLFW.
Referenced by gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::GLFWQtWindowImpl(), and gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::MakeFullscreen().
Here is the caller graph for this function:
|
inlineprivate |
Initializes the GLFW window.
| width | The width of the window |
| height | The height of the window |
| title | The title of the window |
Definition at line 169 of file GLFWQtWindowImpl.h.
References gui::window::WindowBase< Canvas >::blocksManager, gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::glfwWindow, gui::window::WindowBase< Canvas >::handleEscapeKeyPress(), gui::window::WindowBase< Canvas >::handleMouseDown(), gui::window::WindowBase< Canvas >::handleMouseMove(), gui::window::WindowBase< Canvas >::handleMouseUp(), gui::window::WindowBase< Canvas >::handleNumericKeyPress(), gui::window::WindowBase< Canvas >::handleRightClick(), gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::handleWindowResized(), gui::window::WindowBase< Canvas >::logger, and gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::renderer.
Referenced by gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::GLFWQtWindowImpl().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Constructs a new GLFWQtWindowImpl that takes the full size of the primary monitor.
| title | GLFWQtWindowImpl title |
Definition at line 49 of file GLFWQtWindowImpl.h.
References gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::initGLFW().
Here is the call graph for this function:
|
inlineexplicit |
Allows conversion of GLFWQtWindowImpl instance that gets the underlying GLFW window handle.
Definition at line 124 of file GLFWQtWindowImpl.h.
References gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::glfwWindow.
|
delete |
|
delete |
|
inline |
Definition at line 76 of file GLFWQtWindowImpl.h.
References gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::glfwWindow, and gui::window::WindowBase< Canvas >::handleMouseMove().
Referenced by gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::GLFWQtWindowImpl().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineoverrideprivatevirtual |
Prompt for user confirmation.
| title | The title of the dialog |
| message | The message to show |
Implements business_logic::delegate::IWindowDelegate.
Definition at line 320 of file GLFWQtWindowImpl.h.
References gui::window::prompt::GuiMessageBox::promptConfirmation().
Here is the call graph for this function:
|
inlineoverrideprivatevirtual |
Prompt for a floating point input.
| title | The title of the input |
| message | The message to show |
| defaultValue | The default value to use for the input |
std::nullopt if the user cancels the input Implements business_logic::delegate::IWindowDelegate.
Definition at line 309 of file GLFWQtWindowImpl.h.
References gui::window::prompt::TextInputDialog::promptForFloatingPointInput().
Here is the call graph for this function:
|
inlineoverridevirtual |
Runs the main window loop.
Implements gui::window::WindowBase< Canvas >.
Definition at line 106 of file GLFWQtWindowImpl.h.
References gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::glfwWindow, gui::window::WindowBase< Canvas >::logger, gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::renderer, and gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::shouldClose().
Here is the call graph for this function:
|
inlineoverrideprivatevirtual |
Whether the window should close.
Implements gui::window::WindowBase< Canvas >.
Definition at line 161 of file GLFWQtWindowImpl.h.
References gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::glfwWindow.
Referenced by gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::run().
Here is the caller graph for this function:
|
inlineoverrideprivatevirtual |
Show a warning message.
| title | The title of the warning |
| message | The message to show |
Implements business_logic::delegate::IWindowDelegate.
Definition at line 302 of file GLFWQtWindowImpl.h.
References gui::window::prompt::GuiMessageBox::showWarning().
Here is the call graph for this function:
|
private |
Definition at line 132 of file GLFWQtWindowImpl.h.
Referenced by gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::focusWindow(), gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::initializeGLFWWindow(), gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::operator GLFWwindow *(), gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::postInitialize(), gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::run(), gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::shouldClose(), and gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::~GLFWQtWindowImpl().
|
inlinestaticprivate |
Definition at line 133 of file GLFWQtWindowImpl.h.
Referenced by gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::initGLFW().
|
private |
Definition at line 135 of file GLFWQtWindowImpl.h.
Referenced by gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::initializeGLFWWindow(), and gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::run().