[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: gschem: Using mouse wheels for scrolling



[ Ales here, I'm reposting this since majordomo didn't recognize the
  e-mail as being subscribed to the geda-dev/geda-user mailinglist. ]

-- Cut here --
From: Holger Waechtler <holger@qanu.de>

Ales Hvezda wrote:
> Hi,
> 
> [snip]
> 
>>My code virtually moves the scrollbars instead, using their page_size
>>divided by 4 as delta.
>>Patch attached.
> 
> 
> 
> 	Great!	I like this patch and the functionality it provides.
> 
> 	I have applied this patch (in CVS now) along with some #ifdef
> HAS_GTK22 since it only builds under gtk+ 2.2.x.  Also, I modified the
> code a little so that us poor slobs who only have one scroll button
> can scroll the display horizontally.  Just hold down the control key
> and use the vertical scroll wheel to scroll the display horizontally.
> Please test this to make sure I didn't break anything.
> 
> 	Thanks for the patch.  
> 
> 				-Ales
> 
> PS. what mouse do you use that has two scroll wheels?

just a side note: some EDA and 3D CAD tools use the scroll wheel to zoom 
in/out centered at the mouse pointer, this way you can navigate pretty 
intuitively in all directions using a single wheel only: zoom out while 
moving the mouse cursor to the new area of interest and scroll in again 
while adjusting the target point precisely - everything in a fraction of 
a second...

If you want to get an idea how this feels like you can check out the 
free eagle trial version and load one of the sample schematics.

You find a gtk-based implementation for gerbv of this in the 
experimental render branch in the gerbv CVS (I did this a while ago when 
I added keyboard navigation - ), it worked pretty fine - maybe you can 
take over some code snippets as inspiration.

Holger