Making different Property windows not appear in the same ImGui window

This commit is contained in:
Alexander Bock
2016-06-28 15:10:45 +02:00
parent 9fb7814145
commit 3417f45805
6 changed files with 26 additions and 18 deletions
-2
View File
@@ -72,8 +72,6 @@ public:
GuiPropertyComponent _globalProperty;
GuiTimeComponent _time;
GuiIswaComponent _iswa;
bool _showHelp;
};
} // namespace gui
@@ -25,7 +25,6 @@
#ifndef __GUIISWACOMPONENT_H__
#define __GUIISWACOMPONENT_H__
#include <modules/onscreengui/include/guicomponent.h>
#include <modules/onscreengui/include/guipropertycomponent.h>
#include <map>
@@ -53,7 +52,6 @@ private:
std::map<std::string, int> _cdfOptionsMap;
};
} // namespace gui
} // namespace openspace
@@ -43,6 +43,8 @@ class GuiPropertyComponent : public GuiComponent {
public:
using SourceFunction = std::function<std::vector<properties::PropertyOwner*>()>;
GuiPropertyComponent(std::string name);
// This is the function that evaluates to the list of Propertyowners that this
// component should render
void setSource(SourceFunction func);
@@ -52,6 +54,7 @@ public:
protected:
void renderProperty(properties::Property* prop, properties::PropertyOwner* owner);
std::string _name;
SourceFunction _function;
};