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


#include <glibmm.h>

#include <gtkmm/stringfilter.h>
#include <gtkmm/private/stringfilter_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>

using MatchMode = Gtk::StringFilter::MatchMode;

namespace
{
} // anonymous namespace

// static
GType Glib::Value<Gtk::StringFilter::MatchMode>::value_type()
{
  return gtk_string_filter_match_mode_get_type();
}


namespace Glib
{

Glib::RefPtr<Gtk::StringFilter> wrap(GtkStringFilter* object, bool take_copy)
{
  return Glib::make_refptr_for_instance<Gtk::StringFilter>( dynamic_cast<Gtk::StringFilter*> (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& StringFilter_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_ = &StringFilter_Class::class_init_function;

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

  }

  return *this;
}


void StringFilter_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* StringFilter_Class::wrap_new(GObject* object)
{
  return new StringFilter((GtkStringFilter*)object);
}


/* The implementation: */

GtkStringFilter* StringFilter::gobj_copy()
{
  reference();
  return gobj();
}

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

}

StringFilter::StringFilter(GtkStringFilter* castitem)
:
  Gtk::Filter((GtkFilter*)(castitem))
{}


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

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


StringFilter::~StringFilter() noexcept
{}


StringFilter::CppClassType StringFilter::stringfilter_class_; // initialize static member

GType StringFilter::get_type()
{
  return stringfilter_class_.init().get_type();
}


GType StringFilter::get_base_type()
{
  return gtk_string_filter_get_type();
}


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

}

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

Glib::ustring StringFilter::get_search() const
{
  return Glib::convert_const_gchar_ptr_to_ustring(gtk_string_filter_get_search(const_cast<GtkStringFilter*>(gobj())));
}

void StringFilter::set_search(const Glib::ustring& search)
{
  gtk_string_filter_set_search(gobj(), search.c_str());
}

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

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

void StringFilter::set_expression(const Glib::RefPtr<Expression<Glib::ustring>>& expression)
{
  gtk_string_filter_set_expression(gobj(), ((expression) ? (expression)->gobj() : nullptr));
}

bool StringFilter::get_ignore_case() const
{
  return gtk_string_filter_get_ignore_case(const_cast<GtkStringFilter*>(gobj()));
}

void StringFilter::set_ignore_case(bool ignore_case)
{
  gtk_string_filter_set_ignore_case(gobj(), static_cast<int>(ignore_case));
}

MatchMode StringFilter::get_match_mode() const
{
  return static_cast<MatchMode>(gtk_string_filter_get_match_mode(const_cast<GtkStringFilter*>(gobj())));
}

void StringFilter::set_match_mode(MatchMode mode)
{
  gtk_string_filter_set_match_mode(gobj(), static_cast<GtkStringFilterMatchMode>(mode));
}


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

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

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

Glib::PropertyProxy< bool > StringFilter::property_ignore_case() 
{
  return Glib::PropertyProxy< bool >(this, "ignore-case");
}

Glib::PropertyProxy_ReadOnly< bool > StringFilter::property_ignore_case() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "ignore-case");
}

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

Glib::PropertyProxy< MatchMode > StringFilter::property_match_mode() 
{
  return Glib::PropertyProxy< MatchMode >(this, "match-mode");
}

Glib::PropertyProxy_ReadOnly< MatchMode > StringFilter::property_match_mode() const
{
  return Glib::PropertyProxy_ReadOnly< MatchMode >(this, "match-mode");
}

Glib::PropertyProxy< Glib::ustring > StringFilter::property_search() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "search");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > StringFilter::property_search() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "search");
}


} // namespace Gtk


