// This file was autogenerated from /build/gimagereader/src/gimagereader-3.4.3/gtk/data/CrashHandler.ui

#ifndef UI_CRASHHANDLER_HH
#define UI_CRASHHANDLER_HH

#include <vector>
#include <gtkmm.h>

namespace Ui {
struct CrashHandler {
	Glib::RefPtr<Gtk::Builder> builder;
	Gtk::Image* imageRegenerate = nullptr;
	Gtk::Dialog* dialogCrashhandler = nullptr;
	Gtk::Box* vbox = nullptr;
	Gtk::ButtonBox* buttonbox = nullptr;
	Gtk::Button* buttonRegenerate = nullptr;
	Gtk::Button* buttonClose = nullptr;
	Gtk::Label* labelIntro = nullptr;
	Gtk::Label* labelIntroTesseract = nullptr;
	Gtk::Label* labelAutosave = nullptr;
	Gtk::ScrolledWindow* scrolledwindow = nullptr;
	Gtk::TextView* textview = nullptr;
	Gtk::ProgressBar* progressbar = nullptr;

	CrashHandler() {
		builder = Gtk::Builder::create_from_resource("/org/gnome/gimagereader/CrashHandler.ui");
		builder->set_translation_domain(GETTEXT_PACKAGE);
	}

	void setupUi() {
		builder->get_widget("imageRegenerate", imageRegenerate);
		builder->get_widget("dialogCrashhandler", dialogCrashhandler);
		builder->get_widget("vbox", vbox);
		builder->get_widget("buttonbox", buttonbox);
		builder->get_widget("buttonRegenerate", buttonRegenerate);
		builder->get_widget("buttonClose", buttonClose);
		builder->get_widget("labelIntro", labelIntro);
		builder->get_widget("labelIntroTesseract", labelIntroTesseract);
		builder->get_widget("labelAutosave", labelAutosave);
		builder->get_widget("scrolledwindow", scrolledwindow);
		builder->get_widget("textview", textview);
		builder->get_widget("progressbar", progressbar);
	}

	~CrashHandler() {
		std::vector<Gtk::Widget*> toplevelWidgets;
		if(!imageRegenerate->get_parent()) toplevelWidgets.push_back(imageRegenerate);
		if(!dialogCrashhandler->get_parent()) toplevelWidgets.push_back(dialogCrashhandler);
		if(!vbox->get_parent()) toplevelWidgets.push_back(vbox);
		if(!buttonbox->get_parent()) toplevelWidgets.push_back(buttonbox);
		if(!buttonRegenerate->get_parent()) toplevelWidgets.push_back(buttonRegenerate);
		if(!buttonClose->get_parent()) toplevelWidgets.push_back(buttonClose);
		if(!labelIntro->get_parent()) toplevelWidgets.push_back(labelIntro);
		if(!labelIntroTesseract->get_parent()) toplevelWidgets.push_back(labelIntroTesseract);
		if(!labelAutosave->get_parent()) toplevelWidgets.push_back(labelAutosave);
		if(!scrolledwindow->get_parent()) toplevelWidgets.push_back(scrolledwindow);
		if(!textview->get_parent()) toplevelWidgets.push_back(textview);
		if(!progressbar->get_parent()) toplevelWidgets.push_back(progressbar);
		std::for_each(toplevelWidgets.begin(), toplevelWidgets.end(), [](Gtk::Widget* w) { delete w; });
	}
};
} // Ui
#endif // UI_CRASHHANDLER_HH
