Zooming with Ctrl + Mouse Wheel [message #164764] |
Thu, 20 January 2005 13:26  |
Eclipse User |
|
|
|
Hi Guys,
I would like to Zoom in / out by pressinig Ctrl and Scrolling the mouse
wheel.
I really don't know too much about how to go about doing this
1) I could not find the piece of code responsible for registering Ctrl + +
and Ctrl + - for zooming in and out. Could someone point out where this is
done?
2) I'm guessing I won't have to interact with the Mouse Wheel directly,
but the scroll events which it generates?
Any pointers appreciated,
Brian.
|
|
|
|
Re: Zooming with Ctrl + Mouse Wheel [message #164827 is a reply to message #164780] |
Thu, 20 January 2005 13:57   |
Eclipse User |
|
|
|
Actually I had a look at everything I could related to Zoom (at least I
think so) the ZoomManager, ZoomComboContributionItem, ZoomActions etc. I
still couldn't find the location where the Key Handlers were set up :(
I just saw that Ctrl+- and Ctrl+= are actually set up in Eclipse
Preferences under Keyboard Shortcuts. Which explains why this works in my
GEF editors as well even though I didn't implement anything of the sort.
GEF seems to setup the keybindings in it's plugin.xml
You're right about the inhibiting scrolling if Ctrl is pressed.
Good deal of work, looks like.
Thanks,
Brian.
Randy Hudson wrote:
> Scrollwheel support was just recently added to SWT. We'd like to send the
> events to the tools, but we haven't investigated yet. BTW, if zoom occurs,
> we need to prevent the scrolling from happening.
> Look for references to the Zoom actions. The logic editor creates them in an
> unusual location.
> "Brian Fernandes" <brian.fernandes@genuitec.com> wrote in message
> news:csot4e$o1b$1@www.eclipse.org...
>> Hi Guys,
>>
>> I would like to Zoom in / out by pressinig Ctrl and Scrolling the mouse
>> wheel.
>>
>> I really don't know too much about how to go about doing this
>>
>> 1) I could not find the piece of code responsible for registering Ctrl + +
>> and Ctrl + - for zooming in and out. Could someone point out where this is
>> done?
>>
>> 2) I'm guessing I won't have to interact with the Mouse Wheel directly,
>> but the scroll events which it generates?
>> Any pointers appreciated,
>> Brian.
>>
|
|
|
Re: Zooming with Ctrl + Mouse Wheel [message #165089 is a reply to message #164827] |
Fri, 21 January 2005 14:53   |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Actually, I thought zooming should be done using button2 pressed+wheel, not
CTRL+wheel. At least this is how Office and Visio work I think. Hopefully
just setting SWT's doit=false should interrupt the default handling of the
wheel.
"Brian Fernandes" <brian.fernandes@genuitec.com> wrote in message
news:csouuv$2kt$1@www.eclipse.org...
> Actually I had a look at everything I could related to Zoom (at least I
> think so) the ZoomManager, ZoomComboContributionItem, ZoomActions etc. I
> still couldn't find the location where the Key Handlers were set up :(
>
> I just saw that Ctrl+- and Ctrl+= are actually set up in Eclipse
> Preferences under Keyboard Shortcuts. Which explains why this works in my
> GEF editors as well even though I didn't implement anything of the sort.
> GEF seems to setup the keybindings in it's plugin.xml
>
> You're right about the inhibiting scrolling if Ctrl is pressed. Good deal
> of work, looks like.
>
> Thanks,
> Brian.
>
>
> Randy Hudson wrote:
>
>> Scrollwheel support was just recently added to SWT. We'd like to send
>> the events to the tools, but we haven't investigated yet. BTW, if zoom
>> occurs, we need to prevent the scrolling from happening.
>
>> Look for references to the Zoom actions. The logic editor creates them in
>> an unusual location.
>
>> "Brian Fernandes" <brian.fernandes@genuitec.com> wrote in message
>> news:csot4e$o1b$1@www.eclipse.org...
>>> Hi Guys,
>>>
>>> I would like to Zoom in / out by pressinig Ctrl and Scrolling the mouse
>>> wheel.
>>>
>>> I really don't know too much about how to go about doing this
>>>
>>> 1) I could not find the piece of code responsible for registering Ctrl +
>>> + and Ctrl + - for zooming in and out. Could someone point out where
>>> this is done?
>>>
>>> 2) I'm guessing I won't have to interact with the Mouse Wheel directly,
>>> but the scroll events which it generates?
>>> Any pointers appreciated,
>>> Brian.
>>>
>
>
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04637 seconds