Skip to content

Commit a10572d

Browse files
committed
last notes for mouse wheel
1 parent d433540 commit a10572d

2 files changed

Lines changed: 48 additions & 42 deletions

File tree

core/src/processing/event/MouseEvent.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ public float getAmount() {
103103
/**
104104
* Number of clicks for mouse button events, or the number of steps (positive
105105
* or negative depending on direction) for a mouse wheel event.
106+
* Wheel events follow Java (see <a href="http://docs.oracle.com/javase/6/docs/api/java/awt/event/MouseWheelEvent.html#getWheelRotation()">here</a>), so
107+
* getAmount() will return "negative values if the mouse wheel was rotated
108+
* up or away from the user" and positive values in the other direction.
109+
* On Mac OS X, this will be reversed when "natural" scrolling is enabled
110+
* in System Preferences &rarr Mouse.
106111
*/
107112
public int getCount() {
108113
return count;

core/todo.txt

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,38 @@ X getContent() or getStringContent()?
1313
X switch to CATEGORY instead of CATEGORICAL
1414
X removed createXML() and createTable()... just use 'new' for these
1515

16+
mouse wheel
17+
X add mouse wheel support to 2.0 event system
18+
X https://github.com/processing/processing/issues/1461
19+
X http://code.google.com/p/processing/issues/detail?id=1423
20+
X this is fairly messy since desktop and JS behave a little differently
21+
o wheel event should subclass mouse (since position still relevant)
22+
X just another sub-event as part of mouse
23+
o might be more effort than it's worth?
24+
X peasycam uses e.getWheelRotation()
25+
X js has a couple versions
26+
X http://www.javascriptkit.com/javatutors/onmousewheel.shtml
27+
X e.detail is 1 for 1 tick upward (away), -2 for 2 ticks down
28+
X e.wheelDelta is 120 for 1 click up, -240 for two clicks down
29+
X this is for non-natural! opposite of Java.. ugh
30+
X testing with Java on OS X
31+
X natural on OS X: up is 1 unit, down is -1 units
32+
X non-natural: up is -1 units, down is +1 unit
33+
X Windows says 3 units per notch, OS X says just 1
34+
X appears to be opposite of JS
35+
X using float value (/120.0f)
36+
X high-precision method grabbed if 1.7 is in use
37+
X test with actual wheel mouse
38+
X test on Windows
39+
X decide on getAmount() and weirdness w/ clickCount
40+
X add note re: API docs
41+
X get mouseWheel() added to api ref
42+
o also added to keywords.txt
43+
X ref: "negative values if the mouse wheel was rotated up or away from the user"
44+
X http://docs.oracle.com/javase/6/docs/api/java/awt/event/MouseWheelEvent.html#getWheelRotation()
45+
X http://docs.oracle.com/javase/7/docs/api/java/awt/event/MouseWheelEvent.html#getWheelRotation()
46+
47+
1648
before release
1749
_ "deleted n framebuffer objects"
1850

@@ -27,6 +59,7 @@ _ https://github.com/processing/processing/issues/1672
2759

2860
_ image memory issue was huge, need to close that one
2961

62+
3063
data
3164
X are we comfortable with setInt/Float/etc instead of just set(int, blah)
3265
X yes, better to have parity
@@ -161,7 +194,6 @@ o maybe it's Table.INT since it's for advanced users anyway
161194
o problem is loading types from file, no way to access it from code
162195
o CATEGORICAL -> CATEGORY? ORDINAL?
163196
X add clearRows()
164-
165197
_ function that will convert awful CSV to TSV.. or something else?
166198
_ maybe to write binary instead? then read the binary file once it's ok?
167199
_ if loading from a File object
@@ -195,7 +227,7 @@ _ getCategories() and getCategory() methods to query names?
195227
xml
196228
o add nodes() (no) or children() to XML?
197229
X not necessary, getChildren() already exists
198-
_ add indent= as option for XML, JSON save
230+
_ add indent= as option for XML save
199231

200232
andres
201233
A lines not properly renderered in P3D when using ortographic projection
@@ -209,36 +241,6 @@ _ Deleted 1 texture objects, 0 remaining
209241
_ shader syntax (Andres request)
210242
_ might also need a define inside the shader to control what type it is
211243

212-
X add mouse wheel support to 2.0 event system
213-
X https://github.com/processing/processing/issues/1461
214-
X http://code.google.com/p/processing/issues/detail?id=1423
215-
X this is fairly messy since desktop and JS behave a little differently
216-
o wheel event should subclass mouse (since position still relevant)
217-
X just another sub-event as part of mouse
218-
o might be more effort than it's worth?
219-
X peasycam uses e.getWheelRotation()
220-
X js has a couple versions
221-
X http://www.javascriptkit.com/javatutors/onmousewheel.shtml
222-
X e.detail is 1 for 1 tick upward (away), -2 for 2 ticks down
223-
X e.wheelDelta is 120 for 1 click up, -240 for two clicks down
224-
X this is for non-natural! opposite of Java.. ugh
225-
X testing with Java on OS X
226-
X natural on OS X: up is 1 unit, down is -1 units
227-
X non-natural: up is -1 units, down is +1 unit
228-
X Windows says 3 units per notch, OS X says just 1
229-
X appears to be opposite of JS
230-
X using float value (/120.0f)
231-
X high-precision method grabbed if 1.7 is in use
232-
X test with actual wheel mouse
233-
X test on Windows
234-
X decide on getAmount() and weirdness w/ clickCount
235-
X add note re: API docs
236-
X get mouseWheel() added to api ref
237-
o also added to keywords.txt
238-
X ref: "negative values if the mouse wheel was rotated up or away from the user"
239-
X http://docs.oracle.com/javase/6/docs/api/java/awt/event/MouseWheelEvent.html#getWheelRotation()
240-
X http://docs.oracle.com/javase/7/docs/api/java/awt/event/MouseWheelEvent.html#getWheelRotation()
241-
242244
shape
243245
_ major surgery to put loadShape() back into PApplet/PGraphics
244246
_ then have the OpenGL or Java2D versions as cached objects
@@ -269,16 +271,6 @@ _ colorCalc() methods added to PShape.. should just be used from PGraphics
269271
_ loadShape() needs to live in PApplet
270272
_ make PShapeOpenGL a cache object
271273

272-
async requests
273-
Request r = createRequest("http://p5.org/feed/13134.jpg");
274-
Request r = createRequest("http://p5.org/feed/13134.jpg", "callbackName");
275-
Request r = createRequest("http://p5.org/feed/13134, "callbackName", "jpg");
276-
_ implement callbacks for images and other loadXxxx() functions
277-
_ remove requestImage() and friends
278-
_ callback for requestImage()
279-
_ http://code.google.com/p/processing/issues/detail?id=641
280-
_ remove/update requestImage example
281-
282274
stop() mess
283275
_ in PApplet.main(), windowClosing() should probably be calling 'exit()'
284276
_ or rather, we should never call System.exit(0), ja?
@@ -835,3 +827,12 @@ _ put a Hash<Something> class in there
835827
_ will this work to sort by the values?
836828
_ there was another concern as well..
837829
_ save() should probably come out of image, ja?
830+
_ async requests
831+
_ Request r = createRequest("http://p5.org/feed/13134.jpg");
832+
_ Request r = createRequest("http://p5.org/feed/13134.jpg", "callbackName");
833+
_ Request r = createRequest("http://p5.org/feed/13134, "callbackName", "jpg");
834+
_ implement callbacks for images and other loadXxxx() functions
835+
_ remove requestImage() and friends
836+
_ callback for requestImage()
837+
_ http://code.google.com/p/processing/issues/detail?id=641
838+
_ remove/update requestImage example

0 commit comments

Comments
 (0)