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

#ifndef UI_SELECTIONMENU_HH
#define UI_SELECTIONMENU_HH

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

namespace Ui {
struct SelectionMenu {
	Glib::RefPtr<Gtk::Builder> builder;
	Gtk::Image* imageSelectionClipboard = nullptr;
	Gtk::Image* imageSelectionDelete = nullptr;
	Gtk::Image* imageSelectionRecognize = nullptr;
	Gtk::Image* imageSelectionSave = nullptr;
	Gtk::Window* windowSelection = nullptr;
	Gtk::Grid* gridSelection = nullptr;
	Gtk::Button* buttonSelectionDelete = nullptr;
	Gtk::Label* labelSelectionOrder = nullptr;
	Gtk::SpinButton* spinSelectionOrder = nullptr;
	Gtk::Button* buttonSelectionRecognize = nullptr;
	Gtk::Button* buttonSelectionClipboard = nullptr;
	Gtk::Separator* separatorSelection = nullptr;
	Gtk::Button* buttonSelectionSave = nullptr;

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

	void setupUi() {
		builder->get_widget("imageSelectionClipboard", imageSelectionClipboard);
		builder->get_widget("imageSelectionDelete", imageSelectionDelete);
		builder->get_widget("imageSelectionRecognize", imageSelectionRecognize);
		builder->get_widget("imageSelectionSave", imageSelectionSave);
		builder->get_widget("windowSelection", windowSelection);
		builder->get_widget("gridSelection", gridSelection);
		builder->get_widget("buttonSelectionDelete", buttonSelectionDelete);
		builder->get_widget("labelSelectionOrder", labelSelectionOrder);
		builder->get_widget("spinSelectionOrder", spinSelectionOrder);
		builder->get_widget("buttonSelectionRecognize", buttonSelectionRecognize);
		builder->get_widget("buttonSelectionClipboard", buttonSelectionClipboard);
		builder->get_widget("separatorSelection", separatorSelection);
		builder->get_widget("buttonSelectionSave", buttonSelectionSave);
	}

	~SelectionMenu() {
		std::vector<Gtk::Widget*> toplevelWidgets;
		if(!imageSelectionClipboard->get_parent()) toplevelWidgets.push_back(imageSelectionClipboard);
		if(!imageSelectionDelete->get_parent()) toplevelWidgets.push_back(imageSelectionDelete);
		if(!imageSelectionRecognize->get_parent()) toplevelWidgets.push_back(imageSelectionRecognize);
		if(!imageSelectionSave->get_parent()) toplevelWidgets.push_back(imageSelectionSave);
		if(!windowSelection->get_parent()) toplevelWidgets.push_back(windowSelection);
		if(!gridSelection->get_parent()) toplevelWidgets.push_back(gridSelection);
		if(!buttonSelectionDelete->get_parent()) toplevelWidgets.push_back(buttonSelectionDelete);
		if(!labelSelectionOrder->get_parent()) toplevelWidgets.push_back(labelSelectionOrder);
		if(!spinSelectionOrder->get_parent()) toplevelWidgets.push_back(spinSelectionOrder);
		if(!buttonSelectionRecognize->get_parent()) toplevelWidgets.push_back(buttonSelectionRecognize);
		if(!buttonSelectionClipboard->get_parent()) toplevelWidgets.push_back(buttonSelectionClipboard);
		if(!separatorSelection->get_parent()) toplevelWidgets.push_back(separatorSelection);
		if(!buttonSelectionSave->get_parent()) toplevelWidgets.push_back(buttonSelectionSave);
		std::for_each(toplevelWidgets.begin(), toplevelWidgets.end(), [](Gtk::Widget* w) { delete w; });
	}
};
} // Ui
#endif // UI_SELECTIONMENU_HH
