|
Class: AbstractBorder
Object
|
+--AbstractBorder
|
+--BeveledBorder
|
+--Border
|
+--MacButtonBorder
|
+--RoundButtonBorder
|
+--SimpleBorder
- Package:
- stx:libview
- Category:
- Graphics-Support
- Version:
- rev:
1.9
date: 2016/06/08 09:39:49
- user: cg
- file: AbstractBorder.st directory: libview
- module: stx stc-classLibrary: libview
- Author:
- Claus Gittinger
Extracted from Border.
Common superclass for border-painters.
This will replace the mixture of window-system supported borders and manually
drawn 3D levels (which is ugly, but served me well for almost 20years now).
instance creation
-
color: aColor
-
create a new instance of the receiver with a border of the given color.
-
new
-
return an initialized instance
-
width: borderWidth
-
create a new instance of the receiver with a border of the given width
(and default color).
-
width: borderWidth color: aColor
-
create a new instance of the receiver with a border of the given width
and color.
accessing
-
color
-
get the color; nil if there is no single color
-
color: aColor
-
set the color
-
level
-
get the 3D level
-
width
-
get the width
-
width: aNumber
-
set the width
-
width: aWidth color: aColor
-
displaying
-
displayOn: aGC forDisplayBox: aRectangle
-
display the borders represented by the receiver in the specified rectangle.
The gc is restored after the draw.
initialization
-
initialize
-
queries
-
allSidesEqual: aSmallInteger
-
true if all four sides have the same border width;
always true here - provided for compatibility
-
bottomMargin
-
return the bottom inset.
That is the number of pixels that an instance of me requires at the bottom,
eg. the inset of the view's contents
-
displayBoxFor: aRectangle
-
return a rectangle representing the overall display box of a component
bordered by the receiver, which has bounds of aRectangle.
That is, the argument outset by the receiver's borders.
-
insetDisplayBoxFor: aRectangle
-
return a rectangle representing the display box of a component
bordered by the receiver in the outer bounds, aRectangle.
That is, the argument inset by the receiver's borders.
-
leftMargin
-
return the left inset.
That is the number of pixels that an instance of me requires at the left,
eg. the inset of the view's contents
-
rightMargin
-
return the right inset.
That is the number of pixels that an instance of me requires at the right,
eg. the inset of the view's contents
-
topMargin
-
return the top inset.
That is the number of pixels that an instance of me requires at the top,
eg. the inset of the view's contents
|