TDME2  1.9.200
GUISelectorHOption.cpp
Go to the documentation of this file.
2 
3 #include <string>
4 #include <unordered_map>
5 
6 #include <tdme/tdme.h>
12 
13 using std::string;
14 using std::unordered_map;
15 
17 
23 
24 string GUISelectorHOption::NAME = "selector-horizontal-option";
25 
26 GUISelectorHOption::GUISelectorHOption()
27 {
28 }
29 
31 {
32  return NAME;
33 }
34 
35 const string GUISelectorHOption::getTemplate(const string& applicationPathName, const string& applicationSubPathName, const string& fileName)
36 {
37  return FileSystem::getInstance()->getContentAsString(applicationPathName + "/resources/" + applicationSubPathName + "/gui/definitions", fileName.empty() == true?"selector-horizontal-option.xml":fileName);
38 }
39 
40 unordered_map<string, string> GUISelectorHOption::getAttributes(GUIScreenNode* screenNode)
41 {
42  unordered_map<string, string> attributes;
43  attributes["id"] = screenNode->allocateNodeId();
44  return attributes;
45 }
46 
48 {
49  return new GUISelectorHOptionController(node);
50 }
GUI selector horizontal option element.
GUINodeController * createController(GUINode *node) override
Create controller which is attached to this node.
unordered_map< string, string > getAttributes(GUIScreenNode *screenNode) override
Get default attributes.
const string getTemplate(const string &applicationPathName, const string &applicationSubPathName, const string &fileName=string()) override
Retrieve template from given path name and optional file name.
static STATIC_DLL_IMPEXT string NAME
GUI node controller base class.
GUI node base class.
Definition: GUINode.h:64
GUI screen node that represents a screen that can be rendered via GUI system.
Definition: GUIScreenNode.h:72
const string allocateNodeId()
Allocate node id.
File system singleton class.
Definition: FileSystem.h:17