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

#undef GTK_DISABLE_DEPRECATED
#define GDK_DISABLE_DEPRECATION_WARNINGS 1
 

#ifndef GTKMM_DISABLE_DEPRECATED


#include <glibmm.h>

#include <gtkmm/filechoosernative.h>
#include <gtkmm/private/filechoosernative_p.h>


/* Copyright (C) 2017 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>
#include <gtkmm/window.h>

namespace Gtk
{

FileChooserNative::FileChooserNative(const Glib::ustring& title, Window& parent,
  FileChooser::Action action,
  const Glib::ustring& accept_label, const Glib::ustring& cancel_label)
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  NativeDialog(Glib::ConstructParams(filechoosernative_class_.init(), "title",title.c_str(),"transient-for",parent.gobj(),"action",static_cast<GtkFileChooserAction>(action),"accept_label",Glib::c_str_or_nullptr(accept_label),"cancel_label",Glib::c_str_or_nullptr(cancel_label), nullptr))
{
}

FileChooserNative::FileChooserNative(const Glib::ustring& title,
  FileChooser::Action action,
  const Glib::ustring& accept_label, const Glib::ustring& cancel_label)
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  NativeDialog(Glib::ConstructParams(filechoosernative_class_.init(), "title",title.c_str(),"action",static_cast<GtkFileChooserAction>(action),"accept_label",Glib::c_str_or_nullptr(accept_label),"cancel_label",Glib::c_str_or_nullptr(cancel_label), nullptr))
{
}

} // namespace Gtk

namespace
{
} // anonymous namespace


namespace Glib
{

Glib::RefPtr<Gtk::FileChooserNative> wrap(GtkFileChooserNative* object, bool take_copy)
{
  return Glib::make_refptr_for_instance<Gtk::FileChooserNative>( dynamic_cast<Gtk::FileChooserNative*> (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& FileChooserNative_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_ = &FileChooserNative_Class::class_init_function;

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

  }

  return *this;
}


void FileChooserNative_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* FileChooserNative_Class::wrap_new(GObject* object)
{
  return new FileChooserNative((GtkFileChooserNative*)object);
}


/* The implementation: */

GtkFileChooserNative* FileChooserNative::gobj_copy()
{
  reference();
  return gobj();
}

FileChooserNative::FileChooserNative(const Glib::ConstructParams& construct_params)
:
  NativeDialog(construct_params)
{

}

FileChooserNative::FileChooserNative(GtkFileChooserNative* castitem)
:
  NativeDialog((GtkNativeDialog*)(castitem))
{}


FileChooserNative::FileChooserNative(FileChooserNative&& src) noexcept
: NativeDialog(std::move(src))
  , FileChooser(std::move(src))
{}

FileChooserNative& FileChooserNative::operator=(FileChooserNative&& src) noexcept
{
  NativeDialog::operator=(std::move(src));
  FileChooser::operator=(std::move(src));
  return *this;
}


FileChooserNative::~FileChooserNative() noexcept
{}


FileChooserNative::CppClassType FileChooserNative::filechoosernative_class_; // initialize static member

GType FileChooserNative::get_type()
{
  return filechoosernative_class_.init().get_type();
}


GType FileChooserNative::get_base_type()
{
  return gtk_file_chooser_native_get_type();
}


FileChooserNative::FileChooserNative()
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  NativeDialog(Glib::ConstructParams(filechoosernative_class_.init()))
{
  

}

Glib::RefPtr<FileChooserNative> FileChooserNative::create(const Glib::ustring& title, Window& parent, FileChooser::Action action, const Glib::ustring& accept_label, const Glib::ustring& cancel_label)
{
  return Glib::make_refptr_for_instance<FileChooserNative>( new FileChooserNative(title, parent, action, accept_label, cancel_label) );
}

Glib::RefPtr<FileChooserNative> FileChooserNative::create(const Glib::ustring& title, FileChooser::Action action, const Glib::ustring& accept_label, const Glib::ustring& cancel_label)
{
  return Glib::make_refptr_for_instance<FileChooserNative>( new FileChooserNative(title, action, accept_label, cancel_label) );
}

Glib::ustring FileChooserNative::get_accept_label() const
{
  return Glib::convert_const_gchar_ptr_to_ustring(gtk_file_chooser_native_get_accept_label(const_cast<GtkFileChooserNative*>(gobj())));
}

void FileChooserNative::set_accept_label(const Glib::ustring& accept_label)
{
  gtk_file_chooser_native_set_accept_label(gobj(), accept_label.empty() ? nullptr : accept_label.c_str());
}

Glib::ustring FileChooserNative::get_cancel_label() const
{
  return Glib::convert_const_gchar_ptr_to_ustring(gtk_file_chooser_native_get_cancel_label(const_cast<GtkFileChooserNative*>(gobj())));
}

void FileChooserNative::set_cancel_label(const Glib::ustring& cancel_label)
{
  gtk_file_chooser_native_set_cancel_label(gobj(), cancel_label.empty() ? nullptr : cancel_label.c_str());
}


Glib::PropertyProxy< Glib::ustring > FileChooserNative::property_accept_label() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "accept-label");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > FileChooserNative::property_accept_label() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "accept-label");
}

Glib::PropertyProxy< Glib::ustring > FileChooserNative::property_cancel_label() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "cancel-label");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > FileChooserNative::property_cancel_label() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "cancel-label");
}


} // namespace Gtk

#endif // GTKMM_DISABLE_DEPRECATED


