TDME2  1.9.200
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GUISelectorH.cpp
Go to the documentation of this file.
2 
3 #include <string>
4 #include <unordered_map>
5 
6 #include <tdme/tdme.h>
12 
14 
15 using std::string;
16 using std::unordered_map;
17 
23 
24 string GUISelectorH::NAME = "selector-horizontal";
25 
26 GUISelectorH::GUISelectorH()
27 {
28 }
29 
30 const string& GUISelectorH::getName()
31 {
32  return NAME;
33 }
34 
35 const string GUISelectorH::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.xml":fileName);
38 }
39 
40 unordered_map<string, string> GUISelectorH::getAttributes(GUIScreenNode* screenNode)
41 {
42  unordered_map<string, string> attributes;
43  attributes["id"] = screenNode->allocateNodeId();
44  attributes["width"] = "auto";
45  attributes["height"] = "auto";
46  return attributes;
47 }
48 
50 {
51  return new GUISelectorHController(node);
52 }
53 
GUI selector horizontal controller.
GUI selector horizontal element.
Definition: GUISelectorH.h:27
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 & getName() override
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
Definition: GUISelectorH.h:30
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