Re: GtkSourceView: code folding
- From: Sébastien Wilmet <swilmet gnome org>
- To: flix <pupobrasil tiscali it>
- Cc: gnome-devtools gnome org
- Subject: Re: GtkSourceView: code folding
- Date: Mon, 11 Aug 2014 14:31:00 +0200
Hi flix,
On Mon, 2014-08-11 at 13:37 +0200, flix wrote:
I'm trying to implement a basic form of text folding (I'm using
GtkSourceViewmm).
<snip>
-> I add a ChildAnchor at the beginning with a label widget with
text: "{...}"
A probably better solution is to implement the code folding as every
other text editor do: show +/- buttons in the margin. See
GtkSourceGutter. I've implemented a prototype of a gutter renderer for
code folding:
https://git.gnome.org/browse/gtksourceview/log/?h=wip/gutter-renderer-folds
Ideally an API for the code folding should be created in GtkSourceView,
but having first a working implementation in an application would be a
good first step.
See also this utility class, which is useful to store the folding points
(it is a private class):
https://git.gnome.org/browse/gtksourceview/tree/gtksourceview/gtksourcemarkssequence.h
Regards,
Sébastien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]