TDME2  1.9.200
GUIElement.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <unordered_map>
5 
6 #include <tdme/tdme.h>
10 
11 using std::string;
12 using std::unordered_map;
13 
17 
18 /**
19  * GUI element base class
20  * @author Andreas Drewke
21  */
23 {
24 
25 public:
26  // forbid class copy
28 
29  /**
30  * Public constructor
31  */
32  inline GUIElement() {}
33 
34  /**
35  * Destructor
36  */
37  virtual ~GUIElement() {}
38 
39  /**
40  * @return name
41  */
42  virtual const string& getName() = 0;
43 
44  /**
45  * Retrieve template from given path name and optional file name
46  * @param applicationPathName application path name
47  * @param applicationSubPathName sub path name which is usually "project" or "engine"
48  * @param fileName file name
49  * @throws tdme::os::filesystem::FileSystemException
50  * @return template
51  */
52  virtual const string getTemplate(const string& applicationPathName, const string& applicationSubPathName, const string& fileName = string()) = 0;
53 
54  /**
55  * Get default attributes
56  * @param screenNode screen node
57  * @return default attributes
58  */
59  virtual unordered_map<string, string> getAttributes(GUIScreenNode* screenNode) = 0;
60 
61  /**
62  * Create controller which is attached to this node
63  * @param node node
64  * @return
65  */
67 
68 };
GUI element base class.
Definition: GUIElement.h:23
virtual const string getTemplate(const string &applicationPathName, const string &applicationSubPathName, const string &fileName=string())=0
Retrieve template from given path name and optional file name.
virtual ~GUIElement()
Destructor.
Definition: GUIElement.h:37
virtual unordered_map< string, string > getAttributes(GUIScreenNode *screenNode)=0
Get default attributes.
virtual GUINodeController * createController(GUINode *node)=0
Create controller which is attached to this node.
virtual const string & getName()=0
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
#define FORBID_CLASS_COPY(CLASS)
Definition: tdme.h:6