Ejemplo n.º 1
0
void
Canvas::ShiftPosition (Point p)
{
	Surface *surface = GetDeployment ()->GetSurface ();
	if (surface && IsAttached () && surface->IsTopLevel (this)) {
		ComputeBounds ();
	} else {
		Panel::ShiftPosition (p);
	}
} 
Ejemplo n.º 2
0
void
Canvas::ComputeBounds ()
{
	Surface *surface = GetDeployment ()->GetSurface ();
	Panel::ComputeBounds ();
	coverage_bounds = bounds;
	if (surface && IsAttached () && surface->IsTopLevel (this)) {
		// toplevel canvas don't subscribe to the same bounds computation as others
		bounds = extents = Rect (0, 0, surface->GetWindow()->GetWidth(), surface->GetWindow()->GetHeight());
		bounds_with_children = extents_with_children = Rect (0, 0, surface->GetWindow()->GetWidth(), surface->GetWindow()->GetHeight());

		ComputeGlobalBounds ();
		ComputeSurfaceBounds ();
	}
}