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
5
namespace
gui_framework
6
{
7
namespace
interfaces
8
{
9
class
GUI_FRAMEWORK_API
ICloseable
10
{
11
protected
:
12
HWND
closeableHandle
;
13
std::function<bool()>
onClose
;
14
std::string
onCloseFunctionName
;
15
std::string
onCloseFunctionModuleName
;
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
}
Core.h
GUI_FRAMEWORK_API
#define GUI_FRAMEWORK_API
Definition
GUIFrameworkConstants.h:103
gui_framework::interfaces::ICloseable
Definition
ICloseable.h:10
gui_framework::interfaces::ICloseable::setOnClose
virtual void setOnClose(const std::function< bool()> &onClose) final
gui_framework::interfaces::ICloseable::onClose
std::function< bool()> onClose
Definition
ICloseable.h:13
gui_framework::interfaces::ICloseable::onCloseFunctionName
std::string onCloseFunctionName
Definition
ICloseable.h:14
gui_framework::interfaces::ICloseable::onCloseFunctionModuleName
std::string onCloseFunctionModuleName
Definition
ICloseable.h:15
gui_framework::interfaces::ICloseable::setOnClose
virtual void setOnClose(const std::string &onCloseFunctionName, const std::string &onCloseFunctionModuleName) final
Load function from module. Can be seriazlied.
gui_framework::interfaces::ICloseable::closeableHandle
HWND closeableHandle
Definition
ICloseable.h:12
gui_framework
Definition
BaseComponent.cpp:21
GUIFramework
src
Interfaces
Components
ICloseable.h
Generated by
1.12.0