added addManagedResource, which adds a resource to BScreen and will be destroy by BScreen
fluxgen fluxgen
1 files changed,
7 insertions(+),
0 deletions(-)
jump to
M
src/Screen.hh
→
src/Screen.hh
@@ -352,6 +352,10 @@ void addConfigMenu(const char *label, FbTk::Menu &menu);
void removeConfigMenu(FbTk::Menu &menu); + /// Adds a resource to managed resource list + /// This resource is now owned by Screen and will be destroyed + /// when screen dies + void addManagedResource(FbTk::Resource_base *resource); class ScreenSubject:public FbTk::Subject { public:@@ -444,6 +448,9 @@ FbTk::Resource<std::string> scroll_action;
FbTk::Resource<bool> scroll_reverse; } resource; + + /// Holds manage resources that screen destroys + FbTk::ResourceManager::ResourceList m_managed_resources; FbTk::ResourceManager &m_resource_manager; const std::string m_name, m_altname;