示例#1
0
   /// makes a relative rect absolute by asking parent
   void MakeAbsolute(Rect& rectRel) const
   {
      if (Parent() != nullptr)
      {
         rectRel.Add(Parent()->GetPos());

         Parent()->MakeAbsolute(rectRel);
      }
   }
示例#2
0
bool Slider::IsInsideSliderArea(Point pt) const
{
   try
   {
      Rect rect = Window::GetRect();
      rect.Add(Parent()->GetPos());

      unsigned int uiMid = DividerPoint() + rect.Left();
      rect.Left(uiMid - c_uiSliderWidth/2);
      rect.Right(uiMid + c_uiSliderWidth/2);

      return rect.IsInside(pt);
   }
   catch (...)
   {
      return false;
   }
}