/src/wrappers/gtk/library/gtk_arrow.e

http://github.com/tybor/Liberty · Specman e · 103 lines · 51 code · 14 blank · 38 comment · 2 complexity · 94a999c33cb5b587468da225b20244f9 MD5 · raw file

  1. indexing
  2. description: "GtkArrow: Displays an arrow."
  3. copyright: "[
  4. Copyright (C) 2007 Paolo Redaelli, GTK+ team
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public License
  7. as published by the Free Software Foundation; either version 2.1 of
  8. the License, or (at your option) any later version.
  9. This library is distributed in the hopeOA that it will be useful, but
  10. WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  16. 02110-1301 USA
  17. ]"
  18. wrapped_version: "2.10.6"
  19. class GTK_ARROW
  20. -- GtkArrow should be used to draw simple arrows that need to point
  21. -- in one of the four cardinal directions (up, down, left, or
  22. -- right). The style of the arrow can be one of shadow in, shadow
  23. -- out, etched in, or etched out. Note that these directions and
  24. -- style types may be ammended in versions of Gtk to come.
  25. -- GtkArrow will fill any space alloted to it, but since it is
  26. -- inherited from GtkMisc, it can be padded and/or aligned, to fill
  27. -- exactly the space the programmer desires.
  28. -- Arrows are created with a call to `make'. The direction or style
  29. -- of an arrow can be changed after creation by using `set'.
  30. inherit GTK_MISC
  31. -- GtkArrow implements AtkImplementorIface.
  32. creation make, from_external_pointer
  33. feature {} -- Creation
  34. make (a_type, a_shadow: INTEGER) is
  35. -- Creates a new arrow widget.
  36. require
  37. valid_type: is_valid_gtk_arrow_type (a_type)
  38. valid_shadow: is_valid_gtk_shadow_type (a_shadow)
  39. do
  40. from_external_pointer(gtk_arrow_new(a_type, a_shadow))
  41. end
  42. feature
  43. set(a_type, a_shadow: INTEGER) is
  44. -- Sets the direction and style of the GtkArrow.
  45. require
  46. valid_type: is_valid_gtk_arrow_type (a_type)
  47. valid_shadow: is_valid_gtk_shadow_type (a_shadow)
  48. do
  49. gtk_arrow_set(handle,a_type,a_shadow)
  50. end
  51. feature -- TODO: Property Details
  52. --
  53. -- The "arrow-type" property
  54. --
  55. -- "arrow-type" GtkArrowType : Read / Write
  56. --
  57. -- The direction the arrow should point.
  58. --
  59. -- Default value: GTK_ARROW_RIGHT
  60. --
  61. -- --------------------------------------------------------------------------
  62. --
  63. -- The "shadow-type" property
  64. --
  65. -- "shadow-type" GtkShadowType : Read / Write
  66. --
  67. -- Appearance of the shadow surrounding the arrow.
  68. --
  69. -- Default value: GTK_SHADOW_OUT
  70. --
  71. --See Also
  72. --
  73. -- gtk_paint_arrow() the function used internally to paint the arrow.
  74. feature {} -- External calls
  75. gtk_arrow_new (an_arrow_type, a_shadow_type: INTEGER): POINTER is
  76. -- GtkWidget* gtk_arrow_new (GtkArrowType arrow_type,
  77. -- GtkShadowType shadow_type);
  78. external "C use <gtk/gtk.h>"
  79. end
  80. gtk_arrow_set (an_arrow: POINTER; an_arrow_type, a_shadow_type: INTEGER) is
  81. -- void gtk_arrow_set (GtkArrow *arrow, GtkArrowType arrow_type, GtkShadowType shadow_type);
  82. external "C use <gtk/gtk.h>"
  83. end
  84. feature -- size
  85. struct_size: INTEGER is
  86. external "C inline use <gtk/gtk.h>"
  87. alias "sizeof(GtkArrow)"
  88. end
  89. end -- class GTK_ARROW