GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
ICloseable.h
Go to the documentation of this file.
1#pragma once
2
3#include "Core.h"
4
5namespace gui_framework
6{
7 namespace interfaces
8 {
10 {
11 protected:
13 std::function<bool()> onClose;
16
17 public:
18 ICloseable(HWND closeableHandle);
19
20 bool close(int exitCode);
21
22 virtual void setOnClose(const std::function<bool()>& onClose) final;
23
29 virtual void setOnClose(const std::string& onCloseFunctionName, const std::string& onCloseFunctionModuleName) final;
30
31 virtual const std::function<bool()>& getOnClose() const final;
32
33 virtual ~ICloseable() = default;
34 };
35 }
36}
#define GUI_FRAMEWORK_API
virtual void setOnClose(const std::function< bool()> &onClose) final
std::function< bool()> onClose
Definition ICloseable.h:13
virtual void setOnClose(const std::string &onCloseFunctionName, const std::string &onCloseFunctionModuleName) final
Load function from module. Can be seriazlied.