TeplGutterRendererFolds

TeplGutterRendererFolds — Basic gutter renderer for code folding

Object Hierarchy

    GFlags
    ╰── TeplGutterRendererFoldsState
    GObject
    ╰── GInitiallyUnowned
        ╰── GtkSourceGutterRenderer
            ╰── TeplGutterRendererFolds

Includes

#include <tepl/tepl.h>

Description

TeplGutterRendererFolds is a basic gutter renderer for code folding. It handles only the drawing, and has a flat view of the folding tree.

Functions

tepl_gutter_renderer_folds_new ()

GtkSourceGutterRenderer *
tepl_gutter_renderer_folds_new (void);

Returns

a new TeplGutterRendererFolds.

Since: 1.0


tepl_gutter_renderer_folds_set_state ()

void
tepl_gutter_renderer_folds_set_state (TeplGutterRendererFolds *self,
                                      TeplGutterRendererFoldsState state);

Sets the folding state of the next cell to be drawn.

This function is intended to be called from a subclass' draw method before chaining-up to its parent's draw method.

Parameters

Since: 1.0

Types and Values

TeplGutterRendererFolds

typedef struct _TeplGutterRendererFolds TeplGutterRendererFolds;

enum TeplGutterRendererFoldsState

The folding state at a certain line in the GtkTextBuffer.

Since TeplGutterRendererFolds has a flat view of the folding tree, some states can be combined; for example, TEPL_GUTTER_RENDERER_FOLDS_STATE_END and TEPL_GUTTER_RENDERER_FOLDS_STATE_CONTINUE.

Members

TEPL_GUTTER_RENDERER_FOLDS_STATE_NONE

No code folding here.

 

TEPL_GUTTER_RENDERER_FOLDS_STATE_START_FOLDED

Start of currently folded fold region.

 

TEPL_GUTTER_RENDERER_FOLDS_STATE_START_OPENED

Start of currently opened fold region.

 

TEPL_GUTTER_RENDERER_FOLDS_STATE_CONTINUE

Fold region continues.

 

TEPL_GUTTER_RENDERER_FOLDS_STATE_END

End of fold region.

 

Since: 1.0