/src/wrappers/gtk/library/gtk_text_child_anchor.e

http://github.com/tybor/Liberty · Specman e · 86 lines · 54 code · 16 blank · 16 comment · 2 complexity · 7f614993d230dde69cd80d9f77de2447 MD5 · raw file

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