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


#include <glibmm.h>

#include <gtkmm/stringsorter.h>
#include <gtkmm/private/stringsorter_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

// static
GType Glib::Value<Gtk::Collation>::value_type()
{
  return gtk_collation_get_type();
}


namespace Glib
{

Glib::RefPtr<Gtk::StringSorter> wrap(GtkStringSorter* object, bool take_copy)
{
  return Glib::make_refptr_for_instance<Gtk::StringSorter>( dynamic_cast<Gtk::StringSorter*> (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& StringSorter_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_ = &StringSorter_Class::class_init_function;

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

  }

  return *this;
}


void StringSorter_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* StringSorter_Class::wrap_new(GObject* object)
{
  return new StringSorter((GtkStringSorter*)object);
}


/* The implementation: */

GtkStringSorter* StringSorter::gobj_copy()
{
  reference();
  return gobj();
}

StringSorter::StringSorter(const Glib::ConstructParams& construct_params)
:
  Gtk::Sorter(construct_params)
{

}

StringSorter::StringSorter(GtkStringSorter* castitem)
:
  Gtk::Sorter((GtkSorter*)(castitem))
{}


StringSorter::StringSorter(StringSorter&& src) noexcept
: Gtk::Sorter(std::move(src))
{}

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


StringSorter::~StringSorter() noexcept
{}


StringSorter::CppClassType StringSorter::stringsorter_class_; // initialize static member

GType StringSorter::get_type()
{
  return stringsorter_class_.init().get_type();
}


GType StringSorter::get_base_type()
{
  return gtk_string_sorter_get_type();
}


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

}

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

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

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

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

bool StringSorter::get_ignore_case() const
{
  return gtk_string_sorter_get_ignore_case(const_cast<GtkStringSorter*>(gobj()));
}

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

void StringSorter::set_collation(Collation collation)
{
  gtk_string_sorter_set_collation(gobj(), static_cast<GtkCollation>(collation));
}

Collation StringSorter::get_collation() const
{
  return static_cast<Collation>(gtk_string_sorter_get_collation(const_cast<GtkStringSorter*>(gobj())));
}


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>> > StringSorter::property_expression() 
{
  return Glib::PropertyProxy< Glib::RefPtr<Expression<Glib::ustring>> >(this, "expression");
}

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

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

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

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

Glib::PropertyProxy< Collation > StringSorter::property_collation() 
{
  return Glib::PropertyProxy< Collation >(this, "collation");
}

Glib::PropertyProxy_ReadOnly< Collation > StringSorter::property_collation() const
{
  return Glib::PropertyProxy_ReadOnly< Collation >(this, "collation");
}


} // namespace Gtk


