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


#include <glibmm.h>

#include <gtkmm/text.h>
#include <gtkmm/private/text_p.h>


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

Gtk::Text* wrap(GtkText* object, bool take_copy)
{
  return dynamic_cast<Gtk::Text *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}

} /* namespace Glib */

namespace Gtk
{


/* The *_Class implementation: */

const Glib::Class& Text_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_ = &Text_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_text_get_type());

    // Add derived versions of interfaces, if the C type implements any interfaces:
  Editable::add_interface(get_type());

  }

  return *this;
}


void Text_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* Text_Class::wrap_new(GObject* o)
{
  return manage(new Text((GtkText*)(o)));

}


/* The implementation: */

Text::Text(const Glib::ConstructParams& construct_params)
:
  Gtk::Widget(construct_params)
{
  }

Text::Text(GtkText* castitem)
:
  Gtk::Widget((GtkWidget*)(castitem))
{
  }


Text::Text(Text&& src) noexcept
: Gtk::Widget(std::move(src))
  , Editable(std::move(src))
{}

Text& Text::operator=(Text&& src) noexcept
{
  Gtk::Widget::operator=(std::move(src));
  Editable::operator=(std::move(src));
  return *this;
}

Text::~Text() noexcept
{
  destroy_();
}

Text::CppClassType Text::text_class_; // initialize static member

GType Text::get_type()
{
  return text_class_.init().get_type();
}


GType Text::get_base_type()
{
  return gtk_text_get_type();
}


Text::Text()
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Gtk::Widget(Glib::ConstructParams(text_class_.init()))
{
  

}

Text::Text(const Glib::RefPtr<EntryBuffer>& buffer)
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Gtk::Widget(Glib::ConstructParams(text_class_.init(), "buffer", Glib::unwrap(buffer), nullptr))
{
  

}

Glib::RefPtr<EntryBuffer> Text::get_buffer()
{
  auto retvalue = Glib::wrap(gtk_text_get_buffer(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const EntryBuffer> Text::get_buffer() const
{
  return const_cast<Text*>(this)->get_buffer();
}

void Text::set_buffer(const Glib::RefPtr<EntryBuffer>& buffer)
{
  gtk_text_set_buffer(gobj(), Glib::unwrap(buffer));
}

void Text::set_visibility(bool visible)
{
  gtk_text_set_visibility(gobj(), static_cast<int>(visible));
}

bool Text::get_visibility() const
{
  return gtk_text_get_visibility(const_cast<GtkText*>(gobj()));
}

void Text::set_invisible_char(gunichar ch)
{
  gtk_text_set_invisible_char(gobj(), ch);
}

void Text::unset_invisible_char()
{
  gtk_text_unset_invisible_char(gobj());
}

gunichar Text::get_invisible_char() const
{
  return gtk_text_get_invisible_char(const_cast<GtkText*>(gobj()));
}

void Text::set_overwrite_mode(bool overwrite)
{
  gtk_text_set_overwrite_mode(gobj(), static_cast<int>(overwrite));
}

bool Text::get_overwrite_mode() const
{
  return gtk_text_get_overwrite_mode(const_cast<GtkText*>(gobj()));
}

void Text::set_max_length(int max)
{
  gtk_text_set_max_length(gobj(), max);
}

int Text::get_max_length() const
{
  return gtk_text_get_max_length(const_cast<GtkText*>(gobj()));
}

guint16 Text::get_text_length() const
{
  return gtk_text_get_text_length(const_cast<GtkText*>(gobj()));
}

void Text::set_activates_default(bool setting)
{
  gtk_text_set_activates_default(gobj(), static_cast<int>(setting));
}

bool Text::get_activates_default() const
{
  return gtk_text_get_activates_default(const_cast<GtkText*>(gobj()));
}

Glib::ustring Text::get_placeholder_text() const
{
  return Glib::convert_const_gchar_ptr_to_ustring(gtk_text_get_placeholder_text(const_cast<GtkText*>(gobj())));
}

void Text::set_placeholder_text(const Glib::ustring& text)
{
  gtk_text_set_placeholder_text(gobj(), text.c_str());
}

void Text::set_input_purpose(InputPurpose purpose)
{
  gtk_text_set_input_purpose(gobj(), static_cast<GtkInputPurpose>(purpose));
}

InputPurpose Text::get_input_purpose() const
{
  return static_cast<InputPurpose>(gtk_text_get_input_purpose(const_cast<GtkText*>(gobj())));
}

void Text::set_input_hints(InputHints hints)
{
  gtk_text_set_input_hints(gobj(), static_cast<GtkInputHints>(hints));
}

InputHints Text::get_input_hints() const
{
  return static_cast<InputHints>(gtk_text_get_input_hints(const_cast<GtkText*>(gobj())));
}

void Text::set_attributes(Pango::AttrList& attrs)
{
  gtk_text_set_attributes(gobj(), (attrs).gobj());
}

Pango::AttrList Text::get_attributes() const
{
  return Pango::AttrList((gtk_text_get_attributes(const_cast<GtkText*>(gobj()))));
}

void Text::set_tabs(const Pango::TabArray& tabs)
{
  gtk_text_set_tabs(gobj(), const_cast<Pango::TabArray&>(tabs).gobj());
}

Pango::TabArray Text::get_tabs() const
{
  return Pango::TabArray((gtk_text_get_tabs(const_cast<GtkText*>(gobj()))));
}

bool Text::grab_focus_without_selecting()
{
  return gtk_text_grab_focus_without_selecting(gobj());
}

void Text::set_extra_menu(const Glib::RefPtr<Gio::MenuModel>& model)
{
  gtk_text_set_extra_menu(gobj(), Glib::unwrap(model));
}

Glib::RefPtr<Gio::MenuModel> Text::get_extra_menu()
{
  auto retvalue = Glib::wrap(gtk_text_get_extra_menu(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Gio::MenuModel> Text::get_extra_menu() const
{
  return const_cast<Text*>(this)->get_extra_menu();
}

void Text::set_enable_emoji_completion(bool enable_emoji_completion)
{
  gtk_text_set_enable_emoji_completion(gobj(), static_cast<int>(enable_emoji_completion));
}

bool Text::get_enable_emoji_completion() const
{
  return gtk_text_get_enable_emoji_completion(const_cast<GtkText*>(gobj()));
}

void Text::set_propagate_text_width(bool propagate_text_width)
{
  gtk_text_set_propagate_text_width(gobj(), static_cast<int>(propagate_text_width));
}

bool Text::get_propagate_text_width() const
{
  return gtk_text_get_propagate_text_width(const_cast<GtkText*>(gobj()));
}

void Text::set_truncate_multiline(bool truncate_multiline)
{
  gtk_text_set_truncate_multiline(gobj(), static_cast<int>(truncate_multiline));
}

bool Text::get_truncate_multiline() const
{
  return gtk_text_get_truncate_multiline(const_cast<GtkText*>(gobj()));
}


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

Glib::PropertyProxy< Glib::RefPtr<EntryBuffer> > Text::property_buffer() 
{
  return Glib::PropertyProxy< Glib::RefPtr<EntryBuffer> >(this, "buffer");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<EntryBuffer> > Text::property_buffer() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<EntryBuffer> >(this, "buffer");
}

Glib::PropertyProxy< int > Text::property_max_length() 
{
  return Glib::PropertyProxy< int >(this, "max-length");
}

Glib::PropertyProxy_ReadOnly< int > Text::property_max_length() const
{
  return Glib::PropertyProxy_ReadOnly< int >(this, "max-length");
}

Glib::PropertyProxy< bool > Text::property_visibility() 
{
  return Glib::PropertyProxy< bool >(this, "visibility");
}

Glib::PropertyProxy_ReadOnly< bool > Text::property_visibility() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "visibility");
}

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

Glib::PropertyProxy< gunichar > Text::property_invisible_char() 
{
  return Glib::PropertyProxy< gunichar >(this, "invisible-char");
}

Glib::PropertyProxy_ReadOnly< gunichar > Text::property_invisible_char() const
{
  return Glib::PropertyProxy_ReadOnly< gunichar >(this, "invisible-char");
}

Glib::PropertyProxy< bool > Text::property_invisible_char_set() 
{
  return Glib::PropertyProxy< bool >(this, "invisible-char-set");
}

Glib::PropertyProxy_ReadOnly< bool > Text::property_invisible_char_set() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "invisible-char-set");
}

Glib::PropertyProxy< bool > Text::property_activates_default() 
{
  return Glib::PropertyProxy< bool >(this, "activates-default");
}

Glib::PropertyProxy_ReadOnly< bool > Text::property_activates_default() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "activates-default");
}

Glib::PropertyProxy_ReadOnly< int > Text::property_scroll_offset() const
{
  return Glib::PropertyProxy_ReadOnly< int >(this, "scroll-offset");
}

Glib::PropertyProxy< bool > Text::property_truncate_multiline() 
{
  return Glib::PropertyProxy< bool >(this, "truncate-multiline");
}

Glib::PropertyProxy_ReadOnly< bool > Text::property_truncate_multiline() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "truncate-multiline");
}

Glib::PropertyProxy< bool > Text::property_overwrite_mode() 
{
  return Glib::PropertyProxy< bool >(this, "overwrite-mode");
}

Glib::PropertyProxy_ReadOnly< bool > Text::property_overwrite_mode() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "overwrite-mode");
}

Glib::PropertyProxy< Glib::ustring > Text::property_im_module() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "im-module");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > Text::property_im_module() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "im-module");
}

Glib::PropertyProxy< Glib::ustring > Text::property_placeholder_text() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "placeholder-text");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > Text::property_placeholder_text() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "placeholder-text");
}

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

Glib::PropertyProxy< InputPurpose > Text::property_input_purpose() 
{
  return Glib::PropertyProxy< InputPurpose >(this, "input-purpose");
}

Glib::PropertyProxy_ReadOnly< InputPurpose > Text::property_input_purpose() const
{
  return Glib::PropertyProxy_ReadOnly< InputPurpose >(this, "input-purpose");
}

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

Glib::PropertyProxy< InputHints > Text::property_input_hints() 
{
  return Glib::PropertyProxy< InputHints >(this, "input-hints");
}

Glib::PropertyProxy_ReadOnly< InputHints > Text::property_input_hints() const
{
  return Glib::PropertyProxy_ReadOnly< InputHints >(this, "input-hints");
}

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

Glib::PropertyProxy< Pango::AttrList > Text::property_attributes() 
{
  return Glib::PropertyProxy< Pango::AttrList >(this, "attributes");
}

Glib::PropertyProxy_ReadOnly< Pango::AttrList > Text::property_attributes() const
{
  return Glib::PropertyProxy_ReadOnly< Pango::AttrList >(this, "attributes");
}

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

Glib::PropertyProxy< Pango::TabArray > Text::property_tabs() 
{
  return Glib::PropertyProxy< Pango::TabArray >(this, "tabs");
}

Glib::PropertyProxy_ReadOnly< Pango::TabArray > Text::property_tabs() const
{
  return Glib::PropertyProxy_ReadOnly< Pango::TabArray >(this, "tabs");
}

Glib::PropertyProxy< bool > Text::property_enable_emoji_completion() 
{
  return Glib::PropertyProxy< bool >(this, "enable-emoji-completion");
}

Glib::PropertyProxy_ReadOnly< bool > Text::property_enable_emoji_completion() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "enable-emoji-completion");
}

Glib::PropertyProxy< bool > Text::property_propagate_text_width() 
{
  return Glib::PropertyProxy< bool >(this, "propagate-text-width");
}

Glib::PropertyProxy_ReadOnly< bool > Text::property_propagate_text_width() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "propagate-text-width");
}

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

Glib::PropertyProxy< Glib::RefPtr<Gio::MenuModel> > Text::property_extra_menu() 
{
  return Glib::PropertyProxy< Glib::RefPtr<Gio::MenuModel> >(this, "extra-menu");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gio::MenuModel> > Text::property_extra_menu() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gio::MenuModel> >(this, "extra-menu");
}


} // namespace Gtk


