indexing
	description: "Keyboard accelerators that generates a WM_COMMAND message."
	status: "See notice at end of class."
	date: "$Date$"
	revision: "$Revision$"

class interface
	WEL_ACCELERATORS

create 

	make_by_id (id: INTEGER)
			-- Load the resource by an id
			-- (from WEL_RESOURCE)
		require -- from WEL_RESOURCE
			valid_id: id > 0
		ensure -- from WEL_RESOURCE
			not_shared: not shared

	make_by_name (name: STRING)
			-- Load the resource by a name
			-- (from WEL_RESOURCE)
		require -- from WEL_RESOURCE
			name_not_void: name /= void
			name_not_empty: not name.is_empty
		ensure -- from WEL_RESOURCE
			not_shared: not shared

	make_with_array (an_array: WEL_ARRAY [WEL_ACCELERATOR])
			-- Initialize with accelerators in an_array.
		require
			an_array_not_void: an_array /= void
			an_array_exists: an_array.exists

feature -- Access

	item: POINTER
			-- Generic Windows handle or structure pointer.
			-- Can be a HWND, HICON, RECT *, WNDCLASS *, etc...
			-- (from WEL_ANY)
	
feature -- Status report

	exists: BOOLEAN
			-- Does the item exist?
			-- (from WEL_ANY)
		ensure -- from WEL_ANY
			Result = (item /= default_pointer)

	shared: BOOLEAN
			-- Is item shared by another object?
			-- If False (by default), item will
			-- be destroyed by destroy_item.
			-- If True, item will not be destroyed.
			-- (from WEL_ANY)
	
feature -- Status setting

	set_shared
			-- Set shared to True.
			-- (from WEL_ANY)
		ensure -- from WEL_ANY
			shared: shared

	set_unshared
			-- Set shared to False.
			-- (from WEL_ANY)
		ensure -- from WEL_ANY
			unshared: not shared
	
feature -- Element change

	set_item (an_item: POINTER)
			-- Set item with an_item
			-- (from WEL_ANY)
		ensure -- from WEL_ANY
			item_set: item = an_item
	
feature -- Removal

	dispose
			-- Destroy the inner structure of Current.
			--
			-- This function should be called by the GC when the
			-- object is collected or by the user if Current is
			-- no more usefull.
			-- (from WEL_ANY)
	
feature -- Conversion

	to_integer: INTEGER
			-- Converts item to an integer.
			-- (from WEL_ANY)
		ensure -- from WEL_ANY
			Result = cwel_pointer_to_integer (item)
	
invariant

		-- from ANY
	reflexive_equality: standard_is_equal (Current)
	reflexive_conformance: conforms_to (Current)

end -- class WEL_ACCELERATORS