#DOCUMENTATION by cg
authorClaus Gittinger <cg@exept.de>
Tue, 03 May 2016 13:24:09 +0200
changeset 5045 50eb267766b2
parent 5044 f8c330427edc
child 5046 60d0ef296d3a
#DOCUMENTATION by cg class: LinkButton added: #level: comment/format in: #documentation #drawStringLogo:x:y:
LinkButton.st
--- a/LinkButton.st	Mon May 02 17:38:22 2016 +0200
+++ b/LinkButton.st	Tue May 03 13:24:09 2016 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "{ Package: 'stx:libwidg2' }"
 
 "{ NameSpace: Smalltalk }"
@@ -16,7 +14,8 @@
 documentation
 "
     Looks like a Label, but behaves like a button with individually clickable text components.
-    Can be used to create html-page-look-alike links in a view.
+    Can be used to create html-page-look-alike links in a view,
+    especially to make label-looking action buttons.
 
     [author:]
         cg (cg@CG-VOSTRO)
@@ -129,6 +128,11 @@
 
     labelsAndActions := aCollectionOfAssociations.
     self label:((aCollectionOfAssociations collect:[:assoc | assoc key]) asStringWith:'')
+!
+
+level:anInteger
+    enterLevel := leaveLevel := onLevel := offLevel := level := anInteger.
+    margin := level abs.
 ! !
 
 !LinkButton methodsFor:'initialization'!
@@ -242,7 +246,7 @@
 !
 
 drawStringLogo:aString x:x y:y
-    "redefined to draw the part under the mouse pointer with an underined emphasis"
+    "redefined to draw any anchor under the mouse pointer with an underlined emphasis"
 
     |str entered mousePoint start len emphasis|