1: ================================================================================
 2: 
 3: Smalltalk defineClass: #MyFirstView
 4:     superclass: #{UI.View}
 5:     indexedType: #none
 6:     private: false
 7:     instanceVariableNames: ''
 8:     classInstanceVariableNames: ''
 9:     imports: ''
10:     category: ''
11: 
12: ================================================================================
13: 
14: MyFirstView method for 'displaying'
15: 
16: displayOn: aGraphicsContext
17: 
18:     self model rectangles do: 
19:             [:aRectangle |
20:             aGraphicsContext paint: ColorValue red.
21:             aGraphicsContext displayRectangle: aRectangle.
22:             aGraphicsContext paint: ColorValue white.
23:             aGraphicsContext displayRectangle: (aRectangle insetBy: 1)]
24: 
25: ------------------------------------------------------------
26: 
27: MyFirstView method for 'display box accessing'
28: 
29: preferredBounds
30: 
31:     | preferredBounds |
32:     preferredBounds := 0 @ 0 extent: 0 @ 0.
33:     self model rectangles
34:         do: [:aRectangle | preferredBounds := preferredBounds merge: aRectangle].
35:     ^preferredBounds
36: 
37: ================================================================================
38: 
39: Smalltalk.MyFirstView class
40:     instanceVariableNames: ''
41: 
42: ================================================================================

This document was generated by KSU.TextDoclet on 2012/09/14 at 09:27:11.