added addManagedResource, which adds a resource to BScreen and will be destroy by BScreen
This commit is contained in:
parent
bdc74e7995
commit
4b4c46559b
1 changed files with 7 additions and 0 deletions
|
@ -352,6 +352,10 @@ public:
|
||||||
void removeConfigMenu(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 {
|
class ScreenSubject:public FbTk::Subject {
|
||||||
public:
|
public:
|
||||||
|
@ -445,6 +449,9 @@ private:
|
||||||
|
|
||||||
} resource;
|
} resource;
|
||||||
|
|
||||||
|
/// Holds manage resources that screen destroys
|
||||||
|
FbTk::ResourceManager::ResourceList m_managed_resources;
|
||||||
|
|
||||||
FbTk::ResourceManager &m_resource_manager;
|
FbTk::ResourceManager &m_resource_manager;
|
||||||
const std::string m_name, m_altname;
|
const std::string m_name, m_altname;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue