diff -r 4dd439ebf162 -r 9cd2115ac627 ImageEditor.st --- a/ImageEditor.st Wed Feb 25 19:43:54 1998 +0100 +++ b/ImageEditor.st Wed Feb 25 23:21:00 1998 +0100 @@ -47,6 +47,12 @@ [author:] Thomas Zwick, eXept Software AG " +! + +listOfColors + + ^List new + ! ! !ImageEditor class methodsFor:'instance creation'! @@ -265,11 +271,11 @@ #window: #(#WindowSpec #name: 'Image Editor' - #layout: #(#LayoutFrame 273 0 357 0 772 0 702 0) + #layout: #(#LayoutFrame 318 0 314 0 817 0 659 0) #label: 'Image Editor' #min: #(#Point 400 320) #max: #(#Point 1152 900) - #bounds: #(#Rectangle 273 357 773 703) + #bounds: #(#Rectangle 318 314 818 660) #menu: #menu #usePreferredExtent: false ) @@ -304,40 +310,55 @@ #(#SpecCollection #collection: #( - #(#DataSetSpec - #name: 'colorDataSetView' - #activeHelpKey: #colorMapTable - #model: #selectionOfColor - #style: #(#FontDescription #helvetica #medium #roman 10) - #hasHorizontalScrollBar: true - #hasVerticalScrollBar: true - #miniScrollerHorizontal: true - #miniScrollerVertical: true - #dataList: #listOfColors - #level: -1 - #has3Dsepartors: true - #verticalSpacing: 1 - #columns: - #( - #(#DataSetColumnSpec - #rendererType: #rowSelector - #backgroundSelector: #yourself - ) - #(#DataSetColumnSpec - #label: 'R' - #model: #rowRedByte - #canSelect: false - ) - #(#DataSetColumnSpec - #label: 'G' - #model: #rowGreenByte - #canSelect: false - ) - #(#DataSetColumnSpec - #label: 'B' - #model: #rowBlueByte - #canSelect: false - ) + #(#ViewSpec + #name: 'View1' + #component: + #(#SpecCollection + #collection: + #( + #(#DataSetSpec + #name: 'colorDataSetView' + #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -22 1.0) + #activeHelpKey: #colorMapTable + #model: #selectionOfColor + #style: #(#FontDescription #helvetica #medium #roman 10) + #hasHorizontalScrollBar: true + #hasVerticalScrollBar: true + #miniScrollerHorizontal: true + #miniScrollerVertical: true + #dataList: #listOfColors + #level: -1 + #has3Dsepartors: true + #verticalSpacing: 1 + #columns: + #( + #(#DataSetColumnSpec + #rendererType: #rowSelector + #backgroundSelector: #yourself + ) + #(#DataSetColumnSpec + #label: 'R' + #model: #rowRedByte + #canSelect: false + ) + #(#DataSetColumnSpec + #label: 'G' + #model: #rowGreenByte + #canSelect: false + ) + #(#DataSetColumnSpec + #label: 'B' + #model: #rowBlueByte + #canSelect: false + ) + ) + ) + #(#MenuPanelSpec + #name: 'MenuPanel1' + #layout: #(#LayoutFrame 0 0.0 -22 1 0 1.0 0 1.0) + #menu: #menuMouseButtonColors + ) + ) ) ) #(#ArbitraryComponentSpec @@ -352,7 +373,7 @@ ) ) ) - #handles: #(#Any 0.601399 1.0) + #handles: #(#Any 0.5 1.0) ) ) ) @@ -746,27 +767,6 @@ #argument: '1-plane + mask' #indication: #colorMapMode:value: ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'Left Mouse Button' - #nameKey: #leftMouseKeyButton - #value: #'Left Mouse Button' - #activeHelpKey: #mouseKeyColorMode - #argument: '1' - #labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon 'Left Mouse Button') - #indication: #mouseKeyColorMode:value: - ) - #(#MenuItem - #label: 'Right Mouse Button' - #nameKey: #rightMouseKeyButton - #value: #'Right Mouse Button' - #activeHelpKey: #mouseKeyColorMode - #argument: '2' - #labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon 'Right Mouse Button') - #indication: #mouseKeyColorMode:value: - ) ) nil nil ) @@ -787,6 +787,45 @@ ) ! +menuMouseButtonColors + "this window spec was automatically generated by the ST/X MenuEditor" + + "do not manually edit this - the builder may not be able to + handle the specification if its corrupted." + + " + MenuEditor new openOnClass:ImageEditor andSelector:#menuMouseButtonColors + (Menu new fromLiteralArrayEncoding:(ImageEditor menuMouseButtonColors)) startUp + " + + + + ^ + + #(#Menu + + #( + #(#MenuItem + #label: 'Left Mouse Button' + #nameKey: #leftMouseKeyButton + #activeHelpKey: #mouseKeyColorMode + #argument: '1' + #labelImage: #(#ResourceRetriever nil #leftMouseKeyIcon) + #indication: #mouseKeyColorMode:value: + ) + #(#MenuItem + #label: 'Right Mouse Button' + #nameKey: #rightMouseKeyButton + #activeHelpKey: #mouseKeyColorMode + #argument: '2' + #labelImage: #(#ResourceRetriever nil #rightMouseKeyIcon) + #indication: #mouseKeyColorMode:value: + ) + ) nil + nil + ) +! + menuToolbar "this window spec was automatically generated by the ST/X MenuEditor" @@ -961,6 +1000,15 @@ ^ holder ! +listOfColors2 + + |holder| + (holder := builder bindingAt:#listOfColors) isNil ifTrue:[ + builder aspectAt:#listOfColors put:(holder := List new). + ]. + ^ holder +! + selectionOfColor |holder|