|
Class: BeveledBorder
Object
|
+--AbstractBorder
|
+--BeveledBorder
- Package:
- stx:libview
- Category:
- Graphics-Support
- Version:
- rev:
1.10
date: 2022/02/17 10:25:53
- user: cg
- file: BeveledBorder.st directory: libview
- module: stx stc-classLibrary: libview
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) 2009 by Claus Gittinger / 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.
constants
-
inset
-
Answer the default beveled border with inset edges.
Usage example(s):
-
inset1
-
Answer the default beveled border with inset edges of thickness 1.
-
raised
-
Answer the default beveled border with raised edges.
-
raised1
-
Answer the default beveled border with raised edges of thickness 1.
instance creation
-
level: aNumber
-
-
level: aNumber color: aColor
-
accessing
-
color
-
-
color: aColor
-
(comment from inherited method)
set the color
-
level
-
(comment from inherited method)
get the 3D level
-
level: anInteger
-
-
level: aNumber color: aColor
-
displaying
-
displayOn: aGC forDisplayBox: aRectangle
-
View new
border:(BeveledBorder level:2 color:Color red);
open.
|top v b|
top := StandardSystemView extent:100@100.
v := View origin:10@10 corner:90@30 in:top.
top openAndWaitUntilVisible.
b := BeveledBorder raised1.
v border:b.
Delay waitForSeconds:1.
v border:(BeveledBorder level:2).
Delay waitForSeconds:1.
v border:(BeveledBorder level:3).
Delay waitForSeconds:1.
v border:(BeveledBorder level:-3).
Delay waitForSeconds:1.
v border:(BeveledBorder level:-2).
Delay waitForSeconds:1.
v border:(BeveledBorder level:-1).
Delay waitForSeconds:1.
v border:(BeveledBorder level:0).
|
|top v b|
top := StandardSystemView extent:100@100.
v := View origin:10@10 corner:90@30 in:top.
top openAndWaitUntilVisible.
b := BeveledBorder raised1.
v border:b.
Delay waitForSeconds:1.
b level:2.
Delay waitForSeconds:1.
b level:3.
Delay waitForSeconds:1.
b level:-3.
Delay waitForSeconds:1.
b level:-2.
Delay waitForSeconds:1.
b level:-1.
Delay waitForSeconds:1.
b level:0.
|
|top v b|
top := StandardSystemView extent:100@100.
v := View origin:10@10 corner:90@30 in:top.
top openAndWaitUntilVisible.
b := BeveledBorder inset1.
v border:b.
|
|