GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
ButtonCreator.cpp
Go to the documentation of this file.
1#include "ButtonCreator.h"
2
4
5using namespace std;
6
7namespace gui_framework
8{
9 namespace utility
10 {
11 BaseComponent* ButtonCreator::create(const wstring& windowName, const utility::ComponentSettings& settings, const any& additionalData, BaseComposite* parent)
12 {
13 auto [text, onClick, onClickFunctionName, onClickFunctionModule] = any_cast<tuple<wstring, function<void()>, string, string>>(additionalData);
14
15 return onClickFunctionName.empty() ?
16 new Button(windowName, text, settings, parent, onClick) :
17 new Button(windowName, text, settings, parent, onClickFunctionName, onClickFunctionModule);
18 }
19 }
20}
Base class for all windows, controls, etc.
Base class for all windows that has children windows.
Standard button.
Definition Button.h:12
BaseComponent * create(const std::wstring &windowName, const utility::ComponentSettings &settings, const std::any &additionalData, BaseComposite *parent) override