PageRenderTime 20ms CodeModel.GetById 13ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

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