1739 (MenuItem |
1739 (MenuItem |
1740 enabled: hasColorSelectedHolder |
1740 enabled: hasColorSelectedHolder |
1741 label: 'Copy Color' |
1741 label: 'Copy Color' |
1742 itemValue: copyColorFromColormap |
1742 itemValue: copyColorFromColormap |
1743 translateLabel: true |
1743 translateLabel: true |
|
1744 shortcutKey: Copy |
1744 ) |
1745 ) |
1745 (MenuItem |
1746 (MenuItem |
1746 enabled: hasColormapAndColorSelected |
1747 enabled: hasColormapAndColorSelected |
1747 label: 'Pick and Paste Color...' |
1748 label: 'Pick and Paste Color...' |
1748 itemValue: pickAndPasteColor |
1749 itemValue: pickAndPasteColor |
1782 ) |
1784 ) |
1783 (MenuItem |
1785 (MenuItem |
1784 label: '-' |
1786 label: '-' |
1785 ) |
1787 ) |
1786 (MenuItem |
1788 (MenuItem |
|
1789 enabled: hasColorSelectedHolder |
1787 label: 'Inspect Color' |
1790 label: 'Inspect Color' |
1788 itemValue: inspectColor |
1791 itemValue: inspectColor |
1789 translateLabel: true |
1792 translateLabel: true |
1790 enabled: hasColorSelectedHolder |
|
1791 ) |
1793 ) |
1792 (MenuItem |
1794 (MenuItem |
1793 enabled: hasColormapHolder |
1795 enabled: hasColormapHolder |
1794 label: 'Inspect Colormap' |
1796 label: 'Inspect Colormap' |
1795 itemValue: inspectColormap |
1797 itemValue: inspectColormap |
4016 !ImageEditor methodsFor:'event handling'! |
4016 !ImageEditor methodsFor:'event handling'! |
4017 |
4017 |
4018 processEvent:anEvent |
4018 processEvent:anEvent |
4019 "Return true, if I have eaten the event" |
4019 "Return true, if I have eaten the event" |
4020 |
4020 |
4021 |p| |
4021 |view focusView p transformation| |
4022 |
4022 |
4023 anEvent view == self imagePreView ifTrue:[ |
4023 view := anEvent view. |
4024 ((anEvent isButtonPressEvent and:[ anEvent button == 1 ]) |
4024 view notNil ifTrue:[ |
4025 or:[ anEvent isButtonMotionEvent and:[ anEvent hasButton1 ]]) ifTrue:[ |
4025 view == self imagePreView ifTrue:[ |
4026 p := anEvent x @ anEvent y. |
4026 ((anEvent isButtonPressEvent and:[ anEvent button == 1 ]) |
4027 anEvent view transformation notNil ifTrue:[ |
4027 or:[ anEvent isButtonMotionEvent and:[ anEvent hasButton1 ]]) ifTrue:[ |
4028 p := anEvent view transformation applyInverseTo:p. |
4028 p := anEvent x @ anEvent y. |
|
4029 (transformation := view transformation) notNil ifTrue:[ |
|
4030 p := transformation applyInverseTo:p. |
|
4031 ]. |
|
4032 self imageEditView scrollToMakeVisible:p. |
|
4033 ^ true. |
4029 ]. |
4034 ]. |
4030 self imageEditView scrollToMakeVisible:p. |
|
4031 ^ true. |
|
4032 ]. |
4035 ]. |
|
4036 |
|
4037 anEvent isKeyPressEvent ifTrue:[ |
|
4038 focusView := view windowGroup focusView ? view. |
|
4039 (focusView isComponentOf:(builder componentAt:#colorDataSetView)) ifTrue:[ |
|
4040 anEvent key == #Paste ifTrue:[ |
|
4041 self pasteColorIntoColormap. |
|
4042 ^ true. |
|
4043 ]. |
|
4044 anEvent key == #Copy ifTrue:[ |
|
4045 self copyColorFromColormap. |
|
4046 ^ true. |
|
4047 ]. |
|
4048 ]. |
|
4049 ]. |
4033 ]. |
4050 ]. |
4034 ^ false. |
4051 ^ false. |
|
4052 |
|
4053 "Modified: / 04-04-2011 / 13:50:09 / cg" |
4035 ! ! |
4054 ! ! |
4036 |
4055 |
4037 !ImageEditor methodsFor:'help'! |
4056 !ImageEditor methodsFor:'help'! |
4038 |
4057 |
4039 defaultInfoLabel |
4058 defaultInfoLabel |