Re: GtkSourceView: code folding



Hi

On Tue, 2014-08-12 at 17:02 +0200, Paolo Borelli wrote:
Well, while it is true that we are not particularly interested in
getting this in gedit, but I still would very much welcome code
folding as a feature in gtksourceview.


Note that there is a bug open in bugzilla that contains an
implementation of a folding API for gtksourceview, and the drawing
part was working quite nicely last time it was tested (but I am pretty
sure things have bitrotten in the mean time).
Things were stuck because we wanted to implement the folding logic
itself based on the highlighter, but I think that is not a requirement
and we could merge an API that allows to fold part of the text,
leaving to the caller the logic of where to fold.


I think I understood what you want to do with the text anchor: you
want a small clickable target within the buffer, something like [...]
to show that there is folded text. The code in the bug/branch I
mentioned had this feature, but I think it was done by simply drawing
on top of the text instead of inserting a widget.




If you would like to pick up that bug, compare the proposed
api/implementation with yours, and try to push things forward in
gtksourceview itself, it would be very welcome.  Beside, also
preliminary patches to undomanager or other parts to make your
implementation work would surely be considered.




Ciao


    Paolo

<snip/>

I do see - https://bugzilla.gnome.org/show_bug.cgi?id=134610 . Would be
useful, given that C++11 has anonymous functions.


-- 
Cheers
-- ritz
Time sure flies when you don't know what you're doing.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]