Back: BLOX.BButtonLike-accessing Up: BLOX package Forward: BLOX.BCanvas-accessing   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.6 BLOX.BCanvas

Defined in namespace BLOX
Superclass: BLOX.BViewport
Category: Graphics-Windows

I am an host for whatever geometric shape you want. If you want to do some fancy graphics with Smalltalk, I'll be happy to help. My friends derived from BCanvasObject ask me all sort of things to do, so I am the real worker, not they!

BCanvasObject: I am BCanvas: No I am BCanvasObject: No I am BCanvas: No I am

well, you know, he always has something to object.

1.6.1 BLOX.BCanvas: accessing  (instance)
1.6.2 BLOX.BCanvas: geometry management  (instance)
1.6.3 BLOX.BCanvas: widget protocol  (instance)


1.6.1 BLOX.BCanvas: accessing

backgroundColor
Answer the value of the backgroundColor option for the widget.

Specifies the normal background color to use when displaying the widget.

backgroundColor: value
Set the value of the backgroundColor option for the widget.

Specifies the normal background color to use when displaying the widget.

foregroundColor
Answer the value of the foregroundColor option for the widget.

Specifies the normal foreground color to use when displaying the widget.

foregroundColor: value
Set the value of the foregroundColor option for the widget.

Specifies the normal foreground color to use when displaying the widget.


1.6.2 BLOX.BCanvas: geometry management

addChild: child
The widget identified by child has been added to the receiver. This method is public not because you can call it, but because it can be useful to override it, not forgetting the call to either the superclass implementation or #basicAddChild:, to perform some initialization on the children just added. Answer the new child.

child: child height: value
Set the given child's height.

child: child heightOffset: value
Offset the given child's height by value pixels.

child: child width: value
Set the given child's width.

child: child widthOffset: value
Offset the given child's width by value pixels.

child: child x: value
Set the given child's top-left corner's x coordinate, in pixels in the canvas' coordinate system.

child: child xOffset: value
Offset the given child's top-left x by value pixels.

child: child y: value
Set the given child's top-left corner's y coordinate, in pixels in the canvas' coordinate system.

child: child yOffset: value
Offset the given child's top-left y by value pixels.

heightChild: child
Answer the given child's height in pixels.

widthChild: child
Answer the given child's width in pixels.

xChild: child
Answer the given child's top-left corner's x coordinate, in pixels in the canvas' coordinate system.

yChild: child
Answer the given child's top-left corner's y coordinate, in pixels in the canvas' coordinate system.


1.6.3 BLOX.BCanvas: widget protocol

at: aPoint
Selects the topmost item in the canvas overlapping the point given by aPoint.

between: origin and: corner do: aBlock
Evaluate aBlock for each item whose bounding box intersects the rectangle between the two Points, origin and corner. Pass the item to the block.

boundingBox
Answer the bounding box of all the items in the canvas

destroyed
The widget has been destroyed. Tell all of its items about this fact.

do: aBlock
Evaluate aBlock, passing each item to it.

empty
Remove all the items from the canvas, leaving it empty

extraSpace
Answer the amount of space that is left as a border around the canvas items.

extraSpace: aPoint
Set the amount of space that is left as a border around the canvas items.

items
Answer an Array containing all the items in the canvas

mapPoint: aPoint
Given aPoint, a point expressed in window coordinates, answer the corresponding canvas coordinates that are displayed at that location.



Back: BLOX.BCanvas-geometry management Up: BLOX.BCanvas Forward: BLOX.BCanvasObject   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on July, 23 2009 using texi2html