The Trunk: ToolBuilder-Morphic-mt.248.mcz

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

The Trunk: ToolBuilder-Morphic-mt.248.mcz

commits-2
Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.248.mcz

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

Name: ToolBuilder-Morphic-mt.248
Author: mt
Time: 23 October 2019, 1:41:18.462795 pm
UUID: 8da50782-91ea-4363-8722-dabc49fae662
Ancestors: ToolBuilder-Morphic-mt.247

Complements ToolBuilder-Kernel-mt.134.

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

Item was changed:
  ----- Method: MorphicToolBuilder>>buildPluggableMultiColumnList: (in category 'widgets required') -----
  buildPluggableMultiColumnList: aSpec
  | widget listClass getIndex setIndex |
  aSpec getSelected ifNil:[
  listClass := self multiColumnListClass.
  getIndex := aSpec getIndex.
  setIndex := aSpec setIndex.
  ] ifNotNil: [
  listClass := self multiColumnListByItemClass.
  getIndex := aSpec getSelected.
  setIndex := aSpec setSelected.
  ].
  widget := listClass on: aSpec model
  list: aSpec list
  selected: getIndex
  changeSelected: setIndex
  menu: aSpec menu
  keystroke: aSpec keyPress.
  self register: widget id: aSpec name.
 
  " widget
  dragItemSelector: aSpec dragItem;
  dropItemSelector: aSpec dropItem;
  wantsDropSelector: aSpec dropAccept;
  dragStartedSelector: aSpec dragStarted."
 
  self setListPropertiesFor: widget spec: aSpec.
+
+ "Be sure to enable the horizontal scrollbar if not all columns are #spaceFill."
+ (aSpec columnResizings anySatisfy: [:sym | sym ~= #spaceFill])
+ ifTrue: [widget hScrollBarPolicy: #whenNeeded].
+
+ widget
+ cellPositioningForColumns: aSpec itemAlignments;
+ cellInsetForColumns: aSpec itemPaddings;
+ hResizingForColumns: aSpec columnResizings;
+ spaceFillWeightForColumns: aSpec columnSpaceFillWeights.
+
  ^widget!

Item was changed:
  ----- Method: MorphicToolBuilder>>setListPropertiesFor:spec: (in category 'private') -----
  setListPropertiesFor: widget spec: aSpec
 
  "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]. } ].
 
  widget
  getListElementSelector: aSpec listItem;
  getListSizeSelector: aSpec listSize;
  getIconSelector: aSpec icon;
  getHelpSelector: aSpec helpItem;
  doubleClickSelector: aSpec doubleClick.
 
  widget
  autoDeselect: aSpec autoDeselect;
  keystrokePreviewSelector: aSpec keystrokePreview.
 
  aSpec filterableList ifNotNil: [:b | widget filterableList: b].
  aSpec clearFilterAutomatically ifNotNil: [:b | widget clearFilterAutomatically: b].
 
  aSpec color ifNotNil: [:c | widget color: c].
  self buildHelpFor: widget spec: aSpec.
 
  self setFrame: aSpec frame in: widget.
  self setLayoutHintsFor: widget spec: aSpec.
+ aSpec itemAlignment ifNotNil: [:alignment | widget listMorph cellPositioning: alignment].
+ aSpec itemPadding ifNotNil: [:padding | widget listMorph cellInset: padding].
 
  parent ifNotNil:[self add: widget to: parent].
  (panes notNil and: [aSpec list notNil]) ifTrue: [panes add: aSpec list].
  !