TDME2  1.9.200
VideoTabView.cpp
Go to the documentation of this file.
2 
3 #include <memory>
4 #include <string>
5 
6 #include <tdme/tdme.h>
7 #include <tdme/engine/Engine.h>
9 #include <tdme/gui/GUI.h>
14 #include <tdme/utilities/Console.h>
16 
17 using std::make_unique;
18 using std::string;
19 using std::unique_ptr;
20 
22 
25 using tdme::gui::GUI;
31 
32 VideoTabView::VideoTabView(EditorView* editorView, const string& tabId, GUIScreenNode* screenNode)
33 {
34  this->editorView = editorView;
35  this->tabId = tabId;
36  this->screenNode = screenNode;
37  this->popUps = editorView->getPopUps();
38  engine = unique_ptr<Engine>(Engine::createOffScreenInstance(512, 512, false, false, false));
39  engine->setSceneColor(Color4(39.0f / 255.0f, 39.0f / 255.0f, 39.0f / 255.0f, 1.0f));
40  engine->getGUI()->addScreen(screenNode->getId(), screenNode);
41  engine->getGUI()->addRenderScreen(screenNode->getId());
42 }
43 
45 }
46 
48 {
49  engine->getGUI()->handleEvents();
50 }
51 
53 {
54  engine->display();
55  engine->getGUI()->render();
56 }
57 
59 {
60  try {
61  videoTabController = make_unique<VideoTabController>(this);
64  } catch (Exception& exception) {
65  Console::println("VideoTabView::initialize(): An error occurred: " + string(exception.what()));
66  }
67  // TODO: load settings
68 }
69 
71 {
72  engine->dispose();
73 }
74 
76 }
77 
79  return engine.get();
80 }
81 
83  videoTabController->setOutlinerAddDropDownContent();
84  videoTabController->setOutlinerContent();
87 }
88 
91 }
92 
94  videoTabController->setOutlinerContent();
96 }
97 
Color 4 definition class.
Definition: Color4.h:18
Engine main class.
Definition: Engine.h:131
GUI module class.
Definition: GUI.h:64
const string & getId()
Definition: GUINode.h:339
GUI screen node that represents a screen that can be rendered via GUI system.
Definition: GUIScreenNode.h:72
void addTooltipRequestListener(GUITooltipRequestListener *listener)
Add tooltip request listener.
void restoreOutlinerState(const TabView::OutlinerState &outlinerState)
Restore outliner state.
void storeOutlinerState(TabView::OutlinerState &outlinerState)
Store outliner state.
void setDetailsContent(const string &xml)
Set details content.
void dispose() override
Disposes the view.
void display() override
Renders the view.
void reloadOutliner() override
Reload outliner.
void initialize() override
Initiates the view.
void handleInputEvents() override
Handle input events that have not yet been processed.
unique_ptr< VideoTabController > videoTabController
Definition: VideoTabView.h:44
void updateRendering() override
Update rendering.
EditorScreenController * getScreenController()
Definition: EditorView.h:69
Console class.
Definition: Console.h:29
std::exception Exception
Exception base class.
Definition: Exception.h:18