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


#include <glibmm.h>

#include <gtksourceviewmm/styleschememanager.h>
#include <gtksourceviewmm/private/styleschememanager_p.h>


/* styleschememanager.cc
 *
 * Copyright (C) 2004-2005 Jae Jang
 * Copyright (C) 2005-2006 Rob Page
 * Copyright (C) 2006 Dodji Seketeli
 * Copyright (C) 2009, 2010, 2011 Krzesimir Nowak
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <glibmm/vectorutils.h>

namespace Gsv
{


void StyleSchemeManager::reset_search_path()
{
  gtk_source_style_scheme_manager_set_search_path(gobj(), 0);
}

} // namespace Gsv


namespace
{
} // anonymous namespace


namespace Glib
{

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

} /* namespace Glib */


namespace Gsv
{


/* The *_Class implementation: */

const Glib::Class& StyleSchemeManager_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_ = &StyleSchemeManager_Class::class_init_function;

    // This is actually just optimized away, apparently with no harm.
    // Make sure that the parent type has been created.
    //CppClassParent::CppObjectType::get_type();

    // Create the wrapper type, with the same class/instance size as the base type.
    register_derived_type(gtk_source_style_scheme_manager_get_type());

    // Add derived versions of interfaces, if the C type implements any interfaces:

  }

  return *this;
}


void StyleSchemeManager_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* StyleSchemeManager_Class::wrap_new(GObject* object)
{
  return new StyleSchemeManager((GtkSourceStyleSchemeManager*)object);
}


/* The implementation: */

GtkSourceStyleSchemeManager* StyleSchemeManager::gobj_copy()
{
  reference();
  return gobj();
}

StyleSchemeManager::StyleSchemeManager(const Glib::ConstructParams& construct_params)
:
  Glib::Object(construct_params)
{

}

StyleSchemeManager::StyleSchemeManager(GtkSourceStyleSchemeManager* castitem)
:
  Glib::Object((GObject*)(castitem))
{}


StyleSchemeManager::~StyleSchemeManager()
{}


StyleSchemeManager::CppClassType StyleSchemeManager::styleschememanager_class_; // initialize static member

GType StyleSchemeManager::get_type()
{
  return styleschememanager_class_.init().get_type();
}


GType StyleSchemeManager::get_base_type()
{
  return gtk_source_style_scheme_manager_get_type();
}


StyleSchemeManager::StyleSchemeManager()
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(0),
  Glib::Object(Glib::ConstructParams(styleschememanager_class_.init()))
{
  

}

Glib::RefPtr<StyleSchemeManager> StyleSchemeManager::create()
{
  return Glib::RefPtr<StyleSchemeManager>( new StyleSchemeManager() );
}

Glib::RefPtr<StyleSchemeManager> StyleSchemeManager::get_default()
{

  Glib::RefPtr<StyleSchemeManager> retvalue = Glib::wrap(gtk_source_style_scheme_manager_get_default());
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us
  return retvalue;
}

std::vector<std::string> StyleSchemeManager::get_search_path() const
{
  return Glib::ArrayHandler<std::string>::array_to_vector(gtk_source_style_scheme_manager_get_search_path(const_cast<GtkSourceStyleSchemeManager*>(gobj())), Glib::OWNERSHIP_NONE);
}

void StyleSchemeManager::set_search_path(const std::vector<std::string>& path)
{
  gtk_source_style_scheme_manager_set_search_path(gobj(), const_cast<gchar**>(Glib::ArrayHandler<std::string>::vector_to_array(path).data()));
}

void StyleSchemeManager::append_search_path(const std::string& path)
{
  gtk_source_style_scheme_manager_append_search_path(gobj(), path.c_str());
}

void StyleSchemeManager::prepend_search_path(const std::string& path)
{
  gtk_source_style_scheme_manager_prepend_search_path(gobj(), path.c_str());
}

Glib::RefPtr<StyleScheme> StyleSchemeManager::get_scheme(const std::string& scheme_id)
{
  Glib::RefPtr<StyleScheme> retvalue = Glib::wrap(gtk_source_style_scheme_manager_get_scheme(gobj(), scheme_id.c_str()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const StyleScheme> StyleSchemeManager::get_scheme(const std::string& scheme_id) const
{
  return const_cast<StyleSchemeManager*>(this)->get_scheme(scheme_id);
}

void StyleSchemeManager::force_rescan()
{
  gtk_source_style_scheme_manager_force_rescan(gobj());
}

std::vector<std::string> StyleSchemeManager::get_scheme_ids() const
{
  return Glib::ArrayHandler<std::string>::array_to_vector(gtk_source_style_scheme_manager_get_scheme_ids(const_cast<GtkSourceStyleSchemeManager*>(gobj())), Glib::OWNERSHIP_NONE);
}


Glib::PropertyProxy< std::vector<std::string> > StyleSchemeManager::property_search_path() 
{
  return Glib::PropertyProxy< std::vector<std::string> >(this, "search-path");
}

Glib::PropertyProxy_ReadOnly< std::vector<std::string> > StyleSchemeManager::property_search_path() const
{
  return Glib::PropertyProxy_ReadOnly< std::vector<std::string> >(this, "search-path");
}

Glib::PropertyProxy_ReadOnly< std::vector<std::string> > StyleSchemeManager::property_scheme_ids() const
{
  return Glib::PropertyProxy_ReadOnly< std::vector<std::string> >(this, "scheme-ids");
}


} // namespace Gsv


