From VisualWorks®, 7.6 of February 1, 2008 on February 1, 2008 at 12:47:50 pm (Dialog confirm: 'You are filing-in a Parcel source file!\\While this is possible it will not have\the same effect as loading the parcel.\None of the Parcel''s prerequisites will\be loaded and none of its load actions\will be performed.\\Are you sure you want to file-in?' withCRs) ifFalse: [self error: 'Parcel file-in abandoned. Choose terminate or close.'] <class> <name>MoveExample</name> <environment>Examples</environment> <super>UI.ApplicationModel</super> <private>false</private> none <imports></imports> <category>Examples-Help</category> <attributes> <package>Move-Example</package> </attributes> </class> <comment> Examples.MoveExample
MoveExample demonstrates a technique for moving a widget while the application is running.
</comment> <methods> Examples.MoveExample <category>private</category>
arrowOrigin ^50@149
</methods> <methods> Examples.MoveExample <category>actions</category>
moveArrowDown | wrapper | wrapper := (self builder componentAt: #arrow). "If the arrow is not too low, lower it another notch." wrapper bounds origin y < 295 ifTrue: [wrapper moveBy: 0@5]
moveArrowUp | wrapper | wrapper := (self builder componentAt: #arrow). "If the arrow is not too high, raise it another notch." wrapper bounds origin y > 30 ifTrue: [wrapper moveBy: 0@-5]
resetArrow | wrapper | wrapper := (self builder componentAt: #arrow). wrapper moveTo: self arrowOrigin
</methods> <methods> Examples.MoveExample class <category>resources</category>
arrowIcon "UIMaskEditor new openOnClass: self andSelector: #arrowIcon" <resource: #image> ^Image extent: 17@10 depth: 1 palette: CoveragePalette monoMaskPalette bits: #[0 128 0 0 0 96 0 0 0 56 0 0 255 254 0 0 255 255 128 0 255 255 128 0 255 254 0 0 0 56 0 0 0 96 0 0 0 128 0 0 ] pad: 32
meterStick "UIMaskEditor new openOnClass: self andSelector: #meterStick" <resource: #image> ^Image extent: 5@91 depth: 1 palette: CoveragePalette monoMaskPalette bits: (ByteArray fromPackedString: '>@@@@B@@@@@ @@@@H@@@@B@@@@A0@@@@H@@@@B@@@@@ @@@@H@@@@O @@@@ @@@@H@@@@B@@@@@ @@@@\@@@@B@@@@@ @@@@H@@@@B@@@@C8@@@@H@@@@B@@@@@ @@@@H@@@@G@@@@@ @@@@H@@@@B@@@@@ @@@@>@@@@B@@@@@ @@@@H@@@@B@@@@A0@@@@H@@@@B@@@@@ @@@@H@@@@O @@@@ @@@@H@@@@B@@@@@ @@@@\@@@@B@@@@@ @@@@H@@@@B@@@@C8@@@@H@@@@B@@@@@ @@@@H@@@@G@@@@@ @@@@H@@@@B@@@@@ @@@@>@@@@B@@@@@ @@@@H@@@@B@@@@A0@@@@H@@@@B@@@@@ @@@@H@@@@O @@@@ @@@@H@@@@B@@@@@ @@@@\@@@@B@@@@@ @@@@H@@@@B@@@@C8@@@@H@@@@B@@@@@ @@@@H@@@@G@@@@@ @@@@H@@@@B@@@@@ @@@@>@@@@@@a') pad: 32
</methods> <methods> Examples.MoveExample class <category>interface specs</category>
windowSpec "UIPainter new openOnClass: self andSelector: #windowSpec" <resource: #canvas> ^#(#FullSpec #window: #(#WindowSpec #label: 'MoveExample' #min: #(#Point 161 340 ) #max: #(#Point 161 340 ) #bounds: #(#Rectangle 479 334 640 674 ) ) #component: #(#SpecCollection #collection: #( #(#LabelSpec #layout: #(#Point 49 149 ) #name: #arrow #label: #arrowIcon #hasCharacterOrientedLabel: false ) #(#CompositeSpecCollection #collection: #( #(#LabelSpec #layout: #(#LayoutOrigin 0 0 90 0 ) #label: #meterStick #hasCharacterOrientedLabel: false ) #(#LabelSpec #layout: #(#LayoutOrigin 0 0 0 0 ) #label: #meterStick #hasCharacterOrientedLabel: false ) #(#LabelSpec #layout: #(#LayoutOrigin 0 0 180 0 ) #label: #meterStick #hasCharacterOrientedLabel: false ) ) #compositeSpec: #(#CompositeSpec #layout: #(#Rectangle 72 33 81 308 ) ) ) #(#ActionButtonSpec #layout: #(#Rectangle 52 6 101 26 ) #model: #moveArrowUp #label: 'Up' #defaultable: true ) #(#ActionButtonSpec #layout: #(#Rectangle 52 314 101 334 ) #model: #moveArrowDown #label: 'Down' #defaultable: true ) #(#ActionButtonSpec #layout: #(#Rectangle 101 145 150 165 ) #model: #resetArrow #label: 'Reset' #defaultable: true ) ) ) )
</methods> "Imported Classes:" self error: 'Attempting to file-in parcel imports. Choose terminate or close' <class> <name>ApplicationModel</name> <environment>UI</environment> <super>UI.Model</super> <private>false</private> none builder uiSession eventHandlers savedWindowInformation <imports></imports> <category>UIBuilder-Framework</category> <attributes> <package>UIBuilder-Framework</package> </attributes> </class>