/*****************************************************************************
* 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;
/// 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; }
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
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;
};