// Generated by gmmproc 2.88.0 -- DO NOT MODIFY!


#include <glibmm.h>

#include <gtkmm/popoverbin.h>
#include <gtkmm/private/popoverbin_p.h>


/* Copyright (C) 2026 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 */

#include <gtk/gtk.h>

namespace Gtk
{
void PopoverBin::unset_child()
{
  gtk_popover_bin_set_child(gobj(), nullptr);
}

void PopoverBin::unset_popover()
{
  gtk_popover_bin_set_popover(gobj(), nullptr);
}
} // namespace Gtk

namespace
{
} // anonymous namespace


namespace Glib
{

Gtk::PopoverBin* wrap(GtkPopoverBin* object, bool take_copy)
{
  return dynamic_cast<Gtk::PopoverBin *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}

} /* namespace Glib */

namespace Gtk
{


/* The *_Class implementation: */

const Glib::Class& PopoverBin_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Do not derive a GType, or use a derived class:
    gtype_ = gtk_popover_bin_get_type();

  }

  return *this;
}


Glib::ObjectBase* PopoverBin_Class::wrap_new(GObject* o)
{
  return manage(new PopoverBin((GtkPopoverBin*)(o)));

}


/* The implementation: */

PopoverBin::PopoverBin(const Glib::ConstructParams& construct_params)
:
  Gtk::Widget(construct_params)
{
  }

PopoverBin::PopoverBin(GtkPopoverBin* castitem)
:
  Gtk::Widget((GtkWidget*)(castitem))
{
  }


PopoverBin::PopoverBin(PopoverBin&& src) noexcept
: Gtk::Widget(std::move(src))
{}

PopoverBin& PopoverBin::operator=(PopoverBin&& src) noexcept
{
  Gtk::Widget::operator=(std::move(src));
  return *this;
}

PopoverBin::~PopoverBin() noexcept
{
  destroy_();
}

PopoverBin::CppClassType PopoverBin::popoverbin_class_; // initialize static member

GType PopoverBin::get_type()
{
  return popoverbin_class_.init().get_type();
}


GType PopoverBin::get_base_type()
{
  return gtk_popover_bin_get_type();
}


PopoverBin::PopoverBin()
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Gtk::Widget(Glib::ConstructParams(popoverbin_class_.init()))
{
  

}

void PopoverBin::set_child(Widget& child)
{
  gtk_popover_bin_set_child(gobj(), (child).gobj());
}

Widget* PopoverBin::get_child()
{
  return Glib::wrap(gtk_popover_bin_get_child(gobj()));
}

const Widget* PopoverBin::get_child() const
{
  return const_cast<PopoverBin*>(this)->get_child();
}

void PopoverBin::set_menu_model(const Glib::RefPtr<Gio::MenuModel>& model)
{
  gtk_popover_bin_set_menu_model(gobj(), Glib::unwrap(model));
}

Glib::RefPtr<Gio::MenuModel> PopoverBin::get_menu_model()
{
  auto retvalue = Glib::wrap(gtk_popover_bin_get_menu_model(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Gio::MenuModel> PopoverBin::get_menu_model() const
{
  return const_cast<PopoverBin*>(this)->get_menu_model();
}

void PopoverBin::set_popover(Popover& child)
{
  gtk_popover_bin_set_popover(gobj(), (child).Gtk::Widget::gobj());
}

Popover* PopoverBin::get_popover()
{
  return Glib::wrap((GtkPopover*)(gtk_popover_bin_get_popover(gobj())));
}

const Popover* PopoverBin::get_popover() const
{
  return const_cast<PopoverBin*>(this)->get_popover();
}

void PopoverBin::popup()
{
  gtk_popover_bin_popup(gobj());
}

void PopoverBin::popdown()
{
  gtk_popover_bin_popdown(gobj());
}

void PopoverBin::set_handle_input(bool handle_input)
{
  gtk_popover_bin_set_handle_input(gobj(), static_cast<int>(handle_input));
}

bool PopoverBin::get_handle_input() const
{
  return gtk_popover_bin_get_handle_input(const_cast<GtkPopoverBin*>(gobj()));
}


Glib::PropertyProxy< Widget* > PopoverBin::property_child() 
{
  return Glib::PropertyProxy< Widget* >(this, "child");
}

Glib::PropertyProxy_ReadOnly< Widget* > PopoverBin::property_child() const
{
  return Glib::PropertyProxy_ReadOnly< Widget* >(this, "child");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Popover*>::value,
  "Type Popover* cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy< Popover* > PopoverBin::property_popover() 
{
  return Glib::PropertyProxy< Popover* >(this, "popover");
}

Glib::PropertyProxy_ReadOnly< Popover* > PopoverBin::property_popover() const
{
  return Glib::PropertyProxy_ReadOnly< Popover* >(this, "popover");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Glib::RefPtr<Gio::MenuModel>>::value,
  "Type Glib::RefPtr<Gio::MenuModel> cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy< Glib::RefPtr<Gio::MenuModel> > PopoverBin::property_menu_model() 
{
  return Glib::PropertyProxy< Glib::RefPtr<Gio::MenuModel> >(this, "menu-model");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gio::MenuModel> > PopoverBin::property_menu_model() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gio::MenuModel> >(this, "menu-model");
}

Glib::PropertyProxy< bool > PopoverBin::property_handle_input() 
{
  return Glib::PropertyProxy< bool >(this, "handle-input");
}

Glib::PropertyProxy_ReadOnly< bool > PopoverBin::property_handle_input() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "handle-input");
}


} // namespace Gtk


