GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
ButtonAdditionalCreationData.cpp
Go to the documentation of this file.
2
3using namespace std;
4
5namespace gui_framework
6{
7 namespace utility
8 {
9 AdditionalCreationData<Button>::AdditionalCreationData(const wstring text, const function<void()>& onClick) :
10 text(text),
11 onClick(onClick)
12 {
13
14 }
15
16 AdditionalCreationData<Button>::AdditionalCreationData(const wstring text, const string& onClickFunctionName, const string& onClickFunctionModule) :
17 text(text),
18 onClickFunctionName(onClickFunctionName),
19 onClickFunctionModule(onClickFunctionModule)
20 {
21
22 }
23
25 {
26 return make_any<tuple<wstring, function<void()>, string, string>>(text, onClick, onClickFunctionName, onClickFunctionModule);
27 }
28
29 AdditionalCreationData<CheckBox>::AdditionalCreationData(const wstring text, const function<void()>& onCheck, const function<void()>& onClear, const function<void()>& onClick) :
30 text(text),
31 onCheck(onCheck),
32 onClear(onClear),
33 onClick(onClick)
34 {
35
36 }
37
38 AdditionalCreationData<CheckBox>::AdditionalCreationData(const wstring text, const string& onCheckFunctionName, const string& onCheckFunctionModule, const string& onClearFunctionName, const string& onClearFunctionModule, const string& onClickFunctionName, const string& onClickFunctionModule) :
39 text(text),
40 onCheckFunctionName(onCheckFunctionName),
41 onCheckFunctionModule(onCheckFunctionModule),
42 onClearFunctionName(onCheckFunctionName),
43 onClearFunctionModule(onCheckFunctionModule),
44 onClickFunctionName(onCheckFunctionName),
45 onClickFunctionModule(onCheckFunctionModule)
46 {
47
48 }
49
51 {
52 return make_any<tuple<wstring, function<void()>, function<void()>, function<void()>, string, string, string, string, string, string>>(text, onCheck, onClear, onClick, onCheckFunctionName, onCheckFunctionModule, onClearFunctionName, onClearFunctionModule, onClickFunctionName, onClickFunctionModule);
53 }
54
55 AdditionalCreationData<ImageButton>::AdditionalCreationData(const wstring& text, const filesystem::path& pathToImage, uint16_t imageWidth, uint16_t imageHeight, ImageButton::drawingType dType, ImageButton::imageType iType, const function<void()>& onClick) :
56 text(text),
57 pathToImage(pathToImage),
58 imageResource(NULL),
59 imageWidth(imageWidth),
60 imageHeight(imageHeight),
61 dType(dType),
62 iType(iType),
63 onClick(onClick)
64 {
65
66 }
67
68 AdditionalCreationData<ImageButton>::AdditionalCreationData(const wstring& text, const filesystem::path& pathToImage, uint16_t imageWidth, uint16_t imageHeight, ImageButton::drawingType dType, ImageButton::imageType iType, const string& onClickFunctionName, const string& onClickFunctionModule) :
69 text(text),
70 pathToImage(pathToImage),
71 imageResource(NULL),
72 imageWidth(imageWidth),
73 imageHeight(imageHeight),
74 dType(dType),
75 iType(iType),
76 onClickFunctionName(onClickFunctionName),
77 onClickFunctionModule(onClickFunctionModule)
78 {
79
80 }
81
82 AdditionalCreationData<ImageButton>::AdditionalCreationData(const wstring& text, uint32_t imageResource, const string& resourceModuleName, uint16_t imageWidth, uint16_t imageHeight, ImageButton::drawingType dType, ImageButton::imageType iType, const function<void()>& onClick) :
83 text(text),
84 resourceModuleName(resourceModuleName),
85 imageResource(imageResource),
86 imageWidth(imageWidth),
87 imageHeight(imageHeight),
88 dType(dType),
89 iType(iType),
90 onClick(onClick)
91 {
92
93 }
94
95 AdditionalCreationData<ImageButton>::AdditionalCreationData(const wstring& text, uint32_t imageResource, const string& resourceModuleName, uint16_t imageWidth, uint16_t imageHeight, ImageButton::drawingType dType, ImageButton::imageType iType, const string& onClickFunctionName, const string& onClickFunctionModule) :
96 text(text),
97 resourceModuleName(resourceModuleName),
98 imageResource(imageResource),
99 imageWidth(imageWidth),
100 imageHeight(imageHeight),
101 dType(dType),
102 iType(iType),
103 onClickFunctionName(onClickFunctionName),
104 onClickFunctionModule(onClickFunctionModule)
105 {
106
107 }
108
110 {
111 return make_any
112 <tuple<wstring, filesystem::path, uint32_t, string, uint16_t, uint16_t, ImageButton::drawingType, ImageButton::imageType, function<void()>, string, string>>
113 (text, pathToImage, imageResource, resourceModuleName, imageWidth, imageHeight, dType, iType, onClick, onClickFunctionName, onClickFunctionModule);
114 }
115 }
116}
utility::BaseLoadableHolder::imageType imageType
Definition ImageButton.h:21
Base templated class for component creators.