/src/wrappers/gtk/library/gtk_text_child_anchor.e
Specman e | 86 lines | 54 code | 16 blank | 16 comment | 2 complexity | 7f614993d230dde69cd80d9f77de2447 MD5 | raw file
1indexing 2 description: "GtkTextChildAnchor: a spot in the buffer where child widgets can be anchored" 3 copyright: 4 "[ 5 Copyright (C) 2006 eiffel-libraries team, GTK+ team 6 7 This library is free software; you can redistribute it and/or 8 modify it under the terms of the GNU Lesser General Public License 9 as published by the Free Software Foundation; either version 2.1 of 10 the License, or (at your option) any later version. 11 12 This library is distributed in the hope that it will be useful, but 13 WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 Lesser General Public License for more details. 16 17 You should have received a copy of the GNU Lesser General Public 18 License along with this library; if not, write to the Free Software 19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 20 02110-1301 USA 21 22 ]" 23 24class GTK_TEXT_CHILD_ANCHOR 25 -- A GtkTextChildAnchor is a spot in the buffer where child widgets 26 -- can be "anchored" (inserted inline, as if they were 27 -- characters). The anchor can have multiple widgets anchored, to 28 -- allow for multiple views. 29 30inherit G_OBJECT 31 32insert GTK 33 34creation make, from_external_pointer 35 36feature {} -- Creation 37 make is 38 -- Creates a new GtkTextChildAnchor. Usually you would then 39 -- insert it into a GTK_TEXT_BUFFER with 40 -- `insert_child_anchor'. To perform the creation and insertion 41 -- in one step, use the convenience function 42 -- `GTK_TEXT_BUFFER.create_child_anchor'. 43 require 44 gtk_initialized: gtk.is_initialized 45 do 46 from_external_pointer (gtk_text_child_anchor_new) 47 end 48 49feature 50 widgets: G_LIST [GTK_WIDGET] is 51 -- a list of all widgets anchored at this child anchor. 52 do 53 create {G_OBJECT_LIST[GTK_WIDGET]} Result.from_external_pointer (gtk_text_child_anchor_get_widgets (handle)) 54 end 55 56 get_deleted: BOOLEAN is 57 -- Has the child anchor been deleted from its buffer? Keep in 58 -- mind that the child anchor will be unreferenced when 59 -- removed from the buffer, so you need to hold your own 60 -- reference (with `ref') if you plan to use this function 61 -- otherwise all deleted child anchors will also be 62 -- finalized. 63 do 64 Result := gtk_text_child_anchor_get_deleted(handle).to_boolean 65 end 66 67feature -- size 68 struct_size: INTEGER is 69 external "C inline use <gtk/gtk.h>" 70 alias "sizeof(GtkTextChildAnchor)" 71 72 end 73feature {} -- External calls 74 75 gtk_text_child_anchor_new: POINTER is --GtkTextChildAnchor* 76 external "C use <gtk/gtk.h>" 77 end 78 79 gtk_text_child_anchor_get_widgets (an_anchor: POINTER): POINTER is --GList* 80 external "C use <gtk/gtk.h>" 81 end 82 83 gtk_text_child_anchor_get_deleted (an_anchor: POINTER): INTEGER is -- gboolean 84 external "C use <gtk/gtk.h>" 85 end 86end