The Trunk: ST80Tools-topa.6.mcz

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

The Trunk: ST80Tools-topa.6.mcz

commits-2
Tobias Pape uploaded a new version of ST80Tools to project The Trunk:
http://source.squeak.org/trunk/ST80Tools-topa.6.mcz

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

Name: ST80Tools-topa.6
Author: topa
Time: 14 April 2015, 10:04:21.905 am
UUID: 1c2237e9-0dc7-479b-a7a2-236e4f1f793f
Ancestors: ST80Tools-mt.5

Assume responsibility of #openInMVC in a Tool

=============== Diff against ST80Tools-mt.5 ===============

Item was added:
+ ----- Method: FileList class>>openInMVC (in category '*ST80Tools-instance creation') -----
+ openInMVC
+ "Open a view of an instance of me on the default directory."
+
+ | dir aFileList topView volListView templateView fileListView fileContentsView underPane pHeight |
+ dir := FileDirectory default.
+ aFileList := self new directory: dir.
+ topView := StandardSystemView new.
+ topView
+ model: aFileList;
+ label: dir pathName;
+ minimumSize: 200@200.
+ topView borderWidth: 1.
+
+ volListView := PluggableListView on: aFileList
+ list: #volumeList
+ selected: #volumeListIndex
+ changeSelected: #volumeListIndex:
+ menu: #volumeMenu:.
+ volListView autoDeselect: false.
+ volListView window: (0@0 extent: 80@45).
+ topView addSubView: volListView.
+
+ templateView _ PluggableTextView on: aFileList
+ text: #pattern
+ accept: #pattern:.
+ templateView askBeforeDiscardingEdits: false.
+ templateView window: (0@0 extent: 80@15).
+ topView addSubView: templateView below: volListView.
+
+ aFileList wantsOptionalButtons
+ ifTrue:
+ [underPane := aFileList optionalButtonViewForMVC.
+ underPane isNil
+ ifTrue: [pHeight := 60]
+ ifFalse: [
+ topView addSubView: underPane toRightOf: volListView.
+ pHeight := 60 - aFileList optionalButtonHeight]]
+ ifFalse:
+ [underPane := nil.
+ pHeight := 60].
+
+ fileListView := PluggableListView on: aFileList
+ list: #fileList
+ selected: #fileListIndex
+ changeSelected: #fileListIndex:
+ menu: #fileListMenu:.
+ fileListView window: (0@0 extent: 120@pHeight).
+ underPane isNil
+ ifTrue: [topView addSubView: fileListView toRightOf: volListView]
+ ifFalse: [topView addSubView: fileListView below: underPane].
+ fileListView controller terminateDuringSelect: true.  "Pane to left may change under scrollbar"
+
+ fileContentsView := PluggableTextView on: aFileList
+ text: #contents accept: #put:
+ readSelection: #contentsSelection menu: #fileContentsMenu:shifted:.
+ fileContentsView window: (0@0 extent: 200@140).
+ topView addSubView: fileContentsView below: templateView.
+
+ topView controller open!