Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Zooming with Ctrl + Mouse Wheel
Zooming with Ctrl + Mouse Wheel [message #164764] Thu, 20 January 2005 18:26 Go to next message
Brian Fernandes is currently offline Brian FernandesFriend
Messages: 68
Registered: July 2009
Member
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 #164780 is a reply to message #164764] Thu, 20 January 2005 18:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

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 #164827 is a reply to message #164780] Thu, 20 January 2005 18:57 Go to previous messageGo to next message
Brian Fernandes is currently offline Brian FernandesFriend
Messages: 68
Registered: July 2009
Member
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 19:53 Go to previous messageGo to next message
Eclipse UserFriend
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.
>>>
>
>
Re: Zooming with Ctrl + Mouse Wheel [message #165192 is a reply to message #165089] Sat, 22 January 2005 02:03 Go to previous messageGo to next message
Brian Fernandes is currently offline Brian FernandesFriend
Messages: 68
Registered: July 2009
Member
Randy Hudson wrote:

> 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.
Button 2 + wheel does seem a lot better AND faster than Ctrl + Wheel.
However, most browsers use Ctrl + Wheel for Zoom and I just check
Microsoft Word, it does too. Unfortunately both have the "wheel" as the
common factor, which is our problem :-)

> Hopefully
> just setting SWT's doit=false should interrupt the default handling of the
> wheel.

Not too sure of the SWT angle myself, I reckon the SWT guys anticipated
such requirements ... I hope :-)

Many of our users have asked for this functionality. Will you be looking
at making this part of GEF?

Thanks,
Brian.
Re: Zooming with Ctrl + Mouse Wheel [message #165561 is a reply to message #165192] Tue, 25 January 2005 20:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

https://bugs.eclipse.org/bugs/show_bug.cgi?id=36706

"Brian Fernandes" <brian.fernandes@genuitec.com> wrote in message
news:cssc9b$uvj$1@www.eclipse.org...
> Randy Hudson wrote:
>
>> 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.
> Button 2 + wheel does seem a lot better AND faster than Ctrl + Wheel.
> However, most browsers use Ctrl + Wheel for Zoom and I just check
> Microsoft Word, it does too. Unfortunately both have the "wheel" as the
> common factor, which is our problem :-)
>
>> Hopefully just setting SWT's doit=false should interrupt the default
>> handling of the wheel.
>
> Not too sure of the SWT angle myself, I reckon the SWT guys anticipated
> such requirements ... I hope :-)
>
> Many of our users have asked for this functionality. Will you be looking
> at making this part of GEF?
>
> Thanks,
> Brian.
>
>
Re: Zooming with Ctrl + Mouse Wheel [message #167031 is a reply to message #165561] Fri, 04 February 2005 19:51 Go to previous message
Brian Fernandes is currently offline Brian FernandesFriend
Messages: 68
Registered: July 2009
Member
Excellent :)

Really happy you guys implemented this.
Brian.
Randy Hudson wrote:

> https://bugs.eclipse.org/bugs/show_bug.cgi?id=36706
Previous Topic:Announcement: Talk on GEF at SIG Eclipse/JUGS (Stuttgart, Germany)
Next Topic:CONNECTION PROBLEM!!!!
Goto Forum:
  


Current Time: Thu Mar 28 11:30:08 GMT 2024

Powered by FUDForum. Page generated in 0.01992 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top