

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 TopWindow * | getWindow () 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 OSGraphics * | getImage () 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 GenericRect & | getRect () 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. | |
| VarBoolImpl & | getActiveVar () |
| Give access to the "active layout" variable. | |
| GenericLayout::GenericLayout | ( | intf_thread_t * | pIntf, | |
| int | width, | |||
| int | height, | |||
| int | minWidth, | |||
| int | maxWidth, | |||
| int | minHeight, | |||
| int | maxHeight | |||
| ) |
| GenericLayout::~GenericLayout | ( | ) | [virtual] |
References CtrlGeneric::unsetLayout().
| void GenericLayout::setWindow | ( | TopWindow * | pWindow | ) | [virtual] |
Attach the layout to a window.
| virtual TopWindow* GenericLayout::getWindow | ( | ) | const [inline, virtual] |
Get the associated window, if any.
Referenced by CtrlGeneric::getWindow(), onControlCapture(), onControlRelease(), Interpreter::parseAction(), refreshRect(), WindowManager::resize(), resize(), and WindowManager::startResize().
| 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] |
Refresh a rectangular portion of the window.
References OSGraphics::clear(), CtrlGeneric::draw(), SkinsRect::getHeight(), Position::getLeft(), CtrlGeneric::getPosition(), Position::getTop(), SkinsRect::getWidth(), getWindow(), CtrlGeneric::isVisible(), TopWindow::refresh(), and TopWindow::updateShape().
Referenced by onControlUpdate(), and refreshAll().
| virtual OSGraphics* GenericLayout::getImage | ( | ) | const [inline, virtual] |
| 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] |
| virtual int GenericLayout::getWidth | ( | ) | const [inline, virtual] |
Get the size of the layout.
References SkinsRect::getWidth().
Referenced by Theme::loadConfig(), WindowManager::maximize(), CtrlVideo::onPositionChange(), WindowManager::resize(), and Theme::saveConfig().
| virtual int GenericLayout::getHeight | ( | ) | const [inline, virtual] |
References SkinsRect::getHeight().
Referenced by Theme::loadConfig(), CtrlVideo::onPositionChange(), WindowManager::resize(), and Theme::saveConfig().
| virtual const GenericRect& GenericLayout::getRect | ( | ) | const [inline, virtual] |
| virtual int GenericLayout::getMinWidth | ( | ) | const [inline, virtual] |
| 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] |
Resize the layout.
References OSFactory::createOSGraphics(), SkinObject::getIntf(), getWindow(), OSFactory::instance(), refreshAll(), and GenericWindow::resize().
Referenced by WindowManager::resize().
| 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().
| void GenericLayout::addAnchor | ( | Anchor * | pAnchor | ) | [virtual] |
Add an anchor to this layout.
| void GenericLayout::onShow | ( | ) | [virtual] |
| void GenericLayout::onHide | ( | ) | [virtual] |
| VarBoolImpl& GenericLayout::getActiveVar | ( | ) | [inline] |
Give access to the "active layout" variable.
Referenced by Interpreter::getVarBool(), CtrlVideo::onUpdate(), CtrlVideo::setLayout(), CtrlButton::setLayout(), CtrlVideo::unsetLayout(), and CtrlButton::unsetLayout().
1.5.6