GUIFramework 1.1.0
Framework for desktop GUI applications in C++.
Loading...
Searching...
No Matches
ImageButtonParser.cpp
Go to the documentation of this file.
1#include "ImageButtonParser.h"
2
3using namespace std;
4
5namespace gui_framework
6{
7 namespace parsers
8 {
10 imageResource(NULL),
11 imageWidth(0),
12 imageHeight(0),
13 dType(ImageButton::drawingType::image),
14 iType(ImageButton::imageType::bitmap)
15 {
16
17 }
18
19 void ImageButtonParser::parse(const json::utility::jsonObject& description)
20 {
21 ButtonParser::parse(description);
22
23 pathToImage = description.getString("pathToImage");
24
25 resourceModuleName = description.getString("resourceModuleName");
26 imageResource = static_cast<uint32_t>(description.getUnsignedInt("imageResource"));
27
28 dType = static_cast<ImageButton::drawingType>(description.getUnsignedInt("drawingType"));
29 iType = static_cast<ImageButton::imageType>(description.getUnsignedInt("drawingType"));
30
31 imageWidth = static_cast<uint16_t>(description.getUnsignedInt("imageWidth"));
32 imageHeight = static_cast<uint16_t>(description.getUnsignedInt("imageHeight"));
33 }
34 }
35}
Button with image.
Definition ImageButton.h:12
void parse(const json::utility::jsonObject &description) override
void parse(const json::utility::jsonObject &description) override