Kaydet (Commit) 35b3b589 authored tarafından Nick Treleaven's avatar Nick Treleaven

Make Shift+Mouse wheel scroll the editor view horizontally

(#2410732).
Add function sci_scroll_columns().



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3363 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 030f9c5c
......@@ -19,7 +19,13 @@
* src/interface.c, src/ui_utils.h, src/notebook.c, src/keyfile.c,
doc/geany.txt, doc/geany.html, geany.glade:
Add an interface pref for whether to hide additional widgets when
double-clicking on document notebook tabs (off by default).
double-clicking on document notebook tabs (off by default) - closes
#2300430.
* src/sciwrappers.c, src/sciwrappers.h, src/editor.c, doc/geany.txt,
doc/geany.html:
Make Shift+Mouse wheel scroll the editor view horizontally
(#2410732).
Add function sci_scroll_columns().
2008-12-09 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
......
......@@ -3863,6 +3863,7 @@ shortcut). The interface pref must be enabled for this to work.</li>
<ul class="simple">
<li>Alt-scroll wheel moves up/down a page.</li>
<li>Ctrl-scroll wheel zooms in/out.</li>
<li>Shift-scroll wheel scrolls 8 characters right/left.</li>
<li>Ctrl-click on a word in a document to perform <em>Go to Tag Definition</em>.</li>
<li>Ctrl-click on a bracket/brace to perform <em>Go to Matching Brace</em>.</li>
</ul>
......@@ -4529,7 +4530,7 @@ USE OR PERFORMANCE OF THIS SOFTWARE.</p>
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
Generated on: 2008-12-11 16:25 UTC.
Generated on: 2008-12-11 17:16 UTC.
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
......
......@@ -3406,6 +3406,7 @@ Editor
* Alt-scroll wheel moves up/down a page.
* Ctrl-scroll wheel zooms in/out.
* Shift-scroll wheel scrolls 8 characters right/left.
* Ctrl-click on a word in a document to perform *Go to Tag Definition*.
* Ctrl-click on a bracket/brace to perform *Go to Matching Brace*.
......
......@@ -3936,14 +3936,22 @@ gboolean editor_goto_pos(GeanyEditor *editor, gint pos, gboolean mark)
static gboolean
on_editor_scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer user_data)
{
GeanyEditor *editor = user_data;
/* Handle scroll events if Alt is pressed and scroll whole pages instead of a
* few lines only, maybe this could/should be done in Scintilla directly */
if (event->state & GDK_MOD1_MASK)
{
GeanyEditor *editor = user_data;
sci_send_command(editor->sci, (event->direction == GDK_SCROLL_DOWN) ? SCI_PAGEDOWN : SCI_PAGEUP);
return TRUE;
}
else if (event->state & GDK_SHIFT_MASK)
{
gint amount = (event->direction == GDK_SCROLL_DOWN) ? 8 : -8;
sci_scroll_columns(editor->sci, amount);
return TRUE;
}
return FALSE; /* let Scintilla handle all other cases */
}
......
......@@ -763,6 +763,12 @@ void sci_scroll_lines(ScintillaObject *sci, gint lines)
}
void sci_scroll_columns(ScintillaObject *sci, gint columns)
{
SSM(sci, SCI_LINESCROLL, columns, 0);
}
gint sci_search_next(ScintillaObject *sci, gint flags, const gchar *text)
{
return SSM(sci, SCI_SEARCHNEXT, flags, (sptr_t) text );
......
......@@ -125,6 +125,7 @@ void sci_set_search_anchor (ScintillaObject * sci);
void sci_set_anchor (ScintillaObject * sci, gint pos);
void sci_scroll_caret (ScintillaObject * sci);
void sci_scroll_lines (ScintillaObject * sci, gint lines);
void sci_scroll_columns (ScintillaObject *sci, gint columns);
gint sci_search_next (ScintillaObject * sci, gint flags, const gchar *text);
gint sci_search_prev (ScintillaObject * sci, gint flags, const gchar *text);
gint sci_find_text (ScintillaObject * sci, gint flags, struct TextToFind *ttf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment