#DOCUMENTATION by cg
class: LinkButton
added: #level:
comment/format in:
#documentation
#drawStringLogo:x:y:
--- 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|