indexing
	description: "Contains information about the placement of a window on the screen."
	status: "See notice at end of class."
	date: "$Date$"
	revision: "$Revision$"

class interface
	WEL_WINDOW_PLACEMENT

create 

	make (a_window: WEL_WINDOW)
			-- Make a window placement for a_window.
		require
			a_window_not_void: a_window /= void
			a_window_exists: a_window.exists

feature -- Access

	flags: INTEGER
			-- Flags that control the position of the
			-- minimized window and the method by which
			-- the window is restored.
			-- See class WEL_WPF_CONSTANTS for possible values.

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

	maximum_position: WEL_POINT
			-- Coordinates of the window's upper left
			-- corner when the window is maximized.
		ensure
			result_not_void: Result /= void

	minimum_position: WEL_POINT
			-- Coordinates of the window's upper left
			-- corner when the window is minimized.
		ensure
			result_not_void: Result /= void

	normal_position: WEL_RECT
			-- Window's coordinates when the
			-- windows is in the restored position
		ensure
			result_not_void: Result /= void

	show_command: INTEGER
			-- Show state of the window.
			-- See class WEL_SW_CONSTANTS for possible values
	
feature -- Measurement

	structure_size: INTEGER
			-- Size to allocate (in bytes)
		ensure -- from WEL_STRUCTURE
			positive_result: Result > 0
	
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_flags (a_flags: INTEGER)
			-- Set flags with a_flags
		ensure
			flags_set: flags = a_flags

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

	set_maximum_position (a_point: WEL_POINT)
			-- Set maximum_position with a_point
		require
			a_point_not_void: a_point /= void

	set_minimum_position (a_point: WEL_POINT)
			-- Set minimum_position with a_point
		require
			a_point_not_void: a_point /= void

	set_normal_position (a_rect: WEL_RECT)
			-- Set normal_position with a_rect
		require
			a_rect_not_void: a_rect /= void

	set_show_command (a_show_command: INTEGER)
			-- Set show_command with a_show_command
		ensure
			show_command_set: show_command = a_show_command
	
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)
	
feature -- Basic operations

	initialize
			-- Fill Current with zeros.
			-- (from WEL_STRUCTURE)
		require -- from WEL_STRUCTURE
			exists: exists

	initialize_with_character (a_character: CHARACTER)
			-- Fill current with a_character.
			-- (from WEL_STRUCTURE)
		require -- from WEL_STRUCTURE
			exists: exists

	memory_copy (source_pointer: POINTER; length: INTEGER)
			-- Copy length bytes from source_pointer to item.
			-- (from WEL_STRUCTURE)
		require -- from WEL_STRUCTURE
			length_small_enough: length <= structure_size
			length_large_enough: length > 0
			exists: exists
	
invariant

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

end -- class WEL_WINDOW_PLACEMENT