TDME2  1.9.200
MarkdownTabView.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <memory>
5 #include <vector>
6 
7 #include <tdme/tdme.h>
8 #include <tdme/engine/fwd-tdme.h>
18 
19 using std::string;
20 using std::unique_ptr;
21 using std::vector;
22 
32 
33 /**
34  * Markdown tab view
35  * @author Andreas Drewke
36  */
38  : public TabView
39 {
40 protected:
41  unique_ptr<Engine> engine;
42 
43 private:
44  EditorView* editorView { nullptr };
45  string tabId;
46  GUIScreenNode* screenNode { nullptr };
47  PopUps* popUps { nullptr };
48  unique_ptr<MarkdownTabController> markdownTabController;
50 
51  vector<Markdown::TOCEntry> toc;
52 
53 public:
54  // forbid class copy
56 
57  /**
58  * Public constructor
59  * @param editorView editor view
60  * @param tabId tab id
61  * @param screenNode screenNode
62  * @param toc table of content
63  */
64  MarkdownTabView(EditorView* editorView, const string& tabId, GUIScreenNode* screenNode, const vector<Markdown::TOCEntry>& toc);
65 
66  /**
67  * Destructor
68  */
70 
71  /**
72  * @return editor view
73  */
75  return editorView;
76  }
77 
78  /**
79  * @return associated tab controller
80  */
81  inline TabController* getTabController() override {
82  return markdownTabController.get();
83  }
84 
85  /**
86  * @return markdown screen node
87  */
89  return screenNode;
90  }
91 
92  /**
93  * @return pop up views
94  */
95  inline PopUps* getPopUps() {
96  return popUps;
97  }
98 
99  /**
100  * @return table of content
101  */
102  inline const vector<Markdown::TOCEntry>& getTableOfContent() {
103  return toc;
104  }
105 
106  // overridden methods
107  void handleInputEvents() override;
108  void display() override;
109  inline const string& getTabId() override {
110  return tabId;
111  }
112  void initialize() override;
113  void dispose() override;
114  Engine* getEngine() override;
115  void activate() override;
116  void deactivate() override;
117  void reloadOutliner() override;
118  void updateRendering() override;
119  inline bool hasFixedSize() override{ return false; };
120 
121 };
Engine main class.
Definition: Engine.h:131
Frame buffer class.
Definition: FrameBuffer.h:22
GUI screen node that represents a screen that can be rendered via GUI system.
Definition: GUIScreenNode.h:72
Pop ups controller accessor class.
Definition: PopUps.h:29
void dispose() override
Disposes the view.
bool hasFixedSize() override
If this viewport framebuffer has a fixed size.
void display() override
Renders the view.
void reloadOutliner() override
Reload outliner.
MarkdownTabView(EditorView *editorView, const string &tabId, GUIScreenNode *screenNode, const vector< Markdown::TOCEntry > &toc)
Public constructor.
unique_ptr< MarkdownTabController > markdownTabController
void initialize() override
Initiates the view.
void handleInputEvents() override
Handle input events that have not yet been processed.
void updateRendering() override
Update rendering.
const vector< Markdown::TOCEntry > & getTableOfContent()
Tab controller, which connects UI with logic.
Definition: TabController.h:34
#define FORBID_CLASS_COPY(CLASS)
Definition: tdme.h:6