Skip to main content

IArlecchinoLayout interface

Namespace: Arlecchino.Navigation · Assembly: Arlecchino

The frame every view is drawn inside, from one object that outlives the views. A view asks the Surface for its content and gets the region the layout left it, so it never knows.

public interface IArlecchinoLayout

Methods

MemberSummary
Draw(SurfaceRegion, Action<SurfaceRegion>)Draws the frame, and the view inside it.
HandleMouse(MouseEvent)Reads a mouse event before the view does, for a header that answers to one. A key that works on every screen is an IArlecchinoCommand instead.

Methods in detail

Draw(SurfaceRegion, Action<SurfaceRegion>)

public void Draw(SurfaceRegion frame, Action<SurfaceRegion> body);

Draws the frame, and the view inside it.

Parameters

NameTypeDescription
frameSurfaceRegionEverything there is to draw in.
bodyAction<T><SurfaceRegion>Draws the view into the region it is given. Call it once.

HandleMouse(MouseEvent)

public bool HandleMouse(MouseEvent mouse);

Reads a mouse event before the view does, for a header that answers to one. A key that works on every screen is an IArlecchinoCommand instead.

Parameters

NameTypeDescription
mouseMouseEventThe event that arrived.

Returns booltrue when the layout took it and the view should not see it.