|
FlowArithmeticCalculator 1.0.0
Flow Arithmetic Calculator
|
The abstract base class for implementing a window. More...
#include <WindowBase.h>
Inheritance diagram for gui::window::WindowBase< Canvas >:
Collaboration diagram for gui::window::WindowBase< Canvas >:Public Member Functions | |
| 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 |
| virtual void | run ()=0 |
| Runs the main window loop. | |
| virtual bool | shouldClose () const =0 |
| Whether the window should close. | |
| 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 |
| virtual void | focusWindow ()=0 |
| Focus the window. | |
| virtual void | showWarning (const std::string &title, const std::string &message)=0 |
| Show a warning message. | |
| virtual std::optional< FloatingPoint > | promptFloatingPointInput (const std::string &title, const std::string &message, const std::optional< FloatingPoint > &defaultValue)=0 |
| Prompt for a floating point input. | |
| virtual bool | promptConfirmation (const std::string &title, const std::string &message)=0 |
| Prompt for user confirmation. | |
Protected Attributes | |
| std::shared_ptr< business_logic::BlocksManager > | blocksManager |
| std::shared_ptr< spdlog::logger > | logger |
| business_logic::geometry::Size2D | winSize |
| business_logic::geometry::Size2D | framebufferSize |
The abstract base class for implementing a window.
| Canvas | The type of the canvas |
Definition at line 27 of file WindowBase.h.
|
inline |
Definition at line 29 of file WindowBase.h.
|
overridedefault |
|
delete |
|
defaultnoexcept |
|
inlineoverridevirtual |
Get the framebuffer size.
Implements business_logic::delegate::IWindowDelegate.
Definition at line 141 of file WindowBase.h.
References gui::window::WindowBase< Canvas >::framebufferSize.
Referenced by gui::renderer::SkiaRendererImpl::reinitializeSurface().
Here is the caller graph for this function:
|
inlineoverridevirtual |
Get the window size.
Implements business_logic::delegate::IWindowDelegate.
Definition at line 136 of file WindowBase.h.
References gui::window::WindowBase< Canvas >::winSize.
Referenced by gui::renderer::SkiaRendererImpl::handleWindowResized(), gui::renderer::SkiaRendererImpl::reinitializeSurface(), and gui::renderer::SkiaRendererImpl::render().
Here is the caller graph for this function:
|
inline |
Handles the ESC key press event; should be called internally by the window implementation.
Definition at line 78 of file WindowBase.h.
References gui::window::WindowBase< Canvas >::blocksManager.
Referenced by gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::initializeGLFWWindow().
Here is the caller graph for this function:
|
inline |
Handles the mouse down event; should be called internally by the window implementation.
Definition at line 60 of file WindowBase.h.
References gui::window::WindowBase< Canvas >::blocksManager, and gui::window::WindowBase< Canvas >::handleMouseDown().
Referenced by gui::window::WindowBase< Canvas >::handleMouseDown(), and gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::initializeGLFWWindow().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Handles the mouse move event; should be called internally by the window implementation.
Definition at line 131 of file WindowBase.h.
References gui::window::WindowBase< Canvas >::blocksManager.
Referenced by gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::initializeGLFWWindow(), and gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::postInitialize().
Here is the caller graph for this function:
|
inline |
Handles the mouse up event; should be called internally by the window implementation.
Definition at line 66 of file WindowBase.h.
References gui::window::WindowBase< Canvas >::blocksManager.
Referenced by gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::initializeGLFWWindow().
Here is the caller graph for this function:
|
inline |
Handles the numeric key press event; should be called internally by the window implementation.
Definition at line 72 of file WindowBase.h.
References gui::window::WindowBase< Canvas >::blocksManager.
Referenced by gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::initializeGLFWWindow().
Here is the caller graph for this function:
|
inline |
Handles the right click event; should be called internally by the window implementation.
Definition at line 84 of file WindowBase.h.
References gui::window::WindowBase< Canvas >::blocksManager, business_logic::input::InputChoice< T >::displayName, and gui::window::WindowBase< Canvas >::logger.
Referenced by gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::initializeGLFWWindow().
Here is the caller graph for this function:
|
delete |
|
defaultnoexcept |
|
pure virtual |
Runs the main window loop.
Implemented in gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >.
|
pure virtual |
Whether the window should close.
Implemented in gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >.
|
protected |
The blocks manager, this class will pass it the interaction events
Definition at line 147 of file WindowBase.h.
Referenced by 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(), and gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::initializeGLFWWindow().
|
protected |
The framebuffer size
Definition at line 162 of file WindowBase.h.
Referenced by gui::window::WindowBase< Canvas >::getFramebufferSize().
|
protected |
The logger for the window
Definition at line 152 of file WindowBase.h.
Referenced by gui::window::WindowBase< Canvas >::handleRightClick(), gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::initializeGLFWWindow(), gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::run(), and gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >::~GLFWQtWindowImpl().
|
protected |
The window size
Definition at line 157 of file WindowBase.h.
Referenced by gui::window::WindowBase< Canvas >::getWindowSize().