TeplOverwriteIndicator

TeplOverwriteIndicator — Indicates Insert or Overwrite mode for text edition

Functions

Properties

gboolean overwrite Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── TeplOverwriteIndicator

Implemented Interfaces

TeplOverwriteIndicator implements AtkImplementorIface and GtkBuildable.

Includes

#include <tepl/tepl.h>

Description

TeplOverwriteIndicator indicates the mode in which text edition occurs: insert or overwrite.

See for example the “overwrite” property.

The usual case is to pack this widget in a GtkStatusbar.

TODO

It is planned to extend this widget to be able to click on / activate it to change the mode, with a GtkPopover for example (but this would be optional, with a "chooser" boolean construct-only property).

With a different styling when in overwrite mode.

Because not everybody is familiar with the key on the keyboard to switch between the different modes.

Functions

tepl_overwrite_indicator_new ()

TeplOverwriteIndicator *
tepl_overwrite_indicator_new (void);

Returns

a new TeplOverwriteIndicator.

[transfer floating]

Since: 6.4


tepl_overwrite_indicator_get_overwrite ()

gboolean
tepl_overwrite_indicator_get_overwrite
                               (TeplOverwriteIndicator *indicator);

Parameters

indicator

a TeplOverwriteIndicator.

 

Returns

the value of the “overwrite” property.

Since: 6.4


tepl_overwrite_indicator_set_overwrite ()

void
tepl_overwrite_indicator_set_overwrite
                               (TeplOverwriteIndicator *indicator,
                                gboolean overwrite);

Sets a new value to the “overwrite” property.

Parameters

indicator

a TeplOverwriteIndicator.

 

overwrite

the new value.

 

Since: 6.4


tepl_overwrite_indicator_set_view ()

void
tepl_overwrite_indicator_set_view (TeplOverwriteIndicator *indicator,
                                   GtkTextView *view);

Sets a GtkTextView to update automatically the state of indicator according to view . If view is NULL, then indicator will be empty.

Parameters

indicator

a TeplOverwriteIndicator.

 

view

a GtkTextView, or NULL.

[nullable]

Since: 6.4

Types and Values

struct TeplOverwriteIndicator

struct TeplOverwriteIndicator;

Property Details

The “overwrite” property

  “overwrite”                gboolean
  • If TRUE, indicates the overwrite mode.

  • If FALSE, indicates the insert mode.

Owner: TeplOverwriteIndicator

Flags: Read / Write

Default value: FALSE

Since: 6.4