AppCanvas

AppCanvas is inherited from the standard Curl Canvas class, and acts as a container for instances of the Sheet class, which represents the actual windows. It provides functionality to add new sheets as well as to drag and drop existing sheets within the bounds of a canvas.

AppCanvas has an API that consists of {constructor}, {get-container-bounds}, {add-sheet}, {on-drop}, and {on-drag-over}. These methods provide the basic capabilities to add new sheets to Canvas, and drag and drop those sheets within the bounds of Canvas. The specific processing in each of these methods will be discussed in the following sections.

constructor

The AppCanvas {constructor} method instantiates the class, and its code is listed in Figure 5-1.

The AppCanvas ...

Get Enterprise Curl now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.