FlowArithmeticCalculator 1.0.0
Flow Arithmetic Calculator
Loading...
Searching...
No Matches
business_logic::delegate::IWindowDelegate Class Referenceabstract

The delegate for the window. More...

#include <IWindowDelegate.h>

+ Inheritance diagram for business_logic::delegate::IWindowDelegate:
+ Collaboration diagram for business_logic::delegate::IWindowDelegate:

Public Member Functions

virtual ~IWindowDelegate ()=default
 
virtual geometry::Size2D getWindowSize ()=0
 Get the window size.
 
virtual geometry::Size2D getFramebufferSize ()=0
 Get the framebuffer size.
 
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< FloatingPointpromptFloatingPointInput (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.
 

Detailed Description

The delegate for the window.

The delegate is used for basic window operations.

Definition at line 19 of file IWindowDelegate.h.

Constructor & Destructor Documentation

◆ ~IWindowDelegate()

virtual business_logic::delegate::IWindowDelegate::~IWindowDelegate ( )
virtualdefault

Member Function Documentation

◆ focusWindow()

virtual void business_logic::delegate::IWindowDelegate::focusWindow ( )
pure virtual

◆ getFramebufferSize()

virtual geometry::Size2D business_logic::delegate::IWindowDelegate::getFramebufferSize ( )
pure virtual

Get the framebuffer size.

Returns
The framebuffer size

Implemented in gui::window::WindowBase< Canvas >, and gui::window::WindowBase< SkCanvas >.

◆ getWindowSize()

virtual geometry::Size2D business_logic::delegate::IWindowDelegate::getWindowSize ( )
pure virtual

Get the window size.

Returns
The window size

Implemented in gui::window::WindowBase< Canvas >, and gui::window::WindowBase< SkCanvas >.

Referenced by business_logic::elements::blocks::BaseBlock::cacheCornerCoordinates().

+ Here is the caller graph for this function:

◆ promptConfirmation()

virtual bool business_logic::delegate::IWindowDelegate::promptConfirmation ( const std::string &  title,
const std::string &  message 
)
pure virtual

Prompt for user confirmation.

Parameters
titleThe title of the dialog
messageThe message to show
Returns
True if the user confirmed, false otherwise

Implemented in gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >.

Referenced by business_logic::BlocksManager::handleRightClickOnBlock().

+ Here is the caller graph for this function:

◆ promptFloatingPointInput()

virtual std::optional< FloatingPoint > business_logic::delegate::IWindowDelegate::promptFloatingPointInput ( const std::string &  title,
const std::string &  message,
const std::optional< FloatingPoint > &  defaultValue 
)
pure virtual

Prompt for a floating point input.

Parameters
titleThe title of the input
messageThe message to show
defaultValueThe default value to use for the input
Returns
The input value or std::nullopt if the user cancels the input

Implemented in gui::window::GLFWQtWindowImpl< RendererImpl, Canvas >.

Referenced by business_logic::elements::blocks::ConstantBlock::onDoubleClick().

+ Here is the caller graph for this function:

◆ showWarning()

virtual void business_logic::delegate::IWindowDelegate::showWarning ( const std::string &  title,
const std::string &  message 
)
pure virtual

The documentation for this class was generated from the following file: