#include "adwaitamm/alertdialog.hpp" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Adwaita { namespace { auto constinit _class = AlertDialog::Class{}; } // namespace auto AlertDialog::Class::init() -> Glib::Class const & { if (!gtype_) { class_init_func_ = &class_init_function; register_derived_type(adw_alert_dialog_get_type()); } return *this; } auto AlertDialog::Class::class_init_function(void * gclass, void * data) -> void { auto const klass = static_cast(gclass); CppClassParent::class_init_function(klass, data); } auto AlertDialog::Class::wrap_new(GObject * object) -> Glib::ObjectBase * { return Gtk::manage(new AlertDialog(ADW_ALERT_DIALOG(object))); } auto AlertDialog::get_type() -> GType { return _class.init().get_type(); } auto AlertDialog::get_base_type() -> GType { return adw_alert_dialog_get_type(); } AlertDialog::AlertDialog(Glib::ConstructParams const & params) : Dialog{params} { } AlertDialog::AlertDialog(BaseObjectType * gobj) : Dialog(ADW_DIALOG(gobj)) { } AlertDialog::AlertDialog(Glib::ustring heading, Glib::ustring body) : Glib::ObjectBase{nullptr} , Dialog{Glib::ConstructParams{_class.init(), "heading", heading.c_str(), "body", Glib::c_str_or_nullptr(body), nullptr}} { } } // namespace Adwaita namespace Glib { auto wrap(AdwAlertDialog * object, bool copy) -> Adwaita::AlertDialog * { return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); } } // namespace Glib