TDME2  1.9.200
GUITabsContent.cpp
Go to the documentation of this file.
2 
3 #include <string>
4 #include <unordered_map>
5 
6 #include <tdme/tdme.h>
11 
12 using std::string;
13 using std::unordered_map;
14 
20 
21 GUITabsContent::GUITabsContent()
22 {
23 }
24 
25 string GUITabsContent::NAME = "tabs-content";
26 
27 const string& GUITabsContent::getName()
28 {
29  return NAME;
30 }
31 
32 const string GUITabsContent::getTemplate(const string& applicationPathName, const string& applicationSubPathName, const string& fileName)
33 {
34  return FileSystem::getInstance()->getContentAsString(applicationPathName + "/resources/" + applicationSubPathName + "/gui/definitions", fileName.empty() == true?"tabs-content.xml":fileName);
35 }
36 
37 unordered_map<string, string> GUITabsContent::getAttributes(GUIScreenNode* screenNode)
38 {
39  unordered_map<string, string> attributes;
40  attributes["id"] = screenNode->allocateNodeId();
41  return attributes;
42 }
43 
45 {
46  return nullptr;
47 }
48 
GUI tabs content 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 & 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
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