Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

CtrlGeneric Class Reference

Base class for controls. More...

#include <ctrl_generic.hpp>

Inheritance diagram for CtrlGeneric:

SkinObject Observer< VarBool > CtrlButton CtrlCheckbox CtrlFlat CtrlList CtrlRadialSlider CtrlSliderBg CtrlSliderCursor CtrlText CtrlTree CtrlVideo List of all members.

Public Member Functions

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 const PositiongetPosition () 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 ()
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

virtual void notifyLayout (int witdh=-1, int height=-1, int xOffSet=0, int yOffSet=0) const
void notifyLayoutMaxSize (const OSGraphics *pImg1=NULL, const OSGraphics *pImg2=NULL)
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 TopWindowgetWindow () const
 Get the associated window, if any.
virtual void onPositionChange ()
virtual void onVarBoolUpdate (VarBool &rVar)
 Overload this method to get notified of bool variable changes.

Detailed Description

Base class for controls.

Definition at line 44 of file ctrl_generic.hpp.


Member Function Documentation

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

Definition at line 72 of file ctrl_generic.cpp.

References GenericLayout::onControlUpdate().

Referenced by CtrlTree::handleEvent(), CtrlList::handleEvent(), notifyLayoutMaxSize(), CtrlTree::onResize(), and CtrlList::onResize().

void CtrlGeneric::notifyLayoutMaxSize const OSGraphics pImg1 = NULL,
const OSGraphics pImg2 = NULL
[protected]
 

Same as notifyLayout(), but takes optional images as parameters. The maximum size(s) of the images will be used for repainting.

Definition at line 83 of file ctrl_generic.cpp.

References OSGraphics::getHeight(), OSGraphics::getWidth(), and notifyLayout().

virtual void CtrlGeneric::onPositionChange  )  [inline, protected, virtual]
 

Overload this method if you want to do something special when the Position object is set

Definition at line 115 of file ctrl_generic.hpp.

Referenced by setLayout().

virtual void CtrlGeneric::onResize  )  [inline, virtual]
 

Overload this method if you want to do something special when the layout is resized

Reimplemented in CtrlList, CtrlTree, and CtrlVideo.

Definition at line 71 of file ctrl_generic.hpp.


The documentation for this class was generated from the following files:
Generated on Tue Dec 20 10:15:03 2005 for vlc-0.8.4a by  doxygen 1.4.2