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

#ifndef UI_TESSDATAMANAGER_HH
#define UI_TESSDATAMANAGER_HH

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

namespace Ui {
struct TessdataManager {
	Glib::RefPtr<Gtk::Builder> builder;
	Gtk::Image* imageApply = nullptr;
	Gtk::Image* imageClose = nullptr;
	Gtk::Image* imageRefresh = nullptr;
	Gtk::Dialog* dialogTessdatamanager = nullptr;
	Gtk::Button* buttonApply = nullptr;
	Gtk::Button* buttonClose = nullptr;
	Gtk::Button* buttonRefresh = nullptr;
	Gtk::Box* box = nullptr;
	Gtk::Label* label = nullptr;
	Gtk::ScrolledWindow* scrolledwindow = nullptr;
	Gtk::TreeView* treeview = nullptr;

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

	void setupUi() {
		builder->get_widget("imageApply", imageApply);
		builder->get_widget("imageClose", imageClose);
		builder->get_widget("imageRefresh", imageRefresh);
		builder->get_widget("dialogTessdatamanager", dialogTessdatamanager);
		builder->get_widget("buttonApply", buttonApply);
		builder->get_widget("buttonClose", buttonClose);
		builder->get_widget("buttonRefresh", buttonRefresh);
		builder->get_widget("box", box);
		builder->get_widget("label", label);
		builder->get_widget("scrolledwindow", scrolledwindow);
		builder->get_widget("treeview", treeview);
	}

	~TessdataManager() {
		std::vector<Gtk::Widget*> toplevelWidgets;
		if(!imageApply->get_parent()) toplevelWidgets.push_back(imageApply);
		if(!imageClose->get_parent()) toplevelWidgets.push_back(imageClose);
		if(!imageRefresh->get_parent()) toplevelWidgets.push_back(imageRefresh);
		if(!dialogTessdatamanager->get_parent()) toplevelWidgets.push_back(dialogTessdatamanager);
		if(!buttonApply->get_parent()) toplevelWidgets.push_back(buttonApply);
		if(!buttonClose->get_parent()) toplevelWidgets.push_back(buttonClose);
		if(!buttonRefresh->get_parent()) toplevelWidgets.push_back(buttonRefresh);
		if(!box->get_parent()) toplevelWidgets.push_back(box);
		if(!label->get_parent()) toplevelWidgets.push_back(label);
		if(!scrolledwindow->get_parent()) toplevelWidgets.push_back(scrolledwindow);
		if(!treeview->get_parent()) toplevelWidgets.push_back(treeview);
		std::for_each(toplevelWidgets.begin(), toplevelWidgets.end(), [](Gtk::Widget* w) { delete w; });
	}
};
} // Ui
#endif // UI_TESSDATAMANAGER_HH
