Author Topic: Right Mouse Drag and Scroll Plugin  (Read 22285 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Right Mouse Drag and Scroll Plugin
« on: December 09, 2005, 08:52:27 pm »
cbDragScroll plugin

Find attached a plugin for right mouse key drag scrolling.
Just grab a source line with the right mouse key and move it
in any direction.

The scroller is adaptive. The faster you move the faster the scroll.

thanks
pecan

EDIT: This version has a bug. See the correction in the
          following messages.
« Last Edit: December 14, 2005, 08:24:28 pm by Pecan »

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Right Mouse Drag and Scroll Plugin
« Reply #1 on: December 10, 2005, 03:35:09 am »
Great!

May I ask for this:
Mouse wheel panning (press the 3rd mouse button and then move the mouse).
Like it's done in Office or Firefox :)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Re: Right Mouse Drag and Scroll Plugin
« Reply #2 on: December 10, 2005, 04:36:53 pm »
Great!

May I ask for this:
Mouse wheel panning (press the 3rd mouse button and then move the mouse).
Like it's done in Office or Firefox :)

Ok, just after the new "stopgap" cbKeybinder.

I love the mouse scrolling. I'm so lazy about moving my hands from
one place to another. And with a small jerk, I can go from top to bottom of
a source file. Or just one line at a time. With a little practice, I've learned to
"jerk" from one bookmark to another.

thanks
pecan


Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Re: Right Mouse Drag and Scroll Plugin
« Reply #3 on: December 11, 2005, 05:38:56 pm »
New cbDragScroll v0.4

Found a bug in the previous version while testing keyBinder.
cbDragScroll was poping the top EventHandler instead of
its own.

Please find attached: cbDragScroll04.zip

Also: if you change the RC2/RC3 #define in the header file
and recompile under HEAD, it can be used with HEAD

thanks
pecan
« Last Edit: February 03, 2006, 09:15:00 pm by Pecan »

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Right Mouse Drag and Scroll Plugin
« Reply #4 on: December 30, 2005, 02:05:40 am »
thanks for this fine plugin,

in the course of switching CodeBlocks to unicode build as standard development version
i've done some necessary modifications to your code and also updated the project file to
the NewBuild global variable system.

attached cbDragScroll 0.4 NewBuild unicode


[attachment deleted by admin]

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Re: Right Mouse Drag and Scroll Plugin
« Reply #5 on: December 30, 2005, 07:31:21 pm »
@tiwag

acknowledged, thankyou
pecan

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Right Mouse Drag and Scroll Plugin
« Reply #6 on: January 19, 2006, 06:52:56 pm »
updated cbDragScroll so that it builds with CB versions past SVN rev 1807 again

Quote from: rev 1808
* Changed the signature of cbPlugin::BuildModuleMenu(). It now contains an argument that prefectly describes the item in question. As a result, right-clicking on folders works just fine now.




[attachment deleted by admin]

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Re: Right Mouse Drag and Scroll Plugin
« Reply #7 on: January 19, 2006, 07:14:00 pm »
updated cbDragScroll so that it builds with CB versions past SVN rev 1807 again

Quote from: rev 1808
* Changed the signature of cbPlugin::BuildModuleMenu(). It now contains an argument that prefectly describes the item in question. As a result, right-clicking on folders works just fine now.

Ok, thanks

But what's that all about.

thanks
pecan

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Re: Right Mouse Drag and Scroll Plugin
« Reply #8 on: January 22, 2006, 10:22:20 pm »
1/22/2006 4:18 PM

Please find attached cbDragScrollR013.zip

This version supports unix/GTK and MSwindows.
It also scrolls any window/control that allows
itself to be scrolled.

Note that some controls allow vertical scrolling
but don't allow horizontal scrolling.

Under GTK, some controls dont allow themselves
to be scrolled at all.

The editor windows are scrollable in both directions;

thanks
pecan
« Last Edit: February 14, 2006, 04:23:30 am by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Re: Right Mouse Drag and Scroll Plugin
« Reply #9 on: February 03, 2006, 07:51:09 pm »
2/3/2006 1:24 PM

Please find attached cbDragScrollV015.zip

Added editor configuration panel to:
    Enable/Disable mouse scrolling
    Choose direction of  the scroll
    Choose right/middle mouse key
    Set adaptive speed sensitivity
    Set mouse movement to line scrolling ratio

Added png icons for config panel. These must be moved
to "...{datafolder}.../images/settings". Else the default
plugin puzzle piece will be used.



The values on the slider for the "adaptive speed sensitivity"
represent the number: 100-(sensitivity*10)  divided into the
mouse moves (for which an additional line is scrolled).

The movement ratio is simply the percentage of mouse moves
needed to represent a text line.

I have been unable to test this under unix. Although the GTK code is present.

thanks
pecan

EDIT: I erroneously left LOGGING defined in cbDragScroll.h
Change it to #define LOGGING 0


[attachment deleted by admin]
« Last Edit: February 14, 2006, 04:23:07 am by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Re: Right Mouse Drag and Scroll Plugin
« Reply #10 on: February 04, 2006, 10:41:27 pm »
2/4/2006 4:39 PM

Attached: cbDragScrollV016.zip

Fixes for Unix/GTK users of cbDragScroll

thanks
pecan


[attachment deleted by admin]

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Re: Right Mouse Drag and Scroll Plugin
« Reply #11 on: February 14, 2006, 04:13:49 am »
2/13/2006 10:10 PM

Attached: cbDragScrollV017.zip

Added: required CB_IMPLEMENT_PLUGIN(cbDragScroll, "cbDragScroll" );
Added: Focus editor when mouse enters windows

thanks
pecan



[attachment deleted by admin]

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Right Mouse Drag and Scroll Plugin
« Reply #12 on: February 14, 2006, 08:30:38 am »
Added: Focus editor when mouse enters windows

is this feature configurable ?
i didn't try your latest version - but id don't like it.

Offline kkez

  • Almost regular
  • **
  • Posts: 153
    • WinapiZone
Re: Right Mouse Drag and Scroll Plugin
« Reply #13 on: February 14, 2006, 01:17:39 pm »
Could you please provide a binary version too? I don't have wxwidgets headers..

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Re: Right Mouse Drag and Scroll Plugin
« Reply #14 on: February 14, 2006, 06:15:32 pm »
Added: Focus editor when mouse enters windows

is this feature configurable ?
i didn't try your latest version - but id don't like it.

I will make it configurable soon. In the meantime, comment out the following
lines in cbdragscroll.cpp at line 610
Code: [Select]
     // set focus to editor window if mouse is in it
     if (event.GetEventType() eq wxEVT_ENTER_WINDOW)
       if (p_cbStyledTextCtrl && (m_pEvtObject == p_cbStyledTextCtrl))
            p_cbStyledTextCtrl->SetFocus();



As an aside, could you tell me why you would not want the editor to have
the focus if the mouse cursor is in the editor window?
Just for my own education.

thanks
pecan