Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
containerize.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef INKSCAPE_UI_CONTAINERIZE_H
3#define INKSCAPE_UI_CONTAINERIZE_H
4
5#include <gtkmm/widget.h>
6
7namespace Inkscape::UI {
8
25inline void containerize(Gtk::Widget &widget)
26{
27 g_signal_connect(widget.gobj(), "destroy", G_CALLBACK(+[] (GtkWidget *gobj, void *) {
28 for (auto c = gtk_widget_get_first_child(gobj); c; ) {
29 auto cnext = gtk_widget_get_next_sibling(c);
30 gtk_widget_unparent(c);
31 c = cnext;
32 }
33 }), nullptr);
34}
35
36} // namespace Inkscape::UI
37
38#endif // INKSCAPE_UI_CONTAINERIZE_H
double c[8][4]
User interface code.
Definition desktop.h:113
void containerize(Gtk::Widget &widget)
Make a custom widget implement sensible memory management for its children.