GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
DropDownComboBoxDeserializer.cpp
Go to the documentation of this file.
2
4#include "GUIFramework.h"
6
7using namespace std;
8
9namespace gui_framework
10{
11 namespace deserializers
12 {
13 BaseComponent* DropDownComboBoxDeserializer::deserialize(const std::string& componentName, const json::utility::jsonObject& description, BaseComposite* parent) const
14 {
15 using json::utility::jsonObject;
16
18
19 parser.parse(description);
20
21 DropDownComboBox* result = nullptr;
22 uint32_t codepage = interfaces::ISerializable::getCodepage();
25
26 result = static_cast<DropDownComboBox*>(creator->create(utility::to_wstring(componentName, codepage), parser.settings, creationData.getData(), parent));
27
28 return result;
29 }
30 }
31}
std::unique_ptr< T > smartPointerType
Compatible smart pointer type.
Base class for all windows, controls, etc.
Base class for all windows that has children windows.
Standard drop down combo box.
const std::unordered_map< size_t, smartPointerType< utility::BaseComponentCreator > > & getCreators() const
Get all current registered creators.
static GUIFramework & get()
Singleton instance access.
BaseComponent * deserialize(const std::string &componentName, const json::utility::jsonObject &description, BaseComposite *parent) const override
Created component pointer already handled by its parent.
Base templated class for component creators.
wstring to_wstring(const string &stringToConvert, uint32_t codepage)
Definition Utility.cpp:82
Parse DropDownComboBox, DropDownListComboBox, SimpleComboBox specific properties.
void parse(const json::utility::jsonObject &description) override
std::vector< std::wstring > values