Author Topic: DragScroll plugin (was: new scintilla 2.0 was released)  (Read 16187 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
DragScroll plugin (was: new scintilla 2.0 was released)
« on: August 22, 2009, 01:57:36 pm »
...If I select a text in CB with the left mouse (holding the mouse) I can scroll one turn with the mouse wheel within the editor and then drop it at this position. It is not possible to scroll in continous mode.
...

The cbMouseSap plugin at  http://code.google.com/p/cbkeymacs/downloads/list is an emulation of the Linux MiddleMouse key cut and paste.

For example, mark some text, scroll to the target position and press the MiddleMouse key to paste it.

Or; press the MiddleMouse key over marked text to copy it to the clipboard, scroll to any number of locations and paste it by depressing the MiddleMouse key.

The above also works between editors.

« Last Edit: August 22, 2009, 01:59:14 pm by Pecan »

mariocup

  • Guest
DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #1 on: August 22, 2009, 11:03:47 pm »
Hi Pecan,

cool it works and is very helpful. Why is this plugin not part of the contrib?


Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #2 on: August 22, 2009, 11:25:19 pm »
I already downloaded the source.
In case there are no objections, I can add it to the contrib plugins .... ?

mariocup

  • Guest
DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #3 on: August 30, 2009, 12:05:15 am »
Hi killerbot,

I tested it under windows and it works nice. Did you or one of the other devs test it under Linux?
Any objections of the devs in adding it to the contrib plugin?


Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #4 on: August 30, 2009, 07:55:22 am »
Well the first thing we need is the approval of Pecan, the author.

@Mister Pecan : may we add it to the contrib plug-ins ?

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #5 on: August 30, 2009, 01:54:05 pm »
Well the first thing we need is the approval of Pecan, the author.

@Mister Pecan : may we add it to the contrib plug-ins ?

Well, of course. It just never occured to me that this piece of "after-thought" would become a distributed plugin.

Just goes to show that little things can count, I guess.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #6 on: August 30, 2009, 06:30:17 pm »
I prepared everything. Commit will happen tomorrow evening. Go to run to a football game now ;-)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #7 on: August 31, 2009, 09:37:02 pm »
Allright, the code has been committed, breaking the build :-(
Seems I moved to fast forward.  :?

Issues with the gtk function calls. Will have to look around on how to fix it, or to find my mistake during the fix of the Makefile.

EDIT : in case we need the gtk development files to be installed 'extra', it might not be such a good idea to use those methods ? Are their other possibilities ?
« Last Edit: August 31, 2009, 09:46:48 pm by killerbot »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #8 on: August 31, 2009, 10:44:04 pm »
EDIT : in case we need the gtk development files to be installed 'extra', it might not be such a good idea to use those methods ? Are their other possibilities ?

At least codesnippets also use gtk dev-files, so it should not be so hard to integrate.
The configure script already checks, if they are available.

I can have a look into this problem.
What about windows, does it build without problems ?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #9 on: August 31, 2009, 11:24:40 pm »
I think I have fixed the gtk issues, and on linux it builds
Currently looking into cbMouseSap <-----------> MouseSap. Currently the apply of the config is hacked.
« Last Edit: August 31, 2009, 11:32:00 pm by killerbot »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #10 on: August 31, 2009, 11:42:24 pm »
If I see right neither the MouseSapcfg-files, nor the dragscrollevent-files are used.
The drgscroll-stuff is not icnluded in the cbp-file, and MouseSapcfg can be removed, also the include of dragscrollevent.h.

Seems to work fine here without them.

I'm just building vi automake to see what happens.

This is the Makefile.am I use:

Code
INCLUDES = $(WX_CXXFLAGS) \
$(WX_GTK2_CFLAGS) \
-I$(top_srcdir)/src/include \
-I$(top_srcdir)/src/include/wxscintilla/include

pluginlibdir = $(pkglibdir)/plugins

pluginlib_LTLIBRARIES = libMouseSap.la

libMouseSap_la_LDFLAGS = -module -version-info 0:1:0 -shared -no-undefined -avoid-version

libMouseSap_la_LIBADD = $(PLUGIN_WX_LIBS) ../../../sdk/libcodeblocks.la

libMouseSap_la_SOURCES = MouseSap.cpp

noinst_HEADERS = MouseSap.h

EXTRA_DIST = $(srcdir)/*.cbp \
manifest.xml

pkgdata_DATA = MouseSap.zip

CLEANFILES = $(pkgdata_DATA)

MouseSap.zip: manifest.xml
PWD=`pwd` cd $(srcdir) && zip $(PWD)/MouseSap.zip manifest.xml > /dev/null

I think the cfg-files and the dragscrollevent-files can be safely removed from the project-files, the Makefiles and (if I am right) from svn.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #11 on: September 01, 2009, 07:45:01 am »
Seems to work this way, I committed the changes and also removed the MouseSapcfg-files from the projects.
Replaced the global cb-variable on windows, it's not used in our svn-sources since several months.
I also added a hack to avoid a nameconflict between wxWidgets2.8 and newer glib-versions.

I tested it on debian 64-bit (with automake and C::B) and on w2k with C::B.

By the way:
I guess the *cfg-files and the dragscrollevent-files are there because the plugin was initially copied from the dragscroll-plugin.
You can see this, if you compare MouseSapcfg.cpp and dragscrollcfg.cpp .

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
DragScroll should be MouseSap of course...
« Reply #12 on: September 01, 2009, 09:09:40 am »
...my mistake:
The topic should have been named "MouseSap plugin", not DragScroll. Jens' post with the DragScrollEvent confused me a bit. :lol:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #13 on: September 01, 2009, 01:49:31 pm »
...
By the way:
I guess the *cfg-files and the dragscrollevent-files are there because the plugin was initially copied from the dragscroll-plugin.
You can see this, if you compare MouseSapcfg.cpp and dragscrollcfg.cpp .


Correct. I "dragged" DragScroll over to a new directory and hacked it up.

If someone would give me SVN permissions to modify MouseSap, I'd appreciate it.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #14 on: September 01, 2009, 03:32:03 pm »
If someone would give me SVN permissions to modify MouseSap, I'd appreciate it.
...Yiannis, please?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ