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

#ifndef UI_CHARACTERLISTDIALOG_HH
#define UI_CHARACTERLISTDIALOG_HH

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

namespace Ui {
struct CharacterListDialog {
	Glib::RefPtr<Gtk::Builder> builder;
	Gtk::Dialog* dialogCharacterLists = nullptr;
	Gtk::Button* buttonClose = nullptr;
	Gtk::RadioButton* radioButtonBlacklist = nullptr;
	Gtk::Entry* entryBlacklist = nullptr;
	Gtk::RadioButton* radioButtonWhitelist = nullptr;
	Gtk::Entry* entryWhitelist = nullptr;

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

	void setupUi() {
		builder->get_widget("dialogCharacterLists", dialogCharacterLists);
		builder->get_widget("buttonClose", buttonClose);
		builder->get_widget("radioButtonBlacklist", radioButtonBlacklist);
		builder->get_widget("entryBlacklist", entryBlacklist);
		builder->get_widget("radioButtonWhitelist", radioButtonWhitelist);
		builder->get_widget("entryWhitelist", entryWhitelist);
	}

	~CharacterListDialog() {
		std::vector<Gtk::Widget*> toplevelWidgets;
		if(!dialogCharacterLists->get_parent()) toplevelWidgets.push_back(dialogCharacterLists);
		if(!buttonClose->get_parent()) toplevelWidgets.push_back(buttonClose);
		if(!radioButtonBlacklist->get_parent()) toplevelWidgets.push_back(radioButtonBlacklist);
		if(!entryBlacklist->get_parent()) toplevelWidgets.push_back(entryBlacklist);
		if(!radioButtonWhitelist->get_parent()) toplevelWidgets.push_back(radioButtonWhitelist);
		if(!entryWhitelist->get_parent()) toplevelWidgets.push_back(entryWhitelist);
		std::for_each(toplevelWidgets.begin(), toplevelWidgets.end(), [](Gtk::Widget* w) { delete w; });
	}
};
} // Ui
#endif // UI_CHARACTERLISTDIALOG_HH
