TeplStatusbar

TeplStatusbar — Subclass of GtkStatusbar

Functions

Types and Values

struct TeplStatusbar

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBox
                    ╰── GtkStatusbar
                        ╰── TeplStatusbar

Implemented Interfaces

TeplStatusbar implements AtkImplementorIface, GtkBuildable and GtkOrientable.

Includes

#include <tepl/tepl.h>

Description

TeplStatusbar is a subclass of GtkStatusbar with a better look by default, and with added functions useful for a text editor.

Functions

tepl_statusbar_new ()

TeplStatusbar *
tepl_statusbar_new (void);

Returns

a new TeplStatusbar.

[transfer floating]

Since: 5.0


tepl_statusbar_show_cursor_position ()

void
tepl_statusbar_show_cursor_position (TeplStatusbar *statusbar,
                                     gint line,
                                     gint column);

Shows the line and column numbers on the right side of the statusbar . (So messages added with gtk_statusbar_push() are still visible after calling this function).

Parameters

statusbar

a TeplStatusbar.

 

line

the line number, must be >= 1.

 

column

the column number, must be >= 1.

 

Since: 5.0


tepl_statusbar_hide_cursor_position ()

void
tepl_statusbar_hide_cursor_position (TeplStatusbar *statusbar);

The reverse action of tepl_statusbar_show_cursor_position(). This function hides the text used to show the line and column numbers.

Parameters

statusbar

a TeplStatusbar.

 

Since: 5.0


tepl_statusbar_set_tab_group ()

void
tepl_statusbar_set_tab_group (TeplStatusbar *statusbar,
                              TeplTabGroup *tab_group);

Calls tepl_statusbar_show_cursor_position() and tepl_statusbar_hide_cursor_position() according to the “active-view” of tab_group , and the “tepl-cursor-moved” signal.

For the column number it uses the gtk_source_view_get_visual_column() function.

This function can be called only once, it is not possible to change the TeplTabGroup afterwards (this restriction may be lifted in the future if there is a compelling use-case).

Parameters

statusbar

a TeplStatusbar.

 

tab_group

a TeplTabGroup.

 

Since: 5.0

Types and Values

struct TeplStatusbar

struct TeplStatusbar;