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

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2180
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 »

Offline mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 587
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: 5195
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 .... ?

Offline mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 587
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: 5195
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: 2180
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: 5195
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: 5195
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 jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
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: 5195
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 jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
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: [Select]
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 jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
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: 9508
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: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2180
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: 9508
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: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5195
Re: DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #15 on: September 01, 2009, 08:33:06 pm »
I have to say this middle mouse thing does not work for me.

My mouse has 2 buttons, and a scrollwheel which can also be pressed (as such the middle mouse key). But no luck.


Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #16 on: September 01, 2009, 09:08:36 pm »
It works for me, but not exactly as normally on linux.
If you highlight some text with the left mouse-button, move the mouse cursor, click the middle mouse-button (or the scroll-wheel in your and my case) and it will be pasted, but only  the highlighted text.
Or highlight some text, place the cursor inside the highlighted text and press the middle mouse-button. Now you can paste it multiple times with the mouse.

Offline mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 587
Re: DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #17 on: September 02, 2009, 07:47:07 am »
Hi Jens, Hi killerbot,

at the moment I do not know how we can make this available functionality more obvious for the users. For example the block select mode is available in CB but I think that 80% of the users do not know that it is available at all. A few days ago I installed Eclipse (Gallileo) and one of the hightlights in the release notes is, that Eclipse has now a block select mode. It is funny that so many people are contributing eclipse and such a fundamental feature has been missing so long. For enabling the block select mode there is a toggle icon so that every stupid user will see that Eclipse has this feature.
So my question is how can we make such features like block select mode or MouseSnap more obvious for new users. I think that new users try to play around a few days with new products and after that there will use only the functionality they discovered until this day. I will add some information in the CB docu, but I think that developers do not like to read manuals so we should think about different solutions :-)


Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5195
Re: DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #18 on: September 02, 2009, 09:34:21 am »
first : on another linux box : it works :-)

second : how do we make obvious to users that such a feature is available. Excellent question, but I don't know the answer.

* at minimum adding it to the list of tip of  the day [for a use like me this will have no impact, since the first thing I do is turn of those things]
* manual like you said, but people do not tend to read those
* little video snippets on the main website, that show such features
* extra buttons: but that means you can turn on/off [we have to make sure we don't make things to complicated; and someone like me will not have a look at all the button to wonder what they do; maybe I am a *bad* user ;-)]
* ...

Offline mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 587
Re: DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #19 on: September 02, 2009, 10:12:54 am »
I think that most users do the following if they are interested in a product:

1. Go to the webpage
2. Go to feature list and look at the screenshots
3. Check available documentation and forums

So the best solution is properly to put some content at the CB webpage. Currently the available features are no so obvious when reading the CB homepage and if a feature list is too long (without any screenshots) the users tend to skip reading a document or even forget everything. For the HighTec webpage I started already a CB feature section (which needs improvement too):
http://www.hightec-rt.com/en/products/codeblocks/63-integrated-development-environment.html

What we have to decide is which feature should be mentioned and perhaps is interesting for users. If we make such a list, I would do the documentation, since devs are not pleased if they have to write documentation :-)

Another thing is that currently the webpage is to static, so we need a bit more dynamic, such as providing download links for nightlies etc.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12129
    • Travis build status
Re: DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #20 on: September 02, 2009, 11:27:26 am »
There could be 2 feature lists - "best features" and full/all features
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline mariocup

  • Developer
  • Lives here!
  • *****
  • Posts: 587
Re: DragScroll plugin (was: new scintilla 2.0 was released)
« Reply #21 on: September 02, 2009, 12:35:40 pm »
Since most of the CB users work with different IDEs they know the best what is nice in CB or differs from other IDEs. For example something like "Syntax highlighting" is not a feature which should be mentioned because almost every editor has it. We should make some kind of list why new users love to work with Code::Blocks.

The structure how the features are presented is important to filter the relevant features easily. Perhaps the grouping could be something like: - Project/Build Management, Search/Navigation ...