GtkSourceView 3 Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
GtkSourceGutterGtkSourceGutter — Gutter object for GtkSourceView |
#include <gtksourceview/gtksourcegutter.h> GtkSourceGutter; GdkWindow * gtk_source_gutter_get_window (GtkSourceGutter *gutter
); gboolean gtk_source_gutter_insert (GtkSourceGutter *gutter
,GtkSourceGutterRenderer *renderer
,gint position
); void gtk_source_gutter_reorder (GtkSourceGutter *gutter
,GtkSourceGutterRenderer *renderer
,gint position
); void gtk_source_gutter_remove (GtkSourceGutter *gutter
,GtkSourceGutterRenderer *renderer
); void gtk_source_gutter_queue_draw (GtkSourceGutter *gutter
);
"view" GtkSourceView* : Read / Write / Construct Only "window-type" GtkTextWindowType : Read / Write / Construct Only "xpad" gint : Read / Write / Construct "ypad" gint : Read / Write / Construct
The GtkSourceGutter object represents the left and right gutters of the text view. It is used by GtkSourceView to draw the line numbers and category marks that might be present on a line. By packing additional GtkSourceGutterRenderer objects in the gutter, you can extend the gutter with your own custom drawings.
The gutter works very much the same way as cells rendered in a GtkTreeView. The concept is similar, with the exception that the gutter does not have an underlying GtkTreeModel. The builtin line number renderer is at position GTK_SOURCE_VIEW_GUTTER_POSITION_LINES (-30) and the marks renderer is at GTK_SOURCE_VIEW_GUTTER_POSITION_MARKS (-20). You can use these values to position custom renderers accordingly.
GdkWindow * gtk_source_gutter_get_window (GtkSourceGutter *gutter
);
Get the GdkWindow of the gutter. The window will only be available when the gutter has at least one, non-zero width, cell renderer packed.
|
a GtkSourceGutter. |
Returns : |
the GdkWindow of the gutter, or NULL
if the gutter has no window. [transfer none]
|
Since 2.8
gboolean gtk_source_gutter_insert (GtkSourceGutter *gutter
,GtkSourceGutterRenderer *renderer
,gint position
);
Insert renderer
into the gutter. If renderer
is yet unowned then gutter
claims its ownership. Otherwise just increases renderer's reference count.
renderer
cannot be already inserted to another gutter.
|
a GtkSourceGutter. |
|
a gutter renderer (must inherit from GtkSourceGutterRenderer). |
|
the renderer position. |
Returns : |
TRUE if operation succeeded. Otherwise FALSE . |
Since 3.0
void gtk_source_gutter_reorder (GtkSourceGutter *gutter
,GtkSourceGutterRenderer *renderer
,gint position
);
Reorders renderer
in gutter
to new position
.
|
a GtkSourceGutterRenderer. |
|
a GtkCellRenderer. |
|
the new renderer position. |
Since 2.8
void gtk_source_gutter_remove (GtkSourceGutter *gutter
,GtkSourceGutterRenderer *renderer
);
Removes renderer
from gutter
.
|
a GtkSourceGutter. |
|
a GtkSourceGutterRenderer. |
Since 2.8
void gtk_source_gutter_queue_draw (GtkSourceGutter *gutter
);
Invalidates the drawable area of the gutter. You can use this to force a redraw of the gutter if something has changed and needs to be redrawn.
|
a GtkSourceGutter. |
Since 2.8
"view"
property"view" GtkSourceView* : Read / Write / Construct Only
The GtkSourceView of the gutter
"window-type"
property "window-type" GtkTextWindowType : Read / Write / Construct Only
The text window type on which the window is placed
Default value: GTK_TEXT_WINDOW_PRIVATE
"xpad"
property "xpad" gint : Read / Write / Construct
The x-padding.
Allowed values: >= G_MAXULONG
Default value: 0