eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'BeveledBorder':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: BeveledBorder


Inheritance:

   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

Description:


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).

copyright

COPYRIGHT (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.

Class protocol:

constants
o  inset
Answer the default beveled border with inset edges.

Usage example(s):

     self inset

o  inset1
Answer the default beveled border with inset edges of thickness 1.

o  raised
Answer the default beveled border with raised edges.

o  raised1
Answer the default beveled border with raised edges of thickness 1.

instance creation
o  level: aNumber

o  level: aNumber color: aColor


Instance protocol:

accessing
o  color

o  color: aColor
(comment from inherited method)
set the color

o  level
(comment from inherited method)
get the 3D level

o  level: anInteger

o  level: aNumber color: aColor

displaying
o  displayOn: aGC forDisplayBox: aRectangle
View new
border:(BeveledBorder level:2 color:Color red);
open.


Examples:


     |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.


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 06:39:26 GMT