GenericLayout Class Reference

Base class for layouts. More...

Inheritance diagram for GenericLayout:

Inheritance graph
[legend]
Collaboration diagram for GenericLayout:

Collaboration graph
[legend]

Public Member Functions

 GenericLayout (intf_thread_t *pIntf, int width, int height, int minWidth, int maxWidth, int minHeight, int maxHeight)
virtual ~GenericLayout ()
virtual void setWindow (TopWindow *pWindow)
 Attach the layout to a window.
virtual TopWindowgetWindow () const
 Get the associated window, if any.
virtual void onControlCapture (const CtrlGeneric &rCtrl)
 Called by a control which wants to capture the mouse.
virtual void onControlRelease (const CtrlGeneric &rCtrl)
 Called by a control which wants to release the mouse.
virtual void refreshAll ()
 Refresh the window.
virtual void refreshRect (int x, int y, int width, int height)
 Refresh a rectangular portion of the window.
virtual OSGraphicsgetImage () const
 Get the image of the layout.
virtual int getLeft () const
 Get the position of the layout (relative to the screen).
virtual int getTop () const
virtual int getWidth () const
 Get the size of the layout.
virtual int getHeight () const
virtual const GenericRectgetRect () const
virtual int getMinWidth () const
 Get the minimum and maximum size of the layout.
virtual int getMaxWidth () const
virtual int getMinHeight () const
virtual int getMaxHeight () const
virtual void resize (int width, int height)
 Resize the layout.
virtual void addControl (CtrlGeneric *pControl, const Position &rPosition, int layer)
 Add a control in the layout at the given position, and the optional given layer.
virtual const list
< LayeredControl > & 
getControlList () const
 Get the list of the controls in this layout, by layer order.
virtual void onControlUpdate (const CtrlGeneric &rCtrl, int width, int height, int xOffSet, int yOffSet)
 Called by a control when its image has changed.
virtual const list< Anchor * > & getAnchorList () const
 Get the list of the anchors of this layout.
virtual void addAnchor (Anchor *pAnchor)
 Add an anchor to this layout.
virtual void onShow ()
 Called when the layout is shown.
virtual void onHide ()
 Called when the layout is hidden.
VarBoolImplgetActiveVar ()
 Give access to the "active layout" variable.

Detailed Description

Base class for layouts.

Constructor & Destructor Documentation

GenericLayout::GenericLayout ( intf_thread_t pIntf,
int  width,
int  height,
int  minWidth,
int  maxWidth,
int  minHeight,
int  maxHeight 
)

GenericLayout::~GenericLayout (  )  [virtual]


Member Function Documentation

void GenericLayout::setWindow ( TopWindow pWindow  )  [virtual]

Attach the layout to a window.

virtual TopWindow* GenericLayout::getWindow (  )  const [inline, virtual]

void GenericLayout::onControlCapture ( const CtrlGeneric rCtrl  )  [virtual]

Called by a control which wants to capture the mouse.

References getWindow(), and TopWindow::onControlCapture().

Referenced by CtrlGeneric::captureMouse().

void GenericLayout::onControlRelease ( const CtrlGeneric rCtrl  )  [virtual]

Called by a control which wants to release the mouse.

References getWindow(), and TopWindow::onControlRelease().

Referenced by CtrlGeneric::releaseMouse().

void GenericLayout::refreshAll (  )  [virtual]

Refresh the window.

References SkinsRect::getHeight(), SkinsRect::getWidth(), and refreshRect().

Referenced by onControlUpdate(), onShow(), and resize().

void GenericLayout::refreshRect ( int  x,
int  y,
int  width,
int  height 
) [virtual]

virtual OSGraphics* GenericLayout::getImage (  )  const [inline, virtual]

Get the image of the layout.

Referenced by TopWindow::refresh(), and TopWindow::updateShape().

virtual int GenericLayout::getLeft (  )  const [inline, virtual]

Get the position of the layout (relative to the screen).

Note: These values are different from the m_rect.getLeft() and m_rect.getTop(), which always return 0. The latter methods are there as a "root rect" for the panels and controls, since each control knows its parent rect, but returns coordinates relative to the root rect.

References GenericWindow::getLeft().

Referenced by Anchor::getXPosAbs().

virtual int GenericLayout::getTop (  )  const [inline, virtual]

References GenericWindow::getTop().

Referenced by Anchor::getYPosAbs().

virtual int GenericLayout::getWidth (  )  const [inline, virtual]

virtual int GenericLayout::getHeight (  )  const [inline, virtual]

virtual const GenericRect& GenericLayout::getRect (  )  const [inline, virtual]

virtual int GenericLayout::getMinWidth (  )  const [inline, virtual]

Get the minimum and maximum size of the layout.

Referenced by WindowManager::resize().

virtual int GenericLayout::getMaxWidth (  )  const [inline, virtual]

Referenced by WindowManager::resize().

virtual int GenericLayout::getMinHeight (  )  const [inline, virtual]

Referenced by WindowManager::resize().

virtual int GenericLayout::getMaxHeight (  )  const [inline, virtual]

Referenced by WindowManager::resize().

void GenericLayout::resize ( int  width,
int  height 
) [virtual]

void GenericLayout::addControl ( CtrlGeneric pControl,
const Position rPosition,
int  layer 
) [virtual]

Add a control in the layout at the given position, and the optional given layer.

References CtrlGeneric::draw(), SkinObject::getIntf(), Position::getLeft(), Position::getTop(), CtrlGeneric::getType(), CtrlGeneric::isVisible(), msg_Dbg, and CtrlGeneric::setLayout().

const list< LayeredControl > & GenericLayout::getControlList (  )  const [virtual]

Get the list of the controls in this layout, by layer order.

void GenericLayout::onControlUpdate ( const CtrlGeneric rCtrl,
int  width,
int  height,
int  xOffSet,
int  yOffSet 
) [virtual]

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

References Position::getLeft(), CtrlGeneric::getPosition(), Position::getTop(), refreshAll(), and refreshRect().

Referenced by CtrlGeneric::notifyLayout().

const list< Anchor * > & GenericLayout::getAnchorList (  )  const [virtual]

Get the list of the anchors of this layout.

Referenced by WindowManager::startResize().

void GenericLayout::addAnchor ( Anchor pAnchor  )  [virtual]

Add an anchor to this layout.

void GenericLayout::onShow (  )  [virtual]

Called when the layout is shown.

References refreshAll().

Referenced by TopWindow::innerShow().

void GenericLayout::onHide (  )  [virtual]

Called when the layout is hidden.

Referenced by TopWindow::innerHide().

VarBoolImpl& GenericLayout::getActiveVar (  )  [inline]


The documentation for this class was generated from the following files:

Generated on Tue May 25 08:06:04 2010 for VLC by  doxygen 1.5.6