e-widget-undo: Evolution Utilities Reference Manual

## e-widget-undo e-widget-undo |

## Functions

void | e_widget_undo_attach ()
gboolean | e_widget_undo_is_attached ()
gboolean | e_widget_undo_has_undo ()
gboolean | e_widget_undo_has_redo ()
gchar * | e_widget_undo_describe_undo ()
gchar * | e_widget_undo_describe_redo ()
void | e_widget_undo_do_undo ()
void | e_widget_undo_do_redo ()
void | e_widget_undo_reset ()

## Description

## Functions

### e_widget_undo_attach ()

    void
    e_widget_undo_attach (GtkWidget *widget,
                          struct _EFocusTracker *focus_tracker);

The function does nothing, if the widget is not of a supported type for undo functionality, same as when the undo is already attached. It is ensured that the actions of the provided `focus_tracker` are updated on change of the `widget` .

See ``e_widget_undo_is_attached()`` .

#### Parameters

widget | a GtkWidget, where to attach undo functionality |
focus_tracker | an EFocusTracker, can be `NULL` |

Since: 3.12

### e_widget_undo_is_attached ()

    gboolean
    e_widget_undo_is_attached (GtkWidget *widget);

Checks whether the given widget has already attached an undo functionality - it is done with ``e_widget_undo_attach()`` .

#### Parameters

widget | a GtkWidget, where to test whether undo functionality is attached. |

#### Returns

Whether the given `widget` has already attached undo functionality.

Since: 3.12

### e_widget_undo_has_undo ()

    gboolean
    e_widget_undo_has_undo (GtkWidget *widget);

#### Parameters

widget | a GtkWidget |

#### Returns

Whether the given `widget` has any undo available.

See: `e_widget_undo_describe_undo` , `e_widget_undo_do_undo`

Since: 3.12

### e_widget_undo_has_redo ()

    gboolean
    e_widget_undo_has_redo (GtkWidget *widget);

#### Parameters

widget | a GtkWidget |

#### Returns

Whether the given `widget` has any redo available.

See: `e_widget_undo_describe_redo` , `e_widget_undo_do_redo`

Since: 3.12

### e_widget_undo_describe_undo ()

    gchar *
    e_widget_undo_describe_undo (GtkWidget *widget);

#### Parameters

widget | a GtkWidget |

#### Returns

Description of a top undo action available for the `widget` , `NULL` when there is no undo action. Returned pointer, if not `NULL`, should be freed with `g_free()`.

See: `e_widget_undo_has_undo` , `e_widget_undo_do_undo` .

[transfer full]

Since: 3.12

### e_widget_undo_describe_redo ()

    gchar *
    e_widget_undo_describe_redo (GtkWidget *widget);

#### Parameters

widget | a GtkWidget |

#### Returns

Description of a top redo action available for the `widget` , `NULL` when there is no redo action. Returned pointer, if not `NULL`, should be freed with `g_free()`.

See: `e_widget_undo_has_redo` , `e_widget_undo_do_redo` .

[transfer full]

Since: 3.12

### e_widget_undo_do_undo ()

    void
    e_widget_undo_do_undo (GtkWidget *widget);

Applies the top undo action on the `widget` , which also remembers a redo action. It does nothing if the widget doesn't have attached undo functionality (``e_widget_undo_attach()`` ), neither when there is no undo action available.

See: `e_widget_undo_attach` , `e_widget_undo_has_undo` , `e_widget_undo_describe_undo`

#### Parameters

widget | a GtkWidget |

Since: 3.12

### e_widget_undo_do_redo ()

    void
    e_widget_undo_do_redo (GtkWidget *widget);

Applies the top redo action on the `widget` , which also remembers an undo action. It does nothing if the widget doesn't have attached undo functionality (``e_widget_undo_attach()`` ), neither when there is no redo action available.

See: `e_widget_undo_attach` , `e_widget_undo_has_redo` , `e_widget_undo_describe_redo`

#### Parameters

widget | a GtkWidget |

Since: 3.12

### e_widget_undo_reset ()

    void
    e_widget_undo_reset (GtkWidget *widget);

Resets undo and redo stack to empty on a widget with attached undo functionality. It does nothing, if the widget does not have the undo functionality attached (see ``e_widget_undo_attach()`` ).

#### Parameters

widget | a GtkWidget, on which might be attached undo functionality |

Since: 3.12

## Types and Values