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

Anchor Class Reference

Class for the windows anchors. More...

#include <anchor.hpp>

Inheritance diagram for Anchor:

SkinObject List of all members.

Public Member Functions

bool isHanging (const Anchor &rOther) const
bool canHang (const Anchor &rOther, int &xOffset, int &yOffset) const

Detailed Description

Class for the windows anchors.

Definition at line 34 of file anchor.hpp.


Member Function Documentation

bool Anchor::canHang const Anchor rOther,
int &  xOffset,
int &  yOffset
const
 

Return true if the other anchor, moved by the (xOffset, yOffset) vector, is "hangable" by this one (i.e. if it is in its range of action), else return false. When the function returns true, the xOffset and yOffset parameters are modified to indicate the position that the other anchor would take if hanged by this one (this position is calculated to minimize the difference with the old xOffset and yOffset, so that the window doesn't "jump" in a strange way).

Definition at line 44 of file anchor.cpp.

References Bezier::getMinDist(), Bezier::getNearestPercent(), and Bezier::getPoint().

bool Anchor::isHanging const Anchor rOther  )  const
 

Return true if the given anchor is hanged by this one Two conditions are required:

  • the other anchor must be in position of anchoring (as defined by canHang())
  • the priority of the other anchor must be lower than this one's

Definition at line 28 of file anchor.cpp.

References Bezier::getMinDist(), getXPosAbs(), getYPosAbs(), isPoint(), m_priority, and m_rCurve.


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