summaryrefslogtreecommitdiff
path: root/src/desktop/Subsurface.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/desktop/Subsurface.hpp')
-rw-r--r--src/desktop/Subsurface.hpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/desktop/Subsurface.hpp b/src/desktop/Subsurface.hpp
index aacbad91..f16a11ea 100644
--- a/src/desktop/Subsurface.hpp
+++ b/src/desktop/Subsurface.hpp
@@ -11,28 +11,30 @@ class CSubsurface {
public:
// root dummy nodes
CSubsurface(PHLWINDOW pOwner);
- CSubsurface(CPopup* pOwner);
+ CSubsurface(WP<CPopup> pOwner);
// real nodes
CSubsurface(SP<CWLSubsurfaceResource> pSubsurface, PHLWINDOW pOwner);
- CSubsurface(SP<CWLSubsurfaceResource> pSubsurface, CPopup* pOwner);
+ CSubsurface(SP<CWLSubsurfaceResource> pSubsurface, WP<CPopup> pOwner);
~CSubsurface();
- Vector2D coordsRelativeToParent();
- Vector2D coordsGlobal();
+ Vector2D coordsRelativeToParent();
+ Vector2D coordsGlobal();
- Vector2D size();
+ Vector2D size();
- void onCommit();
- void onDestroy();
- void onNewSubsurface(SP<CWLSubsurfaceResource> pSubsurface);
- void onMap();
- void onUnmap();
+ void onCommit();
+ void onDestroy();
+ void onNewSubsurface(SP<CWLSubsurfaceResource> pSubsurface);
+ void onMap();
+ void onUnmap();
- bool visible();
+ bool visible();
- void recheckDamageForSubsurfaces();
+ void recheckDamageForSubsurfaces();
+
+ WP<CSubsurface> m_pSelf;
private:
struct {
@@ -48,10 +50,10 @@ class CSubsurface {
Vector2D m_vLastSize = {};
// if nullptr, means it's a dummy node
- CSubsurface* m_pParent = nullptr;
+ WP<CSubsurface> m_pParent;
PHLWINDOWREF m_pWindowParent;
- CPopup* m_pPopupParent = nullptr;
+ WP<CPopup> m_pPopupParent;
std::vector<UP<CSubsurface>> m_vChildren;