Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add M2ColorSensor to handle color selection of pipette tool #67

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
instance creation
newWith: aTarget
^ (self basicNew
target: aTarget;
initialize)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
initialization
initialize
super initialize.
self
extent: 0 asPoint;
openInWorld.
self activeHand addMouseListener: self
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
event handling
mouseUp: evt
self target
setColor: (Display colorAt: evt cursorPoint);
activateDefaultItem.
self activeHand removeMouseListener: self.
self delete
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
target: aMorphicMonet
target := aMorphicMonet
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
target
^ target
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"class" : {
"newWith:" : "mFr 5/20/2021 22:30" },
"instance" : {
"initialize" : "mFr 5/20/2021 22:31",
"mouseUp:" : "mFr 5/20/2021 22:29",
"target" : "mFr 5/20/2021 22:27",
"target:" : "mFr 5/20/2021 22:27" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "SketchMorph2-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
"target" ],
"name" : "M2ColorSensor",
"pools" : [
],
"super" : "Morph",
"type" : "normal" }
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
accessing
actionSelector
^ #chooseColor
^ #invokeColorSensor
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"class" : {
"actionSelector" : "mFr 5/19/2021 12:33",
"actionSelector" : "mFr 5/20/2021 22:34",
"icon" : "mFr 5/19/2021 10:51",
"isActivatable" : "mFr 5/19/2021 12:33",
"label" : "mFr 5/19/2021 12:33" },
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tooling
invokeColorSensor
M2ColorSensor newWith: self.
self backend switchMode
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"canvas" : "mFr 5/19/2021 10:58",
"canvasPanel" : "mFr 5/19/2021 10:59",
"canvasPanel:" : "mFr 5/19/2021 10:59",
"chooseColor" : "CS 6/1/2021 19:10",
"clearCanvas" : "mFr 5/19/2021 10:59",
"colorPalette" : "mFr 5/19/2021 10:59",
"colorPanel" : "mFr 5/19/2021 10:59",
Expand All @@ -36,8 +35,9 @@
"initializeColorPanel" : "mFr 5/19/2021 11:01",
"initializeMenuPanel" : "mFr 5/26/2021 12:21",
"initializePanels" : "mk 7/27/2020 20:16",
"initializeTopPanel" : "mFr 5/26/2021 12:22",
"loadCanvas" : "mFr 5/26/2021 12:00",
"initializeTopPanel" : "mFr 5/19/2021 11:01",
"invokeColorSensor" : "mFr 6/2/2021 22:19",
"loadCanvas" : "mFr 5/19/2021 11:01",
"loadMenu" : "mFr 5/19/2021 12:45",
"menuBrushCollection" : "CS 5/30/2021 18:05",
"menuBrushCollection:" : "mFr 5/19/2021 12:17",
Expand Down