

Public Member Functions | |
| virtual | ~CtrlGeneric () |
| virtual void | handleEvent (EvtGeneric &rEvent) |
| Handle an event on the control. | |
| virtual bool | mouseOver (int x, int y) const |
| Check whether coordinates are inside the control. | |
| virtual void | draw (OSGraphics &rImage, int xDest, int yDest) |
| Draw the control on the given graphics. | |
| virtual void | setLayout (GenericLayout *pLayout, const Position &rPosition) |
| Set the position and the associated layout of the control. | |
| virtual void | unsetLayout () |
| virtual const Position * | getPosition () const |
| Get the position of the control in the layout, if any. | |
| virtual UString | getTooltipText () const |
| Get the text of the tooltip. | |
| virtual void | onResize () |
| Overload this method if you want to do something special when the layout is resized. | |
| virtual const UString & | getHelpText () const |
| Get the help text. | |
| virtual bool | isFocusable () const |
| Return true if the control can gain the focus. | |
| virtual bool | isVisible () const |
| Return true if the control is visible. | |
| virtual string | getType () const |
| Get the type of control (custom RTTI). | |
Protected Member Functions | |
| CtrlGeneric (intf_thread_t *pIntf, const UString &rHelp, VarBool *pVisible=NULL) | |
| virtual void | notifyLayout (int witdh=-1, int height=-1, int xOffSet=0, int yOffSet=0) const |
| Tell the layout when the image has changed, with the size of the rectangle to repaint and its offset. | |
| void | notifyLayoutMaxSize (const Box *pImg1=NULL, const Box *pImg2=NULL) |
| Same as notifyLayout(), but takes optional images as parameters. | |
| virtual void | captureMouse () const |
| Ask the layout to capture the mouse. | |
| virtual void | releaseMouse () const |
| Ask the layout to release the mouse. | |
| virtual void | notifyTooltipChange () const |
| Notify the window the tooltip has changed. | |
| virtual TopWindow * | getWindow () const |
| Get the associated window, if any. | |
| virtual void | onPositionChange () |
| Overload this method if you want to do something special when the Position object is set. | |
| virtual void | onVarBoolUpdate (VarBool &rVar) |
| Overload this method to get notified of bool variable changes. | |
| virtual void | onUpdate (Subject< VarBool > &rVariable, void *) |
| Method called when an observed bool variable is changed. | |
Protected Attributes | |
| GenericLayout * | m_pLayout |
| Associated layout. | |
| VarBool * | m_pVisible |
| Visibility variable. | |
| CtrlGeneric::~CtrlGeneric | ( | ) | [virtual] |
References Subject< S, ARG >::delObserver(), and m_pVisible.
| CtrlGeneric::CtrlGeneric | ( | intf_thread_t * | pIntf, | |
| const UString & | rHelp, | |||
| VarBool * | pVisible = NULL | |||
| ) | [protected] |
References Subject< S, ARG >::addObserver(), and m_pVisible.
| virtual void CtrlGeneric::handleEvent | ( | EvtGeneric & | rEvent | ) | [inline, virtual] |
Handle an event on the control.
Reimplemented in CtrlButton, CtrlCheckbox, CtrlImage, CtrlList, CtrlMove, CtrlRadialSlider, CtrlResize, CtrlSliderCursor, CtrlSliderBg, CtrlText, CtrlTree, and CtrlVideo.
Referenced by TopWindow::forwardEvent(), CtrlResize::handleEvent(), CtrlMove::handleEvent(), TopWindow::onControlRelease(), and TopWindow::processEvent().
| virtual bool CtrlGeneric::mouseOver | ( | int | x, | |
| int | y | |||
| ) | const [inline, virtual] |
Check whether coordinates are inside the control.
Reimplemented in CtrlButton, CtrlCheckbox, CtrlImage, CtrlList, CtrlMove, CtrlRadialSlider, CtrlResize, CtrlSliderCursor, CtrlSliderBg, CtrlText, CtrlTree, and CtrlVideo.
Referenced by CtrlResize::mouseOver(), and CtrlMove::mouseOver().
| virtual void CtrlGeneric::draw | ( | OSGraphics & | rImage, | |
| int | xDest, | |||
| int | yDest | |||
| ) | [inline, virtual] |
Draw the control on the given graphics.
Reimplemented in CtrlButton, CtrlCheckbox, CtrlImage, CtrlList, CtrlMove, CtrlRadialSlider, CtrlResize, CtrlSliderCursor, CtrlSliderBg, CtrlText, CtrlTree, and CtrlVideo.
Referenced by GenericLayout::addControl(), CtrlResize::draw(), CtrlMove::draw(), and GenericLayout::refreshRect().
| void CtrlGeneric::setLayout | ( | GenericLayout * | pLayout, | |
| const Position & | rPosition | |||
| ) | [virtual] |
Set the position and the associated layout of the control.
Reimplemented in CtrlButton, CtrlMove, CtrlResize, and CtrlVideo.
References m_pLayout, onPositionChange(), and Position().
Referenced by GenericLayout::addControl(), CtrlVideo::setLayout(), CtrlResize::setLayout(), CtrlMove::setLayout(), and CtrlButton::setLayout().
| void CtrlGeneric::unsetLayout | ( | ) | [virtual] |
Reimplemented in CtrlButton, CtrlMove, CtrlResize, and CtrlVideo.
References m_pLayout.
Referenced by CtrlVideo::unsetLayout(), CtrlResize::unsetLayout(), CtrlMove::unsetLayout(), CtrlButton::unsetLayout(), and GenericLayout::~GenericLayout().
| virtual const Position* CtrlGeneric::getPosition | ( | ) | const [inline, virtual] |
Get the position of the control in the layout, if any.
Reimplemented in CtrlMove, and CtrlResize.
Referenced by CtrlVideo::draw(), CtrlText::draw(), CtrlImage::draw(), CtrlResize::getPosition(), CtrlMove::getPosition(), CtrlTree::handleEvent(), CtrlSliderBg::handleEvent(), CtrlList::handleEvent(), CtrlTree::mouseOver(), CtrlText::mouseOver(), CtrlList::mouseOver(), CtrlImage::mouseOver(), GenericLayout::onControlUpdate(), CtrlVideo::onPositionChange(), CtrlVideo::onResize(), CtrlList::onResize(), GenericLayout::refreshRect(), CtrlVideo::resizeControl(), and VoutWindow::setCtrlVideo().
| virtual UString CtrlGeneric::getTooltipText | ( | ) | const [inline, virtual] |
Get the text of the tooltip.
Reimplemented in CtrlButton, CtrlCheckbox, and CtrlSliderCursor.
References SkinObject::getIntf().
Referenced by TopWindow::onControlRelease(), and TopWindow::onTooltipChange().
| virtual void CtrlGeneric::onResize | ( | ) | [inline, virtual] |
Overload this method if you want to do something special when the layout is resized.
Reimplemented in CtrlList, CtrlMove, CtrlResize, CtrlSliderBg, CtrlTree, and CtrlVideo.
Referenced by CtrlResize::onResize(), and CtrlMove::onResize().
| virtual const UString& CtrlGeneric::getHelpText | ( | ) | const [inline, virtual] |
| virtual bool CtrlGeneric::isFocusable | ( | ) | const [inline, virtual] |
Return true if the control can gain the focus.
Reimplemented in CtrlList, and CtrlTree.
Referenced by TopWindow::processEvent().
| bool CtrlGeneric::isVisible | ( | ) | const [virtual] |
Return true if the control is visible.
References VarBool::get(), and m_pVisible.
Referenced by GenericLayout::addControl(), CtrlVideo::onUpdate(), GenericLayout::refreshRect(), and CtrlVideo::setLayout().
| virtual string CtrlGeneric::getType | ( | ) | const [inline, virtual] |
Get the type of control (custom RTTI).
Reimplemented in CtrlButton, CtrlCheckbox, CtrlImage, CtrlList, CtrlMove, CtrlRadialSlider, CtrlResize, CtrlSliderCursor, CtrlSliderBg, CtrlText, CtrlTree, and CtrlVideo.
Referenced by GenericLayout::addControl(), CtrlResize::getType(), and CtrlMove::getType().
| void CtrlGeneric::notifyLayout | ( | int | witdh = -1, |
|
| int | height = -1, |
|||
| int | xOffSet = 0, |
|||
| int | yOffSet = 0 | |||
| ) | const [protected, virtual] |
Tell the layout when the image has changed, with the size of the rectangle to repaint and its offset.
Use the default values to repaint the whole window
References m_pLayout, and GenericLayout::onControlUpdate().
Referenced by CtrlTree::handleEvent(), CtrlList::handleEvent(), notifyLayoutMaxSize(), CtrlVideo::onUpdate(), and onUpdate().
| void CtrlGeneric::notifyLayoutMaxSize | ( | const Box * | pImg1 = NULL, |
|
| const Box * | pImg2 = NULL | |||
| ) | [protected] |
Same as notifyLayout(), but takes optional images as parameters.
The maximum size(s) of the images will be used for repainting.
References Box::getHeight(), Box::getWidth(), and notifyLayout().
| void CtrlGeneric::captureMouse | ( | ) | const [protected, virtual] |
| void CtrlGeneric::releaseMouse | ( | ) | const [protected, virtual] |
| void CtrlGeneric::notifyTooltipChange | ( | ) | const [protected, virtual] |
Notify the window the tooltip has changed.
References getWindow(), and TopWindow::onTooltipChange().
| TopWindow * CtrlGeneric::getWindow | ( | ) | const [protected, virtual] |
Get the associated window, if any.
References GenericLayout::getWindow(), and m_pLayout.
Referenced by CtrlVideo::getWindow(), CtrlSliderBg::handleEvent(), and notifyTooltipChange().
| virtual void CtrlGeneric::onPositionChange | ( | ) | [inline, protected, virtual] |
Overload this method if you want to do something special when the Position object is set.
Reimplemented in CtrlVideo.
Referenced by setLayout().
| virtual void CtrlGeneric::onVarBoolUpdate | ( | VarBool & | rVar | ) | [inline, protected, virtual] |
Method called when an observed bool variable is changed.
Reimplemented in CtrlVideo.
References m_pVisible, notifyLayout(), and onVarBoolUpdate().
GenericLayout* CtrlGeneric::m_pLayout [protected] |
Associated layout.
Referenced by captureMouse(), getWindow(), notifyLayout(), CtrlVideo::onUpdate(), releaseMouse(), CtrlVideo::setLayout(), setLayout(), CtrlButton::setLayout(), CtrlVideo::unsetLayout(), unsetLayout(), and CtrlButton::unsetLayout().
VarBool* CtrlGeneric::m_pVisible [protected] |
Visibility variable.
Referenced by CtrlGeneric(), isVisible(), CtrlVideo::onUpdate(), onUpdate(), and ~CtrlGeneric().
1.5.6