The Inbox: ToolBuilder-Morphic-ct.244.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: ToolBuilder-Morphic-ct.244.mcz

commits-2
A new version of ToolBuilder-Morphic was added to project The Inbox:
http://source.squeak.org/inbox/ToolBuilder-Morphic-ct.244.mcz

==================== Summary ====================

Name: ToolBuilder-Morphic-ct.244
Author: ct
Time: 21 September 2019, 7:16:45.219935 pm
UUID: edbb52ab-494e-2a4a-9a5e-471b098c5935
Ancestors: ToolBuilder-Morphic-mt.243

Change the PluggableTreeMorph to select the specified path initially

An example where this is mandatory:
(HelpBrowser on: SqueakHelp)
        showFirstTopic;
        open

=============== Diff against ToolBuilder-Morphic-mt.243 ===============

Item was changed:
  ----- Method: MorphicToolBuilder>>buildPluggableTree: (in category 'widgets required') -----
  buildPluggableTree: aSpec
  | widget |
  widget := self treeClass new.
  self register: widget id: aSpec name.
  widget model: aSpec model.
  widget getSelectedPathSelector: aSpec getSelectedPath.
  widget setSelectedPathSelector: aSpec setSelectedPath.
  widget setSelectedSelector: aSpec setSelected.
  widget getSelectedSelector: aSpec getSelected.
  widget setSelectedParentSelector: aSpec setSelectedParent.
  widget getChildrenSelector: aSpec getChildren.
  widget hasChildrenSelector: aSpec hasChildren.
  widget getLabelSelector: aSpec label.
  widget getIconSelector: aSpec icon.
  widget getHelpSelector: aSpec help.
  widget getMenuSelector: aSpec menu.
  widget keystrokeActionSelector: aSpec keyPress.
  widget nodeClass: aSpec nodeClass.
  widget getRootsSelector: aSpec roots.
  widget autoDeselect: aSpec autoDeselect.
  widget doubleClickSelector: aSpec doubleClick.
 
  widget dropItemSelector: aSpec dropItem.
  widget wantsDropSelector: aSpec dropAccept.
  widget dragItemSelector: aSpec dragItem.
  widget dragStartedSelector: aSpec dragStarted.
 
  widget columns: aSpec columns.
 
+ widget initializeSelection.
+
  "Override default scroll bar policies if needed. Widget will use preference values otherwise."
  aSpec hScrollBarPolicy ifNotNil: [:policy |
  policy caseOf: {
  [#always] -> [widget alwaysShowHScrollBar].
  [#never] -> [widget hideHScrollBarIndefinitely].
  [#whenNeeded] -> [widget showHScrollBarOnlyWhenNeeded]. } ].
  aSpec vScrollBarPolicy ifNotNil: [:policy |
  policy caseOf: {
  [#always] -> [widget alwaysShowVScrollBar].
  [#never] -> [widget hideVScrollBarIndefinitely].
  [#whenNeeded] -> [widget showVScrollBarOnlyWhenNeeded]. } ].
 
  self setFrame: aSpec frame in: widget.
  self setLayoutHintsFor: widget spec: aSpec.
 
  parent ifNotNil:[self add: widget to: parent].
  " panes ifNotNil:[
  aSpec roots ifNotNil:[panes add: aSpec roots].
  ]. "
  ^widget!

Item was added:
+ ----- Method: PluggableTreeMorph>>initializeSelection (in category 'initialization') -----
+ initializeSelection
+
+ self update: getSelectedPathSelector.!