/* Copyright (C) 1998-2002 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 . */ #include namespace Gtk { void Entry::set_icon_from_pixbuf(const Glib::RefPtr& pixbuf, EntryIconPosition icon_pos) { gtk_entry_set_icon_from_pixbuf(gobj(), ((GtkEntryIconPosition)(icon_pos)), Glib::unwrap(pixbuf)); } void Entry::set_icon_from_icon_name(const Glib::ustring& icon_name, EntryIconPosition icon_pos) { gtk_entry_set_icon_from_icon_name(gobj(), ((GtkEntryIconPosition)(icon_pos)), icon_name.c_str()); } void Entry::set_icon_from_gicon(const Glib::RefPtr& icon, EntryIconPosition icon_pos) { gtk_entry_set_icon_from_gicon(gobj(), ((GtkEntryIconPosition)(icon_pos)), const_cast(Glib::unwrap(icon))); } void Entry::unset_icon(EntryIconPosition icon_pos) { //We could use any one of these set_icon_from_* functions: gtk_entry_set_icon_from_pixbuf(gobj(), ((GtkEntryIconPosition)(icon_pos)), nullptr); } void Entry::set_icon_activatable(bool activatable, EntryIconPosition icon_pos) { gtk_entry_set_icon_activatable(gobj(), ((GtkEntryIconPosition)(icon_pos)), static_cast(activatable)); } void Entry::set_icon_tooltip_text(const Glib::ustring& tooltip, EntryIconPosition icon_pos) { gtk_entry_set_icon_tooltip_text(gobj(), ((GtkEntryIconPosition)(icon_pos)), tooltip.c_str()); } void Entry::set_icon_tooltip_markup(const Glib::ustring& tooltip, EntryIconPosition icon_pos) { gtk_entry_set_icon_tooltip_markup(gobj(), ((GtkEntryIconPosition)(icon_pos)), tooltip.c_str()); } void Entry::set_icon_drag_source(const Glib::RefPtr& target_list, Gdk::DragAction actions, EntryIconPosition icon_pos) { gtk_entry_set_icon_drag_source(gobj(), ((GtkEntryIconPosition)(icon_pos)), const_cast(Glib::unwrap(target_list)), ((GdkDragAction)(actions))); } Gdk::Rectangle Entry::get_text_area() const { Gdk::Rectangle result; gtk_entry_get_text_area(const_cast(gobj()), result.gobj()); return result; } Gdk::Rectangle Entry::get_icon_area(EntryIconPosition icon_pos) const { Gdk::Rectangle result; gtk_entry_get_icon_area(const_cast(gobj()), (GtkEntryIconPosition)icon_pos, result.gobj()); return result; } } //namespace Gtk