O'Reilly logo

Enterprise Curl by Paul Sheehan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required