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

#ifndef UI_SEARCHREPLACEFRAME_HH
#define UI_SEARCHREPLACEFRAME_HH

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

namespace Ui {
struct SearchReplaceFrame {
	Glib::RefPtr<Gtk::Builder> builder;
	Gtk::Image* imageSubstitutions = nullptr;
	Gtk::Box* boxSearchreplace = nullptr;
	Gtk::Grid* gridFindreplace = nullptr;
	Gtk::Entry* entrySearch = nullptr;
	Gtk::Entry* entryReplace = nullptr;
	Gtk::Button* buttonReplace = nullptr;
	Gtk::Image* imageReplace = nullptr;
	Gtk::Button* buttonReplaceall = nullptr;
	Gtk::Image* imageReplaceall = nullptr;
	Gtk::Button* buttonSearchprev = nullptr;
	Gtk::Image* imageSearchprev = nullptr;
	Gtk::Button* buttonSearchnext = nullptr;
	Gtk::Image* imageSearchnext = nullptr;
	Gtk::CheckButton* checkbuttonMatchcase = nullptr;
	Gtk::Button* buttonSubstitutions = nullptr;

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

	void setupUi() {
		builder->get_widget("imageSubstitutions", imageSubstitutions);
		builder->get_widget("boxSearchreplace", boxSearchreplace);
		builder->get_widget("gridFindreplace", gridFindreplace);
		builder->get_widget("entrySearch", entrySearch);
		builder->get_widget("entryReplace", entryReplace);
		builder->get_widget("buttonReplace", buttonReplace);
		builder->get_widget("imageReplace", imageReplace);
		builder->get_widget("buttonReplaceall", buttonReplaceall);
		builder->get_widget("imageReplaceall", imageReplaceall);
		builder->get_widget("buttonSearchprev", buttonSearchprev);
		builder->get_widget("imageSearchprev", imageSearchprev);
		builder->get_widget("buttonSearchnext", buttonSearchnext);
		builder->get_widget("imageSearchnext", imageSearchnext);
		builder->get_widget("checkbuttonMatchcase", checkbuttonMatchcase);
		builder->get_widget("buttonSubstitutions", buttonSubstitutions);
	}

	~SearchReplaceFrame() {
		std::vector<Gtk::Widget*> toplevelWidgets;
		if(!imageSubstitutions->get_parent()) toplevelWidgets.push_back(imageSubstitutions);
		if(!boxSearchreplace->get_parent()) toplevelWidgets.push_back(boxSearchreplace);
		if(!gridFindreplace->get_parent()) toplevelWidgets.push_back(gridFindreplace);
		if(!entrySearch->get_parent()) toplevelWidgets.push_back(entrySearch);
		if(!entryReplace->get_parent()) toplevelWidgets.push_back(entryReplace);
		if(!buttonReplace->get_parent()) toplevelWidgets.push_back(buttonReplace);
		if(!imageReplace->get_parent()) toplevelWidgets.push_back(imageReplace);
		if(!buttonReplaceall->get_parent()) toplevelWidgets.push_back(buttonReplaceall);
		if(!imageReplaceall->get_parent()) toplevelWidgets.push_back(imageReplaceall);
		if(!buttonSearchprev->get_parent()) toplevelWidgets.push_back(buttonSearchprev);
		if(!imageSearchprev->get_parent()) toplevelWidgets.push_back(imageSearchprev);
		if(!buttonSearchnext->get_parent()) toplevelWidgets.push_back(buttonSearchnext);
		if(!imageSearchnext->get_parent()) toplevelWidgets.push_back(imageSearchnext);
		if(!checkbuttonMatchcase->get_parent()) toplevelWidgets.push_back(checkbuttonMatchcase);
		if(!buttonSubstitutions->get_parent()) toplevelWidgets.push_back(buttonSubstitutions);
		std::for_each(toplevelWidgets.begin(), toplevelWidgets.end(), [](Gtk::Widget* w) { delete w; });
	}
};
} // Ui
#endif // UI_SEARCHREPLACEFRAME_HH
