GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
CheckBox.cpp
Go to the documentation of this file.
1#include "CheckBox.h"
2
3using namespace std;
4
5namespace gui_framework
6{
7 CheckBox::CheckBox(const wstring& checkBoxName, const wstring& checkBoxText, const utility::ComponentSettings& settings, BaseComposite* parent, const function<void()>& onCheck, const function<void()>& onClear, const function<void()>& onClick) :
9 (
10 checkBoxName,
11 checkBoxText,
12 settings,
13 parent,
14 onCheck,
15 onClear,
16 onClick
17 )
18 {
19
20 }
21
22 size_t CheckBox::getHash() const
23 {
24 return typeid(CheckBox).hash_code();
25 }
26
27 json::JSONBuilder CheckBox::getStructure() const
28 {
29 using json::utility::jsonObject;
30
31 json::JSONBuilder builder = BaseCheckBox::getStructure();
32 jsonObject& current = get<jsonObject>(builder[utility::to_string(windowName, ISerializable::getCodepage())]);
33
34 return builder;
35 }
36}
Base class for all check boxes.
Definition BaseCheckBox.h:9
virtual json::JSONBuilder getStructure() const override
const std::wstring windowName
Base class for all windows that has children windows.
json::JSONBuilder getStructure() const override
Definition CheckBox.cpp:27
CheckBox(const std::wstring &checkBoxName, const std::wstring &checkBoxText, const utility::ComponentSettings &settings, BaseComposite *parent, const std::function< void()> &onCheck, const std::function< void()> &onClear, const std::function< void()> &onClick=nullptr)
Definition CheckBox.cpp:7
size_t getHash() const override
Used as key in creators.
Definition CheckBox.cpp:22
string to_string(wstring_view stringToConvert, uint32_t codepage)
Definition Utility.cpp:41