|
Class: AbstractBorder
Object
|
+--AbstractBorder
|
+--BeveledBorder
|
+--Border
|
+--MacButtonBorder
|
+--RoundButtonBorder
|
+--SimpleBorder
- Package:
- stx:libview
- Category:
- Graphics-Support
- Version:
- rev:
1.15
date: 2024/03/04 12:36:15
- user: cg
- file: AbstractBorder.st directory: libview
- module: stx stc-classLibrary: libview
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).
copyrightCOPYRIGHT (c) 1997 by eXept Software AG
COPYRIGHT (c) 2009 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
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.
queries
-
isAbstract
-
Return if this class is an abstract class.
True is returned here for myself only; false for subclasses.
Abstract subclasses must redefine this again.
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
-
dependents
-
-
dependents: aDependentsCollection
-
(comment from inherited method)
set the collection of dependents.
The default implementation here uses a global Dictionary to store
dependents which may be too slow for high frequency change&update.
Therefore, some classes (Model) redefine this for better performance.
-
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
-
nonWeakDependents
-
-
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
|