class Anchor;
class OSGraphics;
class CtrlGeneric;
+class CtrlVideo;
+class VarBoolImpl;
/// Control and its associated layer
/// Resize the layout
virtual void resize( int width, int height );
- /// Add a control in the layout at the given position, and
- /// the optional given layer
+ /**
+ * Add a control in the layout at the given position, and
+ * the optional given layer
+ */
virtual void addControl( CtrlGeneric *pControl,
const Position &rPosition,
int layer );
virtual const list<LayeredControl> &getControlList() const;
/// Called by a control when its image has changed
- /// 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
+ /**
+ * 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 );
/// Add an anchor to this layout
virtual void addAnchor( Anchor *pAnchor );
+ /// Called when the layout is shown
+ virtual void onShow();
+
+ /// Called when the layout is hidden
+ virtual void onHide();
+
+ /// Give access to the "active layout" variable
+ // FIXME: we give read/write access
+ VarBoolImpl &getActiveVar() { return *m_pVarActive; }
+
private:
/// Parent window of the layout
TopWindow *m_pWindow;
OSGraphics *m_pImage;
/// List of the controls in the layout
list<LayeredControl> m_controlList;
+ //// Video control
+ CtrlVideo *m_pVideoControl;
/// List of the anchors in the layout
list<Anchor*> m_anchorList;
+ /// Flag to know if the layout is visible
+ bool m_visible;
+ /// Variable for the "active state" of the layout
+ /**
+ * Note: the layout is not an observer on this variable, because it
+ * cannot be changed externally (i.e. without an explicit change of
+ * layout). This way, we avoid using a setActiveLayoutInner method.
+ */
+ mutable VarBoolImpl *m_pVarActive;
};