FlowArithmeticCalculator 1.0.0
Flow Arithmetic Calculator
Loading...
Searching...
No Matches
IWindowDelegate.h
Go to the documentation of this file.
1#ifndef BUSINESS_LOGIC_WINDOW_DELEGATE_I_WINDOW_DELEGATE_H
2#define BUSINESS_LOGIC_WINDOW_DELEGATE_I_WINDOW_DELEGATE_H
3
4#include <optional>
5
6#include "geometry/Size2D.h"
7#include "typenames.h"
8
19 class
20 IWindowDelegate { // NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions)
21 public:
22 virtual ~IWindowDelegate() = default;
23
29
35
41 virtual void focusWindow() = 0;
42
48 virtual void showWarning(const std::string& title, const std::string& message) = 0;
49
57 virtual std::optional<FloatingPoint> promptFloatingPointInput(
58 const std::string& title,
59 const std::string& message,
60 const std::optional<FloatingPoint>& defaultValue) = 0;
61
68 virtual bool promptConfirmation(const std::string& title, const std::string& message) = 0;
69 };
70} // namespace business_logic::delegate
71
72#endif // BUSINESS_LOGIC_WINDOW_DELEGATE_I_WINDOW_DELEGATE_H
virtual bool promptConfirmation(const std::string &title, const std::string &message)=0
Prompt for user confirmation.
virtual void focusWindow()=0
Focus the window.
virtual void showWarning(const std::string &title, const std::string &message)=0
Show a warning message.
virtual geometry::Size2D getWindowSize()=0
Get the window size.
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 geometry::Size2D getFramebufferSize()=0
Get the framebuffer size.
Delegates exposed by the business_logic module, used for integrating with a GUI / renderer implementa...
A basic struct representing a 2D size.
Definition Size2D.h:8