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
| Member | Summary |
|---|---|
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
| Name | Type | Description |
|---|---|---|
frame | SurfaceRegion | Everything there is to draw in. |
body | Action<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
| Name | Type | Description |
|---|---|---|
mouse | MouseEvent | The event that arrived. |
Returns bool — true when the layout took it and the view should not see it.