indexing
	description: "Contains information about the class, title, owner, location, and size of a MDI child window."
	status: "See notice at end of class."
	date: "$Date$"
	revision: "$Revision$"

class interface
	WEL_MDI_CREATE_STRUCT

create 

	make (a_class_name: STRING; a_title: STRING)
			-- Make a MDI create structure with a_class_name and
			-- a_title.
		ensure
			class_name_set: class_name.is_equal (a_class_name)
			title_set: title.is_equal (a_title)
			owner_set: owner.item = main_args.current_instance.item
			style_set: style = 0
			lparam_set: lparam = default_pointer

feature -- Access

	class_name: STRING
			-- Class name of the MDI child window
		ensure
			result_not_void: Result /= void

	height: INTEGER
			-- Height of the MDI child window

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

	lparam: POINTER
			-- Lparam of the MDI child window

	owner: WEL_INSTANCE
			-- Owner of the MDI child window
		ensure
			result_not_void: Result /= void

	style: INTEGER
			-- Style of the MDI child window

	title: STRING
			-- Title of the MDI child window
		ensure
			result_not_void: Result /= void

	width: INTEGER
			-- Width of the MDI child window

	x: INTEGER
			-- x position of the MDI child window

	y: INTEGER
			-- y position of the MDI child window
	
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_class_name (a_class_name: STRING)
			-- Set class_name with a_class_name
		require
			a_class_name_valid: a_class_name /= void
		ensure
			class_name_set: class_name.is_equal (a_class_name)

	set_height (a_height: INTEGER)
			-- Set height with a_height

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

	set_lparam (a_lparam: POINTER)
			-- Set lparam with a_lparam
		ensure
			lparam_set: lparam = a_lparam

	set_owner (an_owner: WEL_INSTANCE)
			-- Set owner with an_owner
		require
			an_owner_not_void: an_owner /= void
		ensure
			owner_set: owner.item = an_owner.item

	set_style (a_style: INTEGER)
			-- Set style with a_style
		ensure
			style_set: style = a_style

	set_title (a_title: STRING)
			-- Set title with a_title
		require
			a_title_valid: a_title /= void
		ensure
			title_set: title.is_equal (a_title)

	set_width (a_width: INTEGER)
			-- Set width with a_width

	set_x (a_x: INTEGER)
			-- Set x with a_x

	set_y (a_y: INTEGER)
			-- Set y with a_y
	
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_MDI_CREATE_STRUCT