CtrlTree Class Reference

Class for control tree. More...

Inheritance diagram for CtrlTree:

Inheritance graph
[legend]
Collaboration diagram for CtrlTree:

Collaboration graph
[legend]

Public Member Functions

 CtrlTree (intf_thread_t *pIntf, VarTree &rTree, const GenericFont &rFont, const GenericBitmap *pBgBitmap, const GenericBitmap *pItemBitmap, const GenericBitmap *pOpenBitmap, const GenericBitmap *pClosedBitmap, uint32_t fgColor, uint32_t playColor, uint32_t bgColor1, uint32_t bgColor2, uint32_t selColor, const UString &rHelp, VarBool *pVisible, VarBool *pFlat)
virtual ~CtrlTree ()
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 onResize ()
 Called when the layout is resized.
virtual bool isFocusable () const
 Return true if the control can gain the focus.
virtual string getType () const
 Get the type of control (custom RTTI).
bool ensureVisible (VarTree::Iterator item)
 Make sure an item is visible.
bool ensureVisible (int itemIndex)
 Make sure an item is visible.

Detailed Description

Class for control tree.

Constructor & Destructor Documentation

CtrlTree::CtrlTree ( intf_thread_t pIntf,
VarTree rTree,
const GenericFont rFont,
const GenericBitmap pBgBitmap,
const GenericBitmap pItemBitmap,
const GenericBitmap pOpenBitmap,
const GenericBitmap pClosedBitmap,
uint32_t  fgColor,
uint32_t  playColor,
uint32_t  bgColor1,
uint32_t  bgColor2,
uint32_t  selColor,
const UString rHelp,
VarBool pVisible,
VarBool pFlat 
)

CtrlTree::~CtrlTree (  )  [virtual]


Member Function Documentation

void CtrlTree::handleEvent ( EvtGeneric rEvent  )  [virtual]

bool CtrlTree::mouseOver ( int  x,
int  y 
) const [virtual]

Check whether coordinates are inside the control.

Reimplemented from CtrlGeneric.

References Position::getHeight(), CtrlGeneric::getPosition(), and Position::getWidth().

void CtrlTree::draw ( OSGraphics rImage,
int  xDest,
int  yDest 
) [virtual]

Draw the control on the given graphics.

Reimplemented from CtrlGeneric.

References OSGraphics::drawGraphics().

void CtrlTree::onResize (  )  [virtual]

virtual bool CtrlTree::isFocusable (  )  const [inline, virtual]

Return true if the control can gain the focus.

Reimplemented from CtrlGeneric.

virtual string CtrlTree::getType (  )  const [inline, virtual]

Get the type of control (custom RTTI).

Reimplemented from CtrlGeneric.

bool CtrlTree::ensureVisible ( VarTree::Iterator  item  ) 

Make sure an item is visible.

Parameters:
item an iterator to a tree item
Returns:
true if it changed the position

References VarTree::begin(), VarTree::end(), VarTree::ensureExpanded(), VarTree::firstLeaf(), VarTree::getNextLeaf(), and VarTree::getNextVisibleItem().

Referenced by handleEvent().

bool CtrlTree::ensureVisible ( int  itemIndex  ) 

Make sure an item is visible.

Parameters:
itemIndex the absolute index in the tree
Returns:
true if it changed the position

References VarTree::begin(), VarTree::countLeafs(), VarTree::end(), VarTree::firstLeaf(), VarTree::getNextLeaf(), VarTree::getNextVisibleItem(), VarTree::getPositionVar(), VarPercent::set(), and VarTree::visibleItems().


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

Generated on Tue May 25 08:05:55 2010 for VLC by  doxygen 1.5.6