add optional notification of childs when parent moves
[enigma2.git] / lib / gui / ewidget.h
index db86fd10600be1af162b91abc7ca840caf760c03..22f5103b0a87cb5071f70f779c72a9a42f892722 100644 (file)
@@ -48,6 +48,8 @@ public:
                
        int isTransparent() { return m_vis & wVisTransparent; }
        
+       ePoint getAbsolutePosition();
+       
        eWidgetAnimation m_animation;
 private:
        eWidgetDesktop *m_desktop;
@@ -72,13 +74,15 @@ private:
        void doPaint(gPainter &painter, const gRegion &region);
        void recalcClipRegionsWhenVisible();
        
+       void parentRemoved();
+       
        gRGB m_background_color;
        int m_have_background_color;
        
        eWidget *m_current_focus, *m_focus_owner;
        
        int m_z_position;
-       
+       int m_notify_child_on_position_change;
 protected:
        virtual ~eWidget();
        void mayKillFocus();
@@ -95,6 +99,8 @@ public:
                evtChangedPosition,
                evtChangedSize,
                
+               evtParentChangedPosition,
+               
                evtWillShow,
                evtWillHide,
                evtWillChangePosition, /* new size is eRect *data */
@@ -109,8 +115,11 @@ public:
        };
        virtual int event(int event, void *data = 0, void *data2 = 0);
        void setFocus(eWidget *focus);
+
+               /* enable this if you need the absolute position of the widget */
+       void setPositionNotifyChild(int n) { m_notify_child_on_position_change = 1; }
 };
 
-extern eWidgetDesktop *getDesktop();
+extern eWidgetDesktop *getDesktop(int which);
 
 #endif