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


#include <glibmm.h>

#include <gtkmm/boolfilter.h>
#include <gtkmm/private/boolfilter_p.h>


/* Copyright (C) 2020 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
{

Glib::RefPtr<Gtk::BoolFilter> wrap(GtkBoolFilter* object, bool take_copy)
{
  return Glib::make_refptr_for_instance<Gtk::BoolFilter>( dynamic_cast<Gtk::BoolFilter*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
  //We use dynamic_cast<> in case of multiple inheritance.
}

} /* namespace Glib */


namespace Gtk
{


/* The *_Class implementation: */

const Glib::Class& BoolFilter_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Glib::Class has to know the class init function to clone custom types.
    class_init_func_ = &BoolFilter_Class::class_init_function;

    // Do not derive a GType, or use a derived class:
    gtype_ = gtk_bool_filter_get_type();

  }

  return *this;
}


void BoolFilter_Class::class_init_function(void* g_class, void* class_data)
{
  const auto klass = static_cast<BaseClassType*>(g_class);
  CppClassParent::class_init_function(klass, class_data);


}


Glib::ObjectBase* BoolFilter_Class::wrap_new(GObject* object)
{
  return new BoolFilter((GtkBoolFilter*)object);
}


/* The implementation: */

GtkBoolFilter* BoolFilter::gobj_copy()
{
  reference();
  return gobj();
}

BoolFilter::BoolFilter(const Glib::ConstructParams& construct_params)
:
  Gtk::Filter(construct_params)
{

}

BoolFilter::BoolFilter(GtkBoolFilter* castitem)
:
  Gtk::Filter((GtkFilter*)(castitem))
{}


BoolFilter::BoolFilter(BoolFilter&& src) noexcept
: Gtk::Filter(std::move(src))
{}

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


BoolFilter::~BoolFilter() noexcept
{}


BoolFilter::CppClassType BoolFilter::boolfilter_class_; // initialize static member

GType BoolFilter::get_type()
{
  return boolfilter_class_.init().get_type();
}


GType BoolFilter::get_base_type()
{
  return gtk_bool_filter_get_type();
}


BoolFilter::BoolFilter(const Glib::RefPtr<Expression<bool>>& expression)
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Gtk::Filter(Glib::ConstructParams(boolfilter_class_.init(), "expression", ((expression) ? (expression)->gobj() : nullptr), nullptr))
{
  

}

Glib::RefPtr<BoolFilter> BoolFilter::create(const Glib::RefPtr<Expression<bool>>& expression)
{
  return Glib::make_refptr_for_instance<BoolFilter>( new BoolFilter(expression) );
}

Glib::RefPtr<Expression<bool>> BoolFilter::get_expression()
{
  auto retvalue = Glib::wrap<bool>(gtk_bool_filter_get_expression(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Expression<bool>> BoolFilter::get_expression() const
{
  auto retvalue = Glib::wrap<bool>(gtk_bool_filter_get_expression(const_cast<GtkBoolFilter*>(gobj())));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

void BoolFilter::set_expression(const Glib::RefPtr<Expression<bool>>& expression)
{
  gtk_bool_filter_set_expression(gobj(), ((expression) ? (expression)->gobj() : nullptr));
}

bool BoolFilter::get_invert() const
{
  return gtk_bool_filter_get_invert(const_cast<GtkBoolFilter*>(gobj()));
}

void BoolFilter::set_invert(bool invert)
{
  gtk_bool_filter_set_invert(gobj(), static_cast<int>(invert));
}


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

Glib::PropertyProxy< Glib::RefPtr<Expression<bool>> > BoolFilter::property_expression() 
{
  return Glib::PropertyProxy< Glib::RefPtr<Expression<bool>> >(this, "expression");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Expression<bool>> > BoolFilter::property_expression() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Expression<bool>> >(this, "expression");
}

Glib::PropertyProxy< bool > BoolFilter::property_invert() 
{
  return Glib::PropertyProxy< bool >(this, "invert");
}

Glib::PropertyProxy_ReadOnly< bool > BoolFilter::property_invert() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "invert");
}


} // namespace Gtk


