<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/src/interface-gtk, branch v2.4.0</title>
<subtitle>Scintilla-based Text Editor and COrrector</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/'/>
<entry>
<title>Gtk: fixed setting the mouse cursor after changing the active buffer</title>
<updated>2025-04-19T14:00:18+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-04-19T14:00:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=29f1dea16c4ffa21926ccdc5a3b3c73a56d9437a'/>
<id>29f1dea16c4ffa21926ccdc5a3b3c73a56d9437a</id>
<content type='text'>
* The GdkWindow stacking order obviously got messed up when swapping out
  the child widget in the GtkEventBox.
* This was probably also responsible for input events coming through
  to the Scintilla view even though the GtkEventBox should block all
  input events from reaching the Scintilla view.
  The event masking in teco_view_new() is probably no longer necessary -
  but better keep it to be on the safe side.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The GdkWindow stacking order obviously got messed up when swapping out
  the child widget in the GtkEventBox.
* This was probably also responsible for input events coming through
  to the Scintilla view even though the GtkEventBox should block all
  input events from reaching the Scintilla view.
  The event masking in teco_view_new() is probably no longer necessary -
  but better keep it to be on the safe side.
</pre>
</div>
</content>
</entry>
<entry>
<title>Gtk: prevent drag-and-drop interaction and block more possibly dangerous touch and scroll events</title>
<updated>2025-04-18T03:02:27+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-04-18T03:02:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=816d2a300b24ce65a908e251be13b3f1b93cfa81'/>
<id>816d2a300b24ce65a908e251be13b3f1b93cfa81</id>
<content type='text'>
* You could drag and drop text into the Scintilla views, which would confuse SciTECO.
* In the future, we might actually want to support programmable drag-and-drop
  support via special key macros.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* You could drag and drop text into the Scintilla views, which would confuse SciTECO.
* In the future, we might actually want to support programmable drag-and-drop
  support via special key macros.
</pre>
</div>
</content>
</entry>
<entry>
<title>try hard to preserve the vertical scrolling position when auto-scrolling dot</title>
<updated>2025-04-15T00:43:53+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-04-15T00:43:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=29fe0a121d967b7bfbe487e11fd877df13512bf7'/>
<id>29fe0a121d967b7bfbe487e11fd877df13512bf7</id>
<content type='text'>
* There are cases, especially where the entire buffer is piped through some
  external process or when removing and reinserting large parts of the buffer,
  that dot changes very little, but the vertical scrolling position gets resets.
  This is especially noticable with the macro @^U{[: HECcat$ ]:},
  but also with M#cf (clang-format wrapper from "Useful macros").
* We now try to preserve the vertical position ("first visible line")
  before scrolling caret.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* There are cases, especially where the entire buffer is piped through some
  external process or when removing and reinserting large parts of the buffer,
  that dot changes very little, but the vertical scrolling position gets resets.
  This is especially noticable with the macro @^U{[: HECcat$ ]:},
  but also with M#cf (clang-format wrapper from "Useful macros").
* We now try to preserve the vertical position ("first visible line")
  before scrolling caret.
</pre>
</div>
</content>
</entry>
<entry>
<title>Gtk: do not attempt automatic ANSI key translation for dead keys</title>
<updated>2025-04-13T03:58:11+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-04-13T03:48:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=4254346a03a06bb612895d43329651e36ad3b482'/>
<id>4254346a03a06bb612895d43329651e36ad3b482</id>
<content type='text'>
* At least on Windows it was observed that teco_interface_get_ansi_key()
  would find ANSI keys on other layouts, but nothing corresponding to the key itself.
  For instance, for a dead caret (^), we'd find backslash.
  This made it impossible to type caret in the parser start states.
* We clumsily detect whether a keyevent refers to a dead key by checking its
  symbolic name and pass it down to the input method unmodified.
* Fixes entering dead keys, at the very least on Windows, but potentially
  on all other systems as well.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* At least on Windows it was observed that teco_interface_get_ansi_key()
  would find ANSI keys on other layouts, but nothing corresponding to the key itself.
  For instance, for a dead caret (^), we'd find backslash.
  This made it impossible to type caret in the parser start states.
* We clumsily detect whether a keyevent refers to a dead key by checking its
  symbolic name and pass it down to the input method unmodified.
* Fixes entering dead keys, at the very least on Windows, but potentially
  on all other systems as well.
</pre>
</div>
</content>
</entry>
<entry>
<title>scroll caret __almost__ always automatically after key presses</title>
<updated>2025-04-04T00:53:07+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-04-04T00:36:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=d2f759a1d4c8a42db73ac62cb8317847a1b40249'/>
<id>d2f759a1d4c8a42db73ac62cb8317847a1b40249</id>
<content type='text'>
* The old heuristics - scroll if dot changes after key press -
  turned out to be too simplistic.
  They broke the clang-format macro (M#cf), which left the view at the
  top of the document since the entire document is temporarily erased.
  Other simplified examples of this bug would be:
  @^Um{[: HECcat$ ]:} Mm
  Or even: @^Um{[: H@X.aG.a ]:} Mm
* Actually, the heuristics could be tricked even without deleting any
  significant amount of text from the buffer.
  The following test case replaces the previous character with a linefeed
  in a single key press:
  @^Um{-DI^J$} Mm
  If executed on the last visible line, dot wouldn't be scrolled into the view
  since it did not change.
* At the same time, we'd like to keep the existing mouse scroll behavior from
  fnkeys.tes, which is allowed to scroll dot outside of the visible area.
  Therefore, dot is scrolled into view always, except after mouse events.
  You may have to call SCI_SCROLLCARET manually in the ^KMOUSE macro,
  which is arguably not always straight forward.
* Some macros like M#cf may still leave the vertical scrolling position
  in unexpected positions. This could either be fixed by eradicating all
  remaining automatic scrolling from Scintilla or by explicitly restoring
  the vertical position from the macro (FIXME).
* This was broken since the introduction of mouse support,
  so it wasn't in v2.3.0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The old heuristics - scroll if dot changes after key press -
  turned out to be too simplistic.
  They broke the clang-format macro (M#cf), which left the view at the
  top of the document since the entire document is temporarily erased.
  Other simplified examples of this bug would be:
  @^Um{[: HECcat$ ]:} Mm
  Or even: @^Um{[: H@X.aG.a ]:} Mm
* Actually, the heuristics could be tricked even without deleting any
  significant amount of text from the buffer.
  The following test case replaces the previous character with a linefeed
  in a single key press:
  @^Um{-DI^J$} Mm
  If executed on the last visible line, dot wouldn't be scrolled into the view
  since it did not change.
* At the same time, we'd like to keep the existing mouse scroll behavior from
  fnkeys.tes, which is allowed to scroll dot outside of the visible area.
  Therefore, dot is scrolled into view always, except after mouse events.
  You may have to call SCI_SCROLLCARET manually in the ^KMOUSE macro,
  which is arguably not always straight forward.
* Some macros like M#cf may still leave the vertical scrolling position
  in unexpected positions. This could either be fixed by eradicating all
  remaining automatic scrolling from Scintilla or by explicitly restoring
  the vertical position from the macro (FIXME).
* This was broken since the introduction of mouse support,
  so it wasn't in v2.3.0.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactored GTK implementation of teco_view_t into its own file</title>
<updated>2025-03-02T00:52:37+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-03-02T00:38:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=20f530f7e8acc2b658aa63f90f96b6ddbc4430d3'/>
<id>20f530f7e8acc2b658aa63f90f96b6ddbc4430d3</id>
<content type='text'>
Also makes sense since all other GObject classes are in separate files.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also makes sense since all other GObject classes are in separate files.
</pre>
</div>
</content>
</entry>
<entry>
<title>GTK: always scroll caret when window size changes</title>
<updated>2025-03-02T00:48:42+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-03-01T23:36:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=38ae2e440127137c57a2d782cecffc3ce5e19804'/>
<id>38ae2e440127137c57a2d782cecffc3ce5e19804</id>
<content type='text'>
* The old implementation would scroll only once for the file first opened and too early.
  As a result, opening via `sciteco file:number` did not always scroll to the correct position.
  Also, `?` would usually not scroll the topic into view.
* Instead, we now always scroll in all views, but only if the size allocation changed.
  This ensures, we can still scroll with the mouse wheel.
* Therefore, we have to store the current size allocation per view.
  Instead of allocating a separate heap object, I decided to subclass the Scintilla GTK class.
* Some explicit casts are still necessary since teco_view_t is typedefed
  to `struct teco_view_t`, but we cannot easily rename the GObject instance structure.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The old implementation would scroll only once for the file first opened and too early.
  As a result, opening via `sciteco file:number` did not always scroll to the correct position.
  Also, `?` would usually not scroll the topic into view.
* Instead, we now always scroll in all views, but only if the size allocation changed.
  This ensures, we can still scroll with the mouse wheel.
* Therefore, we have to store the current size allocation per view.
  Instead of allocating a separate heap object, I decided to subclass the Scintilla GTK class.
* Some explicit casts are still necessary since teco_view_t is typedefed
  to `struct teco_view_t`, but we cannot easily rename the GObject instance structure.
</pre>
</div>
</content>
</entry>
<entry>
<title>GTK: set the mouse cursor on the Scintilla view to signal business and on the popup entries</title>
<updated>2025-03-02T00:46:36+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-03-01T13:14:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=2e601e3c6c27de6625c9b7d5d32177141e25acf6'/>
<id>2e601e3c6c27de6625c9b7d5d32177141e25acf6</id>
<content type='text'>
* By default, use the "text" cursor - this is the default Scintilla cursor, but
  inhibited by the GtkEventBox I used to catch all input events.
* When processing input events, the cursor is changed to "wait".
  This is done with a small delay in order to avoid flickering during normal typing.
  The cursor is only changed after 100ms of activity, i.e. only when executing long loops
  or external programs.
* We use the raw GSource API since it's tricky to work with source ids if the
  source could be removed in the meantime.
* The popup entries' cursor is also changed to "pointer" (hand) to give a hint that
  it can be clicked.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* By default, use the "text" cursor - this is the default Scintilla cursor, but
  inhibited by the GtkEventBox I used to catch all input events.
* When processing input events, the cursor is changed to "wait".
  This is done with a small delay in order to avoid flickering during normal typing.
  The cursor is only changed after 100ms of activity, i.e. only when executing long loops
  or external programs.
* We use the raw GSource API since it's tricky to work with source ids if the
  source could be removed in the meantime.
* The popup entries' cursor is also changed to "pointer" (hand) to give a hint that
  it can be clicked.
</pre>
</div>
</content>
</entry>
<entry>
<title>Gtk: fixed MOUSE macro invocation when detecting double/triple clicks</title>
<updated>2025-02-24T00:11:59+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-02-24T00:00:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=00dd53661570996c637d0d4b28188427e04f22bc'/>
<id>00dd53661570996c637d0d4b28188427e04f22bc</id>
<content type='text'>
* At the SciTECO API level (-nEJ), there are no double clicks.
  We must therefore ignore the GDK_2BUTTON_PRESS and GDK_3BUTTON_PRESS events,
  that are delivered when GTK detects double or triple clicks.
  They are only sent in addition to GDK_BUTTON_PRESS, so it's safe to
  simply ignore them.
* This was causing spurious RELEASED events, which were confusing the ^KMOUSE
  macro from fnkeys.tes, causing the wrong buffer range to be inserted into the
  command line.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* At the SciTECO API level (-nEJ), there are no double clicks.
  We must therefore ignore the GDK_2BUTTON_PRESS and GDK_3BUTTON_PRESS events,
  that are delivered when GTK detects double or triple clicks.
  They are only sent in addition to GDK_BUTTON_PRESS, so it's safe to
  simply ignore them.
* This was causing spurious RELEASED events, which were confusing the ^KMOUSE
  macro from fnkeys.tes, causing the wrong buffer range to be inserted into the
  command line.
</pre>
</div>
</content>
</entry>
<entry>
<title>support mouse interaction with popup windows</title>
<updated>2025-02-23T01:52:39+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-02-14T22:32:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=428dafa568923d5632101c716fb20a3de35d27be'/>
<id>428dafa568923d5632101c716fb20a3de35d27be</id>
<content type='text'>
* Curses allows scrolling with the scroll wheel at least
  if mouse support is enabled via ED flags.
  Gtk always supported that.
* Allow clicking on popup entries to fully autocomplete them.
  Since this behavior - just like auto completions - is parser state-dependant,
  I introduced a new state method (insert_completion_cb).
  All the implementations are currently in cmdline.c since there is some overlap
  with the process_edit_cmd_cb implementations.
* Fixed pressing undefined function keys while showing the popup.
  The popup area is no longer redrawn/replaced with the Scintilla view.
  Instead, continue to show the popup.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Curses allows scrolling with the scroll wheel at least
  if mouse support is enabled via ED flags.
  Gtk always supported that.
* Allow clicking on popup entries to fully autocomplete them.
  Since this behavior - just like auto completions - is parser state-dependant,
  I introduced a new state method (insert_completion_cb).
  All the implementations are currently in cmdline.c since there is some overlap
  with the process_edit_cmd_cb implementations.
* Fixed pressing undefined function keys while showing the popup.
  The popup area is no longer redrawn/replaced with the Scintilla view.
  Instead, continue to show the popup.
</pre>
</div>
</content>
</entry>
</feed>
