--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Tools__BrowsletCanvas.st Fri Jul 01 15:11:27 2011 +0200
@@ -0,0 +1,272 @@
+"
+ COPYRIGHT (c) 2006 by 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.
+"
+"{ Package: 'stx:libtool' }"
+
+"{ NameSpace: Tools }"
+
+ApplicationModel subclass:#BrowsletCanvas
+ instanceVariableNames:'browsletHolder'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Interface-Browsers-Browslets'
+!
+
+!BrowsletCanvas class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 2006 by 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.
+"
+! !
+
+!BrowsletCanvas class methodsFor:'image specs'!
+
+closeBrowsletIcon
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self closeBrowsletIcon inspect
+ ImageEditor openOnClass:self andSelector:#closeBrowsletIcon
+ Icon flushCachedIcons
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:'Tools::NewSystemBrowser class closeBrowsletIcon'
+ ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
+O?1@A,@C @FLLX91!!>FC0XOA!!>FN\X01 @G@@6@FO?0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]
+!
+
+hideBrowsletIcon
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self hideBrowsletIcon inspect
+ ImageEditor openOnClass:self andSelector:#hideBrowsletIcon
+ Icon flushCachedIcons
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:'Tools::NewSystemBrowser class hideBrowsletIcon'
+ ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
+O?1@A,@C @FL@X<A#<FO<X?1#<FO@X0A @G@@6@FO?0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]
+!
+
+popupBrowsletIcon
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self popupBrowsletIcon inspect
+ ImageEditor openOnClass:self andSelector:#popupBrowsletIcon
+ Icon flushCachedIcons
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:'BrowsletCanvas class popupBrowsletIcon'
+ ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
+O?1@A,@C @F@@X?1#?FG8X_!! <FC0XFA XG@@6@FO?0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]
+!
+
+showBrowsletIcon
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self showBrowsletIcon inspect
+ ImageEditor openOnClass:self andSelector:#showBrowsletIcon
+ Icon flushCachedIcons
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:'Tools::NewSystemBrowser class showBrowsletIcon'
+ ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
+O?1@A,@C @F@LXC1 ?FO<X?1 ?F@<X@1 @G@@6@FO?0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]
+! !
+
+!BrowsletCanvas class methodsFor:'interface specs'!
+
+windowSpec
+ "This resource specification was automatically generated
+ by the UIPainter of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the UIPainter may not be able to read the specification."
+
+ "
+ UIPainter new openOnClass:BrowsletCanvas andSelector:#windowSpec
+ BrowsletCanvas new openInterface:#windowSpec
+ BrowsletCanvas open
+ "
+
+ <resource: #canvas>
+
+ ^
+ #(FullSpec
+ name: windowSpec
+ window:
+ (WindowSpec
+ label: 'Browslet Canvas'
+ name: 'Browslet Canvas'
+ bounds: (Rectangle 0 0 300 300)
+ )
+ component:
+ (SpecCollection
+ collection: (
+ (TransparentBoxSpec
+ name: 'Box'
+ layout: (LayoutFrame 0 0 0 0 0 1 20 0)
+ component:
+ (SpecCollection
+ collection: (
+ (ActionButtonSpec
+ label: 'popupBrowsletIcon'
+ name: 'Button1'
+ layout: (LayoutFrame 0 0 0 0 20 0 0 1)
+ level: 0
+ hasCharacterOrientedLabel: false
+ translateLabel: true
+ model: popupAction
+ )
+ (ActionButtonSpec
+ label: 'closeBrowsletIcon'
+ name: 'CloseButton'
+ layout: (LayoutFrame -20 1 0 0 0 1 0 1)
+ level: 0
+ hasCharacterOrientedLabel: false
+ translateLabel: true
+ model: closeAction
+ )
+ (LinkButtonSpec
+ label: '...'
+ name: 'Browslet'
+ layout: (LayoutFrame 25 0 0 0 -25 1 0 1)
+ translateLabel: true
+ adjust: left
+ model: popupAction
+ )
+ )
+
+ )
+ )
+ (SubCanvasSpec
+ name: 'Browslet'
+ layout: (LayoutFrame 0 0 20 0 0 1 0 1)
+ hasHorizontalScrollBar: false
+ hasVerticalScrollBar: false
+ clientHolder: browsletHolder
+ createNewBuilder: false
+ )
+ )
+
+ )
+ )
+
+ "Modified: / 04-10-2010 / 23:36:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!BrowsletCanvas methodsFor:'actions'!
+
+closeAction
+ <resource: #uiCallback>
+
+ | topApp |
+ topApp := self masterApplication.
+ topApp
+ ifNil:[self closeRequest]
+ ifNotNil:[topApp showPlugin: false]
+
+ "Modified: / 04-10-2010 / 18:39:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+popupAction
+ <resource: #uiCallback>
+
+ | menu |
+ menu := Menu new.
+ (Browslet all asSortedCollection:[:a :b|a label < b label]) do:
+ [ :browslet | | item |
+ menu addItem:
+ (MenuItem
+ label: browslet label
+ value: [ self show: browslet ])].
+ menu showAtPointer.
+
+ "Modified: / 04-10-2010 / 23:02:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!BrowsletCanvas methodsFor:'aspects'!
+
+browsletHolder
+ "return/create the 'browsletHolder' value holder (automatically generated)"
+
+ browsletHolder isNil ifTrue:[
+ browsletHolder := ValueHolder new.
+ ].
+ ^ browsletHolder
+! !
+
+!BrowsletCanvas methodsFor:'private'!
+
+show: browsletClass
+
+ self browsletHolder value: browsletClass new
+
+ "Created: / 04-10-2010 / 23:03:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!BrowsletCanvas class methodsFor:'documentation'!
+
+version_CVS
+ ^ '$Header: /cvs/stx/stx/libtool/Tools__BrowsletCanvas.st,v 1.1 2011-07-01 13:11:27 cg Exp $'
+!
+
+version_SVN
+ ^ '§Id: Tools__BrowsletCanvas.st 7637 2010-10-04 21:44:44Z vranyj1 §'
+! !