Home > Community > Forums > Custom IC SKILL > One click pan

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 One click pan 

Last post Thu, Feb 11 2010 2:12 AM by skillUser. 3 replies.
Started by kurahape 22 Jan 2010 12:56 AM. Topic has 3 replies and 1992 views
Page 1 of 1 (4 items)
Sort Posts:
  • Fri, Jan 22 2010 12:56 AM

    • kurahape
    • Not Ranked
    • Joined on Fri, Jan 22 2010
    • Posts 1
    • Points 50
    One click pan Reply

    I would like to bind my mouse wheel click to the pan function.  I'm not sure how to get the location of the mouse wheel click to the hiPan() function.

    Thanks,

    Peter

    • Post Points: 50
  • Mon, Feb 1 2010 6:56 PM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 394
    • Points 7,420
    Re: One click pan Reply

    Try this: 

    hiPan(hiGetCurrentWindow() hiGetCommandPoint())

    More specifically:

    hiSetBindKey("Layout" "<Btn2Down>" "hiPan(hiGetCurrentWindow() hiGetCommandPoint())")

    • Post Points: 5
  • Mon, Feb 1 2010 7:19 PM

    Re: One click pan Reply

    Peter,

    The way this would normally be to bind <Btn4Down> to geScroll(nil "n" nil) and <Btn5Down> to geScroll(nil "s" nil) (and maybe the shift<Btn4Down> to a scroll w and e respectively. Not quite a pan, but probably a bit more intuitive.

     hiPan(hiGetCurrentWindow() hiGetCommandPoint())

    would do what you're asking, but if you try it, the behaviour is extremely weird! It's the kind of thing that is fine for a single key press, but not sure it makes any sense for a scroll wheel.

    Regards,

    Andrew.

    • Post Points: 5
  • Thu, Feb 11 2010 2:12 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,587
    • Points 15,915
    Re: One click pan Reply

     Have you considered or tried the mouse gestures (a.k.a."strokes") which can be entered while pressing the right mouse button down and drawing in the Layout or Schematic window?  You will need to load a few files to set this up, something like the following should work:

    
      setSkillPath( append( list(prependInstallPath("etc/sted")) getSkillPath()))
    
      load("stroke.il")
    
      load("defstrokes.il")
    
      hiLoadStrokeFile("def.strokes" "Layout")
    
    

    Now you can draw with the right mouse button depressed to make stroke shapes or mouse gestures in the Layout window (it can work for Schematic and Symbol too). A straight line to the right or to the left will pan, likewise for a stroke up or down. A "w" shape will do a "window fit" operation and so on. There is an executable, "stroke_editor" (for the IC61x releases, for older releases you might be able to use "sted" instead [excuse the pun]) which can be used to view or (re)define the strokes.

    Hope this helps you and anyone else interested in strokes.

    regards,

    Lawrence.

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by kurahape at 22 Jan 2010 12:56 AM. Topic has 3 replies.