View previous topic :: View next topic |
Author |
Message |
sardisson Town Crier
Joined: Feb 01, 2004 Posts: 4588
|
Posted: Tue Apr 01, 2008 7:59 pm Post subject: |
|
Patrick, I just noticed tonight that horizontal scrolling is not working in the "Fields" spreadsheet view in the CSV/Text Import window in Calc (the part that shows you a preview of what your data will look like as you change the separators, etc.
10.5.2/Intel/trackpad
Smokey _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
Posted: Tue Apr 01, 2008 8:54 pm Post subject: |
|
It does not appear to me that mouse scrolling is supported in those fields by the OOo code. Note that I have not changed the OOo code with this feature. Instead, I merely post horizontal mouse wheel events to the OOo event queue. Most OOo controls will react to it, but some most likely will ignore scrolling events.
Patrick |
|
Back to top |
|
|
sardisson Town Crier
Joined: Feb 01, 2004 Posts: 4588
|
Posted: Tue Apr 01, 2008 9:54 pm Post subject: |
|
pluby wrote: | Most OOo controls will react to it, but some most likely will ignore scrolling events. |
Fun
Thanks for checking.
Smokey _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
|
Back to top |
|
|
yoxi Cipher
Joined: Sep 07, 2004 Posts: 1799 Location: Dawlish, Devon
|
Posted: Wed Apr 02, 2008 11:46 pm Post subject: |
|
Testing test-5, I had 3 instances (out of around 25) of a vertical mouse action interloping when I was scrolling right with my trackpad, and that seems to depend on positioning of the fingers on the trackpad itself - implying that it really does seem to matter that I'm left-handed!
If the right fingertip is below the left in terms of y-value on the trackpad, it's more likely to trigger a vertical down-scroll whilst right horizontal scrolling. It would appear that the inbuilt intelligence for the trackpad allows for diagonal scrolling, and is more likely to trigger this is the fingertips are placed diagonally with respect to each other and the trackpad gesture is not completely horizontal.
- padmavyuha |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
Posted: Wed Apr 02, 2008 11:54 pm Post subject: |
|
Your logic is correct: dialogonal scrolling is allowed and supported by NeoOffice.
With the scrollpad or a mouse trackball, NeoOffice will get both mouse scroll events with both X and Y coordinate changes and our code will respond to both.
Patrick |
|
Back to top |
|
|
kozmoz Blue Pill
Joined: Apr 20, 2008 Posts: 1
|
Posted: Sun Apr 20, 2008 3:31 pm Post subject: Re: Enhanced mouse wheel support |
|
pluby wrote: | Well I finally found a way to bypass Java's limitations and handle native mouse wheel events correctly. So, if you use a mouse wheel and either of the above problems has annoyed you, I have a test patch that you can try. |
Just curious, I am a Java developer, how did you do this? |
|
Back to top |
|
|
pluby The Architect
Joined: Jun 16, 2003 Posts: 11949
|
Posted: Sun Apr 20, 2008 3:38 pm Post subject: Re: Enhanced mouse wheel support |
|
kozmoz wrote: | pluby wrote: | Well I finally found a way to bypass Java's limitations and handle native mouse wheel events correctly. So, if you use a mouse wheel and either of the above problems has annoyed you, I have a test patch that you can try. |
Just curious, I am a Java developer, how did you do this? |
We modified native Cocoa code. Specifically, we subclassed the Cocoa NSWindow class' sendEvent: selector and to manually post custom mouse wheel events to the Java event queue.
Since NeoOffice loads Java in process using C code, we can install custom Cocoa subclasses before Java is loaded. However, I am not so sure that this would work as reliably if done using JNI after Java has been loaded.
Patrick |
|
Back to top |
|
|
kberg Agent
Joined: May 28, 2006 Posts: 18
|
Posted: Tue Apr 22, 2008 3:42 am Post subject: |
|
Hi,
I was just implementing the new multitouch features of the current MB pro/ MB Air in one of my programs as I ran across this thread.
It's pretty simple, if You can grab the NSEvents - and once You start using them, You don't want to miss'em. Guestures are a little like magic .
I think magnifiy for zoom an swipe for pageup/pagedown would be cool.
Here two obj-c code snippets for inspiration:
for a NSView:
Code: |
- (void)magnifyWithEvent:(id)fp8
{
//[fp8 deltaZ]
}
- (void)swipeWithEvent:(id)fp8
{
//[fp8 deltaX] => horizontal swipe (+/- 1.0)
//[fp8 deltaY] => vertical swipe (+/- 1.0)
}
- (void)rotateWithEvent:(id)fp8
{
//[fp8 rotation]
}
|
or if you grab it at the root (i.e. subclassing NSApp's sendEvent):
Code: |
- (void) sendEvent:(NSEvent *)anEvent
{
switch ([anEvent type]) {
case 18: //rotate
//[anEvent rotation]
break;
case 30: //magnify
//[anEvent deltaZ]
break;
case 31: //swipe
//[anEvent deltaX] => horizontal swipe (+/- 1.0)
//[anEvent deltaY] => vertical swipe (+/- 1.0)
break;
default:
[super sendEvent:anEvent];
}
}
|
In-depth reading:
[1] http://cocoadex.com/2008/02/nsevent-modifications-swipe-ro.html
Mike |
|
Back to top |
|
|
|