yet another wheelmouse binding : zoom with layout, schematic

F

fogh

Guest
Hi All,

For those (if any !) who liked the motif and workbench configs I posted on wheelmouse/doubleclick handling (
http://groups.google.com/groups?q=fogh%20btn4down http://groups.google.com/groups?q=fogh+double+click ) , you should also appreciate this snippet, which binds zoom to control+wheel

;; set control-wheel to zoom in/out
let( ((goldy 1.618034) (binding ""))
foreach(application '("Schematics" "Command Interpreter" "Show File" "Symbol" "Graphics Browser" "Layout")
binding=strcat("hiZoomRelativeScale(hiGetCurrentWindow() " sprintf(nil "%L" goldy) " )" )
hiSetBindKey( application "Ctrl<Btn4Down>" binding)
binding=strcat("hiZoomRelativeScale(hiGetCurrentWindow() " sprintf(nil "%L" 1/goldy) " )" )
hiSetBindKey( application "Ctrl<Btn5Down>" binding)
);apps
binding=hiGetBindKey("awv" "None<Key>z")
hiSetBindKey("awv" "<Btn4Down>" binding)
binding=hiGetBindKey("awv" "Shift<Key>z")
hiSetBindKey("awv" "<Btn5Down>" binding)
);let


BTW, I did not get any feedback on the CmDoubleClick() function, the CmMouseWheelLikeArrows(), or the common desktop environment and X11 resources for wheelmouse that I posted this summer. So if you use it, don t be shy, tell me what you think, what you modified, ...
 
fogh wrote:
BTW, I did not get any feedback on the CmDoubleClick() function, the
CmMouseWheelLikeArrows()
I tested your code and everything worked fine directly, except that I
had to remove 'DM("is switchable")' from CmDoubleClick().

Regards David Astrom
 
Boris,

thanks, it makes more sense to zoom on the pointer indeed. You can also bind
the doubleclick action to a key. It may spare you a descend popup.


Boris wrote:
Hi fogh,

I am enjoying your mouse wheel configs. Thanks a lot!
Concerning double click function, it not so useful for me, I prefer
keyboard :). But all scrolling mappings are really useful.

BTW, you are asking for improvements, I had made one for the zoom
function. I prefer zoom at the pointer. Here is an example:

;; procedure to zoom in/out at the mouse pointer
procedure( CmMouseWheelZoom(action "s")
let(((goldy 1.618034) (wwin hiGetCurrentWindow()) xy )
goldy = caseq(action
(zoomin goldy)
(t 1/goldy)
)
xy = hiGetPoint(wwin)
hiZoomRelativeScale(wwin goldy)
if( xy hiVectorPan(wwin xy hiGetPoint(wwin)))
) ; ** let **
) ; ** procedure CmMouseWheelZoom **

;; set control-wheel to zoom in/out
let( ((binding ""))
foreach(application '("Schematics" "Command Interpreter" "Show File"
"Symbol" "Graphics Browser" "Layout")
hiSetBindKey( application "Ctrl<Btn4Down>"
"CmMouseWheelZoom('zoomin)")
hiSetBindKey( application "Ctrl<Btn5Down>"
"CmMouseWheelZoom('zoomout)")
)
binding=hiGetBindKey("awv" "None<Key>z")
hiSetBindKey("awv" "<Btn4Down>" binding)
binding=hiGetBindKey("awv" "Shift<Key>z")
hiSetBindKey("awv" "<Btn5Down>" binding)
) ; ** let **

Thanks,
__
BoriS

fogh <cad_support@skipthisandunderscores.catena.nl> wrote in message news:<41738361$0$152$e4fe514c@dreader11.news.xs4all.nl>...

Hi All,

For those (if any !) who liked the motif and workbench configs I posted on wheelmouse/doubleclick handling (
http://groups.google.com/groups?q=fogh%20btn4down http://groups.google.com/groups?q=fogh+double+click ) , you should also appreciate this snippet, which binds zoom to control+wheel

;; set control-wheel to zoom in/out
let( ((goldy 1.618034) (binding ""))
foreach(application '("Schematics" "Command Interpreter" "Show File" "Symbol" "Graphics Browser" "Layout")
binding=strcat("hiZoomRelativeScale(hiGetCurrentWindow() " sprintf(nil "%L" goldy) " )" )
hiSetBindKey( application "Ctrl<Btn4Down>" binding)
binding=strcat("hiZoomRelativeScale(hiGetCurrentWindow() " sprintf(nil "%L" 1/goldy) " )" )
hiSetBindKey( application "Ctrl<Btn5Down>" binding)
);apps
binding=hiGetBindKey("awv" "None<Key>z")
hiSetBindKey("awv" "<Btn4Down>" binding)
binding=hiGetBindKey("awv" "Shift<Key>z")
hiSetBindKey("awv" "<Btn5Down>" binding)
);let


BTW, I did not get any feedback on the CmDoubleClick() function, the CmMouseWheelLikeArrows(), or the common desktop environment and X11 resources for wheelmouse that I posted this summer. So if you use it, don t be shy, tell me what you think, what you modified, ...
 
fogh <cad_support@skipthisandunderscores.catena.nl> wrote in message news:<41738361$0$152$e4fe514c@dreader11.news.xs4all.nl>...

BTW, I did not get any feedback on the CmDoubleClick() function,
I have just inserted that CmDoubleClick into my environment and I
think it is very good. I can't comment much on the code but it is
documented and fairly easy to understand.

--
Svenn
 
svenn.are@bjerkem.de wrote:
fogh <cad_support@skipthisandunderscores.catena.nl> wrote in message news:<41738361$0$152$e4fe514c@dreader11.news.xs4all.nl>...


BTW, I did not get any feedback on the CmDoubleClick() function,


I have just inserted that CmDoubleClick into my environment and I
think it is very good. I can't comment much on the code but it is
documented and fairly easy to understand.
Thanks Svenn.

If there are people interested in the wheel bindings who use citrix ICA / metaframe for unix, you have noticed that it doesn t work...that is because MFU has simply no support for more than 3 mouse buttons.
So please get in touch with your Metaframe supplier and request that they add support for button4&5 events in their Xserver "ctxXtw".
With requests from big customers that may happen.
 
Hi fogh,

I am enjoying your mouse wheel configs. Thanks a lot!
Concerning double click function, it not so useful for me, I prefer
keyboard :). But all scrolling mappings are really useful.

BTW, you are asking for improvements, I had made one for the zoom
function. I prefer zoom at the pointer. Here is an example:

;; procedure to zoom in/out at the mouse pointer
procedure( CmMouseWheelZoom(action "s")
let(((goldy 1.618034) (wwin hiGetCurrentWindow()) xy )
goldy = caseq(action
(zoomin goldy)
(t 1/goldy)
)
xy = hiGetPoint(wwin)
hiZoomRelativeScale(wwin goldy)
if( xy hiVectorPan(wwin xy hiGetPoint(wwin)))
) ; ** let **
) ; ** procedure CmMouseWheelZoom **

;; set control-wheel to zoom in/out
let( ((binding ""))
foreach(application '("Schematics" "Command Interpreter" "Show File"
"Symbol" "Graphics Browser" "Layout")
hiSetBindKey( application "Ctrl<Btn4Down>"
"CmMouseWheelZoom('zoomin)")
hiSetBindKey( application "Ctrl<Btn5Down>"
"CmMouseWheelZoom('zoomout)")
)
binding=hiGetBindKey("awv" "None<Key>z")
hiSetBindKey("awv" "<Btn4Down>" binding)
binding=hiGetBindKey("awv" "Shift<Key>z")
hiSetBindKey("awv" "<Btn5Down>" binding)
) ; ** let **

Thanks,
__
BoriS

fogh <cad_support@skipthisandunderscores.catena.nl> wrote in message news:<41738361$0$152$e4fe514c@dreader11.news.xs4all.nl>...
Hi All,

For those (if any !) who liked the motif and workbench configs I posted on wheelmouse/doubleclick handling (
http://groups.google.com/groups?q=fogh%20btn4down http://groups.google.com/groups?q=fogh+double+click ) , you should also appreciate this snippet, which binds zoom to control+wheel

;; set control-wheel to zoom in/out
let( ((goldy 1.618034) (binding ""))
foreach(application '("Schematics" "Command Interpreter" "Show File" "Symbol" "Graphics Browser" "Layout")
binding=strcat("hiZoomRelativeScale(hiGetCurrentWindow() " sprintf(nil "%L" goldy) " )" )
hiSetBindKey( application "Ctrl<Btn4Down>" binding)
binding=strcat("hiZoomRelativeScale(hiGetCurrentWindow() " sprintf(nil "%L" 1/goldy) " )" )
hiSetBindKey( application "Ctrl<Btn5Down>" binding)
);apps
binding=hiGetBindKey("awv" "None<Key>z")
hiSetBindKey("awv" "<Btn4Down>" binding)
binding=hiGetBindKey("awv" "Shift<Key>z")
hiSetBindKey("awv" "<Btn5Down>" binding)
);let


BTW, I did not get any feedback on the CmDoubleClick() function, the CmMouseWheelLikeArrows(), or the common desktop environment and X11 resources for wheelmouse that I posted this summer. So if you use it, don t be shy, tell me what you think, what you modified, ...
 

Welcome to EDABoard.com

Sponsor

Back
Top