Marcel Taeumel uploaded a new version of ToolBuilder-MVC to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-MVC-mt.39.mcz ==================== Summary ==================== Name: ToolBuilder-MVC-mt.39 Author: mt Time: 12 April 2015, 6:31:58.165 pm UUID: 2e8d6ace-8555-3845-8d8f-e28c085c4811 Ancestors: ToolBuilder-MVC-dtl.38 Messages re-organized. We need an MVC tree implementation... or a useful fall-back. (Apple's multi-column views?) =============== Diff against ToolBuilder-MVC-dtl.38 =============== Item was added: + ----- Method: MVCToolBuilder>>buildPluggableAlternateMultiSelectionList: (in category 'widgets optional') ----- + buildPluggableAlternateMultiSelectionList: aSpec + + "Trim selector to one argument to match list expectations." + aSpec setIndex: (aSpec setIndex first: (aSpec setIndex findString: ':')) asSymbol. + ^ self buildPluggableList: aSpec.! Item was changed: + ----- Method: MVCToolBuilder>>buildPluggableButton: (in category 'widgets required') ----- - ----- Method: MVCToolBuilder>>buildPluggableButton: (in category 'pluggable widgets') ----- buildPluggableButton: aSpec | widget label state | label := aSpec label. state := aSpec state. widget := PluggableButtonView on: aSpec model getState: (state isSymbol ifTrue:[state]) action: aSpec action label: (label isSymbol ifTrue:[label]). self register: widget id: aSpec name. label ifNotNil: [label isSymbol ifTrue: [widget label: (aSpec model perform: label)] ifFalse: [widget label: label]]. self setFrame: aSpec frame in: widget. parent ifNotNil: [parent addSubView: widget]. ^widget! Item was changed: + ----- Method: MVCToolBuilder>>buildPluggableList: (in category 'widgets required') ----- - ----- Method: MVCToolBuilder>>buildPluggableList: (in category 'pluggable widgets') ----- buildPluggableList: aSpec | widget listClass getIndex setIndex | aSpec getSelected ifNil:[ listClass := PluggableListView. getIndex := aSpec getIndex. setIndex := aSpec setIndex. ] ifNotNil:[ listClass := PluggableListViewByItem. 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. self setFrame: aSpec frame in: widget. parent ifNotNil:[parent addSubView: widget]. panes ifNotNil:[ aSpec list ifNotNil:[panes add: aSpec list]. ]. ^widget! Item was changed: + ----- Method: MVCToolBuilder>>buildPluggablePanel: (in category 'widgets required') ----- - ----- Method: MVCToolBuilder>>buildPluggablePanel: (in category 'pluggable widgets') ----- buildPluggablePanel: aSpec | widget children | widget := View new model: aSpec model. self register: widget id: aSpec name. children := aSpec children. children isSymbol ifTrue:[ "@@@@ FIXME: PluggablePanes need to remember their getChildrenSelector" "widget getChildrenSelector: children. widget update: children." children := #(). ]. self setFrame: aSpec frame in: widget. self buildAll: children in: widget. parent ifNotNil:[parent addSubView: widget]. self setLayout: aSpec layout in: widget. ^widget! Item was changed: + ----- Method: MVCToolBuilder>>buildPluggableText: (in category 'widgets required') ----- - ----- Method: MVCToolBuilder>>buildPluggableText: (in category 'pluggable widgets') ----- buildPluggableText: aSpec | widget | widget := PluggableTextView on: aSpec model text: aSpec getText accept: aSpec setText readSelection: aSpec selection menu: aSpec menu. self register: widget id: aSpec name. self setFrame: aSpec frame in: widget. parent ifNotNil:[parent addSubView: widget]. panes ifNotNil:[ aSpec getText ifNotNil:[panes add: aSpec getText]. ]. ^widget! Item was added: + ----- Method: MVCToolBuilder>>buildPluggableTree: (in category 'widgets required') ----- + buildPluggableTree: aSpec + + self shouldBeImplemented.! Item was changed: + ----- Method: MVCToolBuilder>>buildPluggableWindow: (in category 'widgets required') ----- - ----- Method: MVCToolBuilder>>buildPluggableWindow: (in category 'pluggable widgets') ----- buildPluggableWindow: aSpec | widget children label | topSize := 0@0 corner: 640@480. aSpec layout == #proportional ifFalse:[ "This needs to be implemented - probably by adding a single pane and then the rest" ^self error: 'Not implemented'. ]. widget := StandardSystemView new. self register: widget id: aSpec name. widget model: aSpec model. label := aSpec label. label isSymbol ifTrue: [label := aSpec model perform: label]. label isNil ifFalse: [widget setLabel: label]. children := aSpec children. children isSymbol ifTrue:[ "This isn't implemented by StandardSystemView, so we fake it" children := widget model perform: children. ]. aSpec extent ifNotNil:[topSize := 0@0 extent: aSpec extent]. widget window: topSize. panes := OrderedCollection new. self buildAll: children in: widget. widget setUpdatablePanesFrom: panes. ^widget! |
Free forum by Nabble | Edit this page |