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


#include <glibmm.h>

#include <gtkmm/colordialogbutton.h>
#include <gtkmm/private/colordialogbutton_p.h>


/* Copyright (C) 2022 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
{
} // anonymous namespace


namespace Glib
{

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

} /* namespace Glib */

namespace Gtk
{


/* The *_Class implementation: */

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

  }

  return *this;
}


Glib::ObjectBase* ColorDialogButton_Class::wrap_new(GObject* o)
{
  return manage(new ColorDialogButton((GtkColorDialogButton*)(o)));

}


/* The implementation: */

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

ColorDialogButton::ColorDialogButton(GtkColorDialogButton* castitem)
:
  Gtk::Widget((GtkWidget*)(castitem))
{
  }


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

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

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

ColorDialogButton::CppClassType ColorDialogButton::colordialogbutton_class_; // initialize static member

GType ColorDialogButton::get_type()
{
  return colordialogbutton_class_.init().get_type();
}


GType ColorDialogButton::get_base_type()
{
  return gtk_color_dialog_button_get_type();
}


ColorDialogButton::ColorDialogButton(const Glib::RefPtr<ColorDialog>& dialog)
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Gtk::Widget(Glib::ConstructParams(colordialogbutton_class_.init(), "dialog", Glib::unwrap(dialog), nullptr))
{
  

}

Glib::RefPtr<ColorDialog> ColorDialogButton::get_dialog()
{
  auto retvalue = Glib::wrap(gtk_color_dialog_button_get_dialog(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const ColorDialog> ColorDialogButton::get_dialog() const
{
  return const_cast<ColorDialogButton*>(this)->get_dialog();
}

void ColorDialogButton::set_dialog(const Glib::RefPtr<ColorDialog>& dialog)
{
  gtk_color_dialog_button_set_dialog(gobj(), Glib::unwrap(dialog));
}

Gdk::RGBA ColorDialogButton::get_rgba() const
{
  return Glib::wrap(const_cast<GdkRGBA*>(gtk_color_dialog_button_get_rgba(const_cast<GtkColorDialogButton*>(gobj()))), true);
}

void ColorDialogButton::set_rgba(const Gdk::RGBA& color)
{
  gtk_color_dialog_button_set_rgba(gobj(), (color).gobj());
}


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

Glib::PropertyProxy< Glib::RefPtr<ColorDialog> > ColorDialogButton::property_dialog() 
{
  return Glib::PropertyProxy< Glib::RefPtr<ColorDialog> >(this, "dialog");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ColorDialog> > ColorDialogButton::property_dialog() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ColorDialog> >(this, "dialog");
}

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

Glib::PropertyProxy< Gdk::RGBA > ColorDialogButton::property_rgba() 
{
  return Glib::PropertyProxy< Gdk::RGBA >(this, "rgba");
}

Glib::PropertyProxy_ReadOnly< Gdk::RGBA > ColorDialogButton::property_rgba() const
{
  return Glib::PropertyProxy_ReadOnly< Gdk::RGBA >(this, "rgba");
}


} // namespace Gtk


