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

#ifndef UI_SUBSTITUTIONSMANAGER_HH
#define UI_SUBSTITUTIONSMANAGER_HH

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

namespace Ui {
struct SubstitutionsManager {
	Glib::RefPtr<Gtk::Builder> builder;
	Gtk::Image* imageApply = nullptr;
	Gtk::Image* imageClose = nullptr;
	Gtk::Window* windowSubstitutions = nullptr;
	Gtk::Box* box = nullptr;
	Gtk::Toolbar* toolbar = nullptr;
	Gtk::ToolButton* toolbuttonOpen = nullptr;
	Gtk::ToolButton* toolbuttonSave = nullptr;
	Gtk::ToolButton* toolbuttonClear = nullptr;
	Gtk::SeparatorToolItem* separator = nullptr;
	Gtk::ToolButton* toolbuttonAdd = nullptr;
	Gtk::ToolButton* toolbuttonRemove = nullptr;
	Gtk::ScrolledWindow* scrolledwindow = nullptr;
	Gtk::TreeView* treeview = nullptr;
	Gtk::ButtonBox* buttonbox = nullptr;
	Gtk::Button* buttonApply = nullptr;
	Gtk::Button* buttonClose = nullptr;

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

	void setupUi() {
		builder->get_widget("imageApply", imageApply);
		builder->get_widget("imageClose", imageClose);
		builder->get_widget("windowSubstitutions", windowSubstitutions);
		builder->get_widget("box", box);
		builder->get_widget("toolbar", toolbar);
		builder->get_widget("toolbuttonOpen", toolbuttonOpen);
		builder->get_widget("toolbuttonSave", toolbuttonSave);
		builder->get_widget("toolbuttonClear", toolbuttonClear);
		builder->get_widget("separator", separator);
		builder->get_widget("toolbuttonAdd", toolbuttonAdd);
		builder->get_widget("toolbuttonRemove", toolbuttonRemove);
		builder->get_widget("scrolledwindow", scrolledwindow);
		builder->get_widget("treeview", treeview);
		builder->get_widget("buttonbox", buttonbox);
		builder->get_widget("buttonApply", buttonApply);
		builder->get_widget("buttonClose", buttonClose);
	}

	~SubstitutionsManager() {
		std::vector<Gtk::Widget*> toplevelWidgets;
		if(!imageApply->get_parent()) toplevelWidgets.push_back(imageApply);
		if(!imageClose->get_parent()) toplevelWidgets.push_back(imageClose);
		if(!windowSubstitutions->get_parent()) toplevelWidgets.push_back(windowSubstitutions);
		if(!box->get_parent()) toplevelWidgets.push_back(box);
		if(!toolbar->get_parent()) toplevelWidgets.push_back(toolbar);
		if(!toolbuttonOpen->get_parent()) toplevelWidgets.push_back(toolbuttonOpen);
		if(!toolbuttonSave->get_parent()) toplevelWidgets.push_back(toolbuttonSave);
		if(!toolbuttonClear->get_parent()) toplevelWidgets.push_back(toolbuttonClear);
		if(!separator->get_parent()) toplevelWidgets.push_back(separator);
		if(!toolbuttonAdd->get_parent()) toplevelWidgets.push_back(toolbuttonAdd);
		if(!toolbuttonRemove->get_parent()) toplevelWidgets.push_back(toolbuttonRemove);
		if(!scrolledwindow->get_parent()) toplevelWidgets.push_back(scrolledwindow);
		if(!treeview->get_parent()) toplevelWidgets.push_back(treeview);
		if(!buttonbox->get_parent()) toplevelWidgets.push_back(buttonbox);
		if(!buttonApply->get_parent()) toplevelWidgets.push_back(buttonApply);
		if(!buttonClose->get_parent()) toplevelWidgets.push_back(buttonClose);
		std::for_each(toplevelWidgets.begin(), toplevelWidgets.end(), [](Gtk::Widget* w) { delete w; });
	}
};
} // Ui
#endif // UI_SUBSTITUTIONSMANAGER_HH
