/* Copyright (C) 2003 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 .
*/
#include
namespace Gtk
{
#ifndef GTKMM_DISABLE_DEPRECATED
ColorButton::ColorButton(const Gdk::Color& color)
:
// Mark this class as non-derived to allow C++ vfuncs to be skipped.
Glib::ObjectBase(nullptr),
Gtk::Button(Glib::ConstructParams(colorbutton_class_.init(), "color", (color).gobj(), nullptr))
{
}
#endif //GTKMM_DISABLE_DEPRECATED
#ifndef GTKMM_DISABLE_DEPRECATED
Gdk::Color ColorButton::get_color() const
{
Gdk::Color color;
gtk_color_button_get_color(const_cast(gobj()), color.gobj());
return color;
}
#endif //GTKMM_DISABLE_DEPRECATED
Gdk::RGBA ColorButton::get_rgba() const
{
Gdk::RGBA color;
gtk_color_button_get_rgba(const_cast(gobj()), color.gobj());
return color;
}
} // namespace Gtk