GUIFramework
1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
DropDownListComboBoxCreator.cpp
Go to the documentation of this file.
1
#include "
DropDownListComboBoxCreator.h
"
2
3
#include "
Components/ComboBoxes/DropDownListComboBox.h
"
4
5
using namespace
std;
6
7
namespace
gui_framework
8
{
9
namespace
utility
10
{
11
BaseComponent
*
DropDownListComboBoxCreator::create
(
const
wstring& windowName,
const
utility::ComponentSettings
& settings,
const
any& additionalData,
BaseComposite
* parent)
12
{
13
auto
[values, onSelectionChange, functionName, moduleName] = any_cast<tuple<vector<wstring>, function<void(
BaseComboBox
&)>, string,
string
>>(additionalData);
14
BaseComboBox
* result =
new
DropDownListComboBox
(windowName, settings, parent);
15
16
if
(onSelectionChange)
17
{
18
result->setOnSelectionChange(onSelectionChange);
19
}
20
else
if
(functionName.size())
21
{
22
result->setOnSelectionChange(functionName, moduleName);
23
}
24
25
for
(
const
auto
& i : values)
26
{
27
result->addValue(i);
28
}
29
30
return
result;
31
}
32
}
33
}
DropDownListComboBox.h
DropDownListComboBoxCreator.h
gui_framework::BaseComboBox
Base class for all combo boxes.
Definition
BaseComboBox.h:15
gui_framework::BaseComponent
Base class for all windows, controls, etc.
Definition
BaseComponent.h:17
gui_framework::BaseComposite
Base class for all windows that has children windows.
Definition
BaseComposite.h:23
gui_framework::DropDownListComboBox
Standard drop down list combo box.
Definition
DropDownListComboBox.h:9
gui_framework::utility::DropDownListComboBoxCreator::create
BaseComponent * create(const std::wstring &windowName, const utility::ComponentSettings &settings, const std::any &additionalData, BaseComposite *parent) override
Definition
DropDownListComboBoxCreator.cpp:11
gui_framework
Definition
BaseComponent.cpp:21
gui_framework::utility::ComponentSettings
All settings for windows.
Definition
ComponentSettings.h:11
GUIFramework
src
Utility
Creators
Components
ComboBoxes
DropDownListComboBoxCreator.cpp
Generated by
1.12.0