--- a/Label.st Thu Aug 22 15:55:26 2013 +0200
+++ b/Label.st Thu Aug 22 19:23:14 2013 +0200
@@ -886,6 +886,37 @@
"Modified: / 31.10.1997 / 14:53:48 / cg"
! !
+!Label class methodsFor:'menu specs'!
+
+middleButtonMenu
+ "This resource specification was automatically generated
+ by the MenuEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the MenuEditor may not be able to read the specification."
+
+
+ "
+ MenuEditor new openOnClass:Label andSelector:#middleButtonMenu
+ (Menu new fromLiteralArrayEncoding:(Label middleButtonMenu)) startUp
+ "
+
+ <resource: #menu>
+
+ ^
+ #(Menu
+ (
+ (MenuItem
+ label: 'Copy Label Text'
+ itemValue: copyLabelText
+ enabled: isTextLabel
+ )
+ )
+ nil
+ nil
+ )
+! !
+
!Label methodsFor:'accessing-channels'!
labelChannel
@@ -1415,6 +1446,28 @@
super release
! !
+!Label methodsFor:'menu'!
+
+copyLabelText
+ |text|
+
+ text := logo asString.
+ self setClipboardText:text.
+!
+
+middleButtonMenu
+ |m|
+
+ m := super middleButtonMenu.
+ m isNil ifTrue:[
+ "/ not a customized menu
+ self class == Label ifTrue:[
+ m := self class middleButtonMenu
+ ].
+ ].
+ ^ m
+! !
+
!Label methodsFor:'others'!
rawLabelSizeOf:aLogo
@@ -1606,6 +1659,10 @@
!Label methodsFor:'queries'!
+isTextLabel
+ ^ logo isString
+!
+
preferredExtent
"return my preferred extent - this is the minimum size I would like to have"
@@ -1896,9 +1953,10 @@
!Label class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Label.st,v 1.148 2012-08-03 20:25:43 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Label.st,v 1.149 2013-08-22 17:23:14 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/Label.st,v 1.148 2012-08-03 20:25:43 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Label.st,v 1.149 2013-08-22 17:23:14 cg Exp $'
! !
+