'From Squeak3.1alpha of 28 February 2001 [latest update: #4076] on 25 May 2001 at 10:05:29 am'! "Change Set: lexiconDefaults-sw Date: 25 May 2001 Author: Scott Wallace (1) Repositions the three special categories in Lexicons at the *end* of the category-list rather than the beginning. (2) Removes color from button borders. (3) Now decorate the buttons only on creation."! !CodeHolder methodsFor: 'controls' stamp: 'sw 5/25/2001 10:04'! codePaneProvenanceButton "Answer a button that reports on, and allow the user to modify, the code-pane-provenance setting" | aButton aWrapper | aButton _ UpdatingSimpleButtonMorph newWithLabel: 'source'. aButton setNameTo: 'codeProvenance'. aButton useSquareCorners. aButton target: self; wordingSelector: #codePaneProvenanceString; actionSelector: #offerWhatToShowMenu. aButton setBalloonText: 'Governs what view is shown in the code pane. Click here to change the view'. aButton actWhen: #buttonDown. aButton color: self defaultBackgroundColor lighter. aButton borderColor: Color blue lighter. aWrapper _ AlignmentMorph newRow beTransparent. aWrapper hResizing: #rigid; vResizing: #rigid. aWrapper height: 20. aWrapper addMorphBack: aButton. "aWrapper cellPositioning: #leftCenter." aButton cellPositioning: #topCenter. aButton center: aWrapper center. aWrapper cellPositioning: #topCenter. ^ aWrapper! ! !Lexicon methodsFor: 'initialization' stamp: 'sw 5/25/2001 02:04'! openOnClass: aTargetClass inWorld: aWorld showingSelector: aSelector "Create and open a SystemWindow to house the receiver, showing the categories pane. The target-object parameter is optional -- if nil, the browser will be associated with the class as a whole but not with any particular instance of it." | window aListMorph catListFraction msgListFraction | currentVocabulary ifNil: [currentVocabulary _ Vocabulary fullVocabulary]. limitClass ifNil: [limitClass _ ProtoObject]. targetClass _ aTargetClass. window _ self windowWithLabel: self startingWindowTitle. catListFraction _ 0.15. msgListFraction _ 0.2. window addMorph: self newCategoryPane frame: (0 @ 0 corner: 1 @ catListFraction). aListMorph _ PluggableListMorph on: self list: #messageList selected: #messageListIndex changeSelected: #messageListIndex: menu: #messageListMenu:shifted: keystroke: #messageListKey:from:. aListMorph setNameTo: 'messageList'. aListMorph menuTitleSelector: #messageListSelectorTitle. window addMorph: aListMorph frame: (0 @ catListFraction corner: 1 @ (catListFraction + msgListFraction)). self addLowerPanesTo: window at: (0 @ (catListFraction + msgListFraction) corner: 1@1) with: nil. window changeAllBorderColorsFrom: Color black to: (self defaultBackgroundColor mixed: 0.5 with: Color black). window color: self defaultBackgroundColor. window openInWorld: aWorld. self reformulateCategoryList. aSelector ifNotNil: [self selectSelectorItsNaturalCategory: aSelector] ifNil: [self categoryListIndex: 1]. #(navigateToPreviousMethod navigateToNextMethod removeFromSelectorsVisited) do: [:sel | (self buttonWithSelector: sel) ifNotNilDo: [:aButton | aButton borderWidth: 0]]. self adjustWindowTitle! ! !Lexicon methodsFor: 'category list' stamp: 'sw 5/25/2001 01:34'! categoryList "Answer the category list for the protcol, creating it if necessary, and prepending the -- all -- category, and appending the other special categories for search results, etc." | specialCategoryNames | categoryList ifNil: [specialCategoryNames _ #(queryCategoryName viewedCategoryName "searchCategoryName sendersCategoryName changedCategoryName activeCategoryName") collect: [:sym | self class perform: sym]. categoryList _ (currentVocabulary categoryListForInstance: self targetObject ofClass: targetClass limitClass: limitClass), specialCategoryNames, (Array with: self class allCategoryName)]. ^ categoryList! ! Lexicon removeSelector: #decorateButtons!