]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/src/generic_layout.hpp
* wxwidgets/menus.cpp: Added "Open Directory" in the wx popup menu
[vlc] / modules / gui / skins2 / src / generic_layout.hpp
index 9acd72216fedbace82d6171e0a3d288e78ffb6ff..58c4d355a4efbb5bbff5fa2d59c3c8e761ecf3e0 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * generic_layout.hpp
  *****************************************************************************
- * Copyright (C) 2003 VideoLAN
+ * Copyright (C) 2003 the VideoLAN team
  * $Id$
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
 #define GENERIC_LAYOUT_HPP
 
 #include "skin_common.hpp"
+#include "top_window.hpp"
 #include "../utils/pointer.hpp"
 #include "../utils/position.hpp"
 
 #include <list>
 
-class TopWindow;
+class Anchor;
 class OSGraphics;
 class CtrlGeneric;
 
@@ -74,9 +75,16 @@ class GenericLayout: public SkinObject, public Box
         /// Refresh the window
         virtual void refreshAll();
 
+        /// Refresh a rectangular portion of the window
+        virtual void refreshRect( int x, int y, int width, int height );
+
         /// Get the image of the layout
         virtual OSGraphics *getImage() const { return m_pImage; }
 
+        /// Get the position of the layout (relative to the screen)
+        virtual int getLeft() const { return m_pWindow->getLeft(); }
+        virtual int getTop() const { return m_pWindow->getTop(); }
+
         /// Get the size of the layout
         virtual int getWidth() const { return m_width; }
         virtual int getHeight() const { return m_height; }
@@ -100,7 +108,18 @@ class GenericLayout: public SkinObject, public Box
         virtual const list<LayeredControl> &getControlList() const;
 
         /// Called by a control when its image has changed
-        virtual void onControlUpdate( const CtrlGeneric &rCtrl );
+        /// The arguments indicate the size of the rectangle to refresh,
+        /// and the offset (from the control position) of this rectangle.
+        /// Use a negative width or height to refresh the layout completely
+        virtual void onControlUpdate( const CtrlGeneric &rCtrl,
+                                      int width, int height,
+                                      int xOffSet, int yOffSet );
+
+        /// Get the list of the anchors of this layout
+        virtual const list<Anchor*>& getAnchorList() const;
+
+        /// Add an anchor to this layout
+        virtual void addAnchor( Anchor *pAnchor );
 
     private:
         /// Parent window of the layout
@@ -113,6 +132,8 @@ class GenericLayout: public SkinObject, public Box
         OSGraphics *m_pImage;
         /// List of the controls in the layout
         list<LayeredControl> m_controlList;
+        /// List of the anchors in the layout
+        list<Anchor*> m_anchorList;
 };