GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
ButtonAdditionalCreationData.h
Go to the documentation of this file.
1#pragma once
2
7
8namespace gui_framework
9{
10 namespace utility
11 {
13 template<>
15 {
16 protected:
17 std::wstring text;
18 std::function<void()> onClick;
21
22 public:
24
25 AdditionalCreationData(const std::wstring text, const std::function<void()>& onClick);
26
27 AdditionalCreationData(const std::wstring text, const std::string& onClickFunctionName, const std::string& onClickFunctionModule);
28
29 virtual std::any getData() const;
30
31 virtual ~AdditionalCreationData() = default;
32 };
33
35 template<>
37 {
38 protected:
39 std::wstring text;
40 std::function<void()> onCheck;
41 std::function<void()> onClear;
42 std::function<void()> onClick;
49
50 public:
52
53 AdditionalCreationData(const std::wstring text, const std::function<void()>& onCheck, const std::function<void()>& onClear, const std::function<void()>& onClick = nullptr);
54
55 AdditionalCreationData(const std::wstring text, const std::string& onCheckFunctionName, const std::string& onCheckFunctionModule, const std::string& onClearFunctionName, const std::string& onClearFunctionModule, const std::string& onClickFunctionName = "", const std::string& onClickFunctionModule = "");
56
57 virtual std::any getData() const;
58
59 virtual ~AdditionalCreationData() = default;
60 };
61
63 template<>
65 {
66 protected:
67 std::wstring text;
68 std::filesystem::path pathToImage;
69 std::string resourceModuleName;
70 uint32_t imageResource;
71 uint16_t imageWidth;
72 uint16_t imageHeight;
75 std::function<void()> onClick;
78
79 public:
81
82 AdditionalCreationData(const std::wstring& text, const std::filesystem::path& pathToImage, uint16_t imageWidth, uint16_t imageHeight, ImageButton::drawingType dType, ImageButton::imageType iType, const std::function<void()>& onClick);
83
84 AdditionalCreationData(const std::wstring& text, const std::filesystem::path& pathToImage, uint16_t imageWidth, uint16_t imageHeight, ImageButton::drawingType dType, ImageButton::imageType iType, const std::string& onClickFunctionName, const std::string& onClickFunctionModule);
85
86 AdditionalCreationData(const std::wstring& text, uint32_t imageResource, const std::string& resourceModuleName, uint16_t imageWidth, uint16_t imageHeight, ImageButton::drawingType dType, ImageButton::imageType iType, const std::function<void()>& onClick);
87
88 AdditionalCreationData(const std::wstring& text, uint32_t imageResource, const std::string& resourceModuleName, uint16_t imageWidth, uint16_t imageHeight, ImageButton::drawingType dType, ImageButton::imageType iType, const std::string& onClickFunctionName, const std::string& onClickFunctionModule);
89
90 virtual std::any getData() const;
91
92 virtual ~AdditionalCreationData() = default;
93 };
94 }
95}
#define GUI_FRAMEWORK_API
Standard button.
Definition Button.h:12
Standard check box.
Definition CheckBox.h:9
Button with image.
Definition ImageButton.h:12
AdditionalCreationData(const std::wstring text, const std::function< void()> &onClick)
AdditionalCreationData(const std::wstring text, const std::string &onClickFunctionName, const std::string &onClickFunctionModule)
AdditionalCreationData(const std::wstring text, const std::string &onCheckFunctionName, const std::string &onCheckFunctionModule, const std::string &onClearFunctionName, const std::string &onClearFunctionModule, const std::string &onClickFunctionName="", const std::string &onClickFunctionModule="")
AdditionalCreationData(const std::wstring text, const std::function< void()> &onCheck, const std::function< void()> &onClear, const std::function< void()> &onClick=nullptr)
AdditionalCreationData(const std::wstring &text, uint32_t imageResource, const std::string &resourceModuleName, uint16_t imageWidth, uint16_t imageHeight, ImageButton::drawingType dType, ImageButton::imageType iType, const std::string &onClickFunctionName, const std::string &onClickFunctionModule)
AdditionalCreationData(const std::wstring &text, const std::filesystem::path &pathToImage, uint16_t imageWidth, uint16_t imageHeight, ImageButton::drawingType dType, ImageButton::imageType iType, const std::function< void()> &onClick)
AdditionalCreationData(const std::wstring &text, const std::filesystem::path &pathToImage, uint16_t imageWidth, uint16_t imageHeight, ImageButton::drawingType dType, ImageButton::imageType iType, const std::string &onClickFunctionName, const std::string &onClickFunctionModule)
AdditionalCreationData(const std::wstring &text, uint32_t imageResource, const std::string &resourceModuleName, uint16_t imageWidth, uint16_t imageHeight, ImageButton::drawingType dType, ImageButton::imageType iType, const std::function< void()> &onClick)
Base templated class for component creators.