indexing
	description: "Contains information about a rebar control band."
	legal: "See notice at end of class."
	status: "See notice at end of class."
	date: "$Date: 2006-03-22 23:29:03 -0800 (Wed, 22 Mar 2006) $"
	revision: "$Revision: 57641 $"

class interface
	WEL_REBARBANDINFO

create 
	make
			-- Create a band with no informations.

	make_with_id (an_id: INTEGER_32)
			-- Create a band with `an_id' as id.

	make_by_pointer (a_pointer: POINTER)
			-- Set item with `a_pointer'.
			-- Since item is shared, it does not need
			-- to be freed.
			-- Caution: `a_pointer' must be a pointer
			-- coming from Windows.
			-- (from WEL_ANY)
		ensure -- from WEL_ANY
			item_set: item = a_pointer
			shared: shared

feature -- Access

	background_color: WEL_COLOR_REF
			-- Background color used for the background of the
			-- control
		require
			exists: exists
		ensure
			color_not_void: Result /= Void

	child: WEL_WINDOW
			-- Child currently in the rebar.
		require
			exists: exists

	child_minimum_height: INTEGER_32
			-- Minimum width required by the child.
		require
			exists: exists
		ensure
			positive_result: Result >= 0

	child_minimum_width: INTEGER_32
			-- Minimum width required by the child.
		require
			exists: exists
		ensure
			positive_result: Result >= 0

	foreground_color: WEL_COLOR_REF
			-- foreground color used for the text of the
			-- control
		require
			exists: exists
		ensure
			color_not_void: Result /= Void

	generating_type: STRING_8
			-- Name of current object's generating type
			-- (type of which it is a direct instance)
			-- (from ANY)

	generator: STRING_8
			-- Name of current object's generating class
			-- (base class of the type of which it is a direct instance)
			-- (from ANY)

	id: INTEGER_32
			-- id of the band.
		require
			exists: exists

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

	length: INTEGER_32
			-- Current length of the band.
		require
			exists: exists
		ensure
			positive_result: Result >= 0

	mask: INTEGER_32
			-- Array of flags that indicate which of the other
			-- structure members contain valid data or which are
			-- to be filled in. This member can be a combination
			-- of the Rbbim_* values.
			-- See class WEL_RBBIM_CONSTANTS.
		require
			exists: exists

	style: INTEGER_32
			-- Array of flags that specify the band style.
			-- This value can be a combinaison of RBBS_* constants.
			-- See class WEL_RBBS_CONSTANTS.
		require
			exists: exists

	text: STRING_32
			-- Item text
		require
			exists: exists
	
feature -- Measurement

	structure_size: INTEGER_32
			-- Size to allocate (in bytes)
		ensure -- from WEL_STRUCTURE
			positive_result: Result > 0
	
feature -- Comparison

	frozen deep_equal (some: ANY; other: like arg #1): BOOLEAN
			-- Are `some' and `other' either both void
			-- or attached to isomorphic object structures?
			-- (from ANY)
		ensure -- from ANY
			shallow_implies_deep: standard_equal (some, other) implies Result
			both_or_none_void: (some = Void) implies (Result = (other = Void))
			same_type: (Result and (some /= Void)) implies some.same_type (other)
			symmetric: Result implies deep_equal (other, some)

	frozen equal (some: ANY; other: like arg #1): BOOLEAN
			-- Are `some' and `other' either both void or attached
			-- to objects considered equal?
			-- (from ANY)
		ensure -- from ANY
			definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.is_equal (other))

	frozen standard_equal (some: ANY; other: like arg #1): BOOLEAN
			-- Are `some' and `other' either both void or attached to
			-- field-by-field identical objects of the same type?
			-- Always uses default object comparison criterion.
			-- (from ANY)
		ensure -- from ANY
			definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.standard_is_equal (other))

	frozen standard_is_equal (other: like Current): BOOLEAN
			-- Is `other' attached to an object of the same type
			-- as current object, and field-by-field identical to it?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		ensure -- from ANY
			same_type: Result implies same_type (other)
			symmetric: Result implies other.standard_is_equal (Current)
	
feature -- Status report

	conforms_to (other: ANY): BOOLEAN
			-- Does type of current object conform to type
			-- of `other' (as per Eiffel: The Language, chapter 13)?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void

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

	same_type (other: ANY): BOOLEAN
			-- Is type of current object identical to type of `other'?
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		ensure -- from ANY
			definition: Result = (conforms_to (other) and other.conforms_to (Current))

	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_background_bitmap (bmp: WEL_BITMAP)
			-- Set `background_bitmap' with `bmp'.
		require
			exists: exists
			bitmap_not_void: bmp /= Void

	set_background_color (color: WEL_COLOR_REF)
			-- Set background_color as `color'.
		require
			exists: exists
			color_not_void: color /= Void
		ensure
			color_set: background_color.is_equal (color)

	set_child (window: WEL_WINDOW)
			-- Set child as `window'.
			-- Do not use this features for controls as toolbars
			-- that reposition themself automaticaly at a specific
			-- place. Use `set_reposition_child'.
		require
			exists: exists
			window_not_void: window /= Void
			window_is_inside: window.is_inside
		ensure
			window_set: child.is_equal (window)

	set_child_minimum_height (value: INTEGER_32)
			-- Set child_minimum_height as `value'.
		require
			exists: exists
			valid_value: value >= 0
		ensure
			value_set: child_minimum_height = value

	set_child_minimum_width (value: INTEGER_32)
			-- Set child_minimum_width as `value'.
		require
			exists: exists
			valid_value: value >= 0
		ensure
			value_set: child_minimum_width = value

	set_foreground_color (color: WEL_COLOR_REF)
			-- Set foreground_color as `color'.
		require
			exists: exists
			color_not_void: color /= Void
		ensure
			color_set: foreground_color.is_equal (color)

	set_id (value: INTEGER_32)
			-- Set id as `value'.
		require
			exists: exists
		ensure
			id_set: id = value

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

	set_length (value: INTEGER_32)
			-- Set length as `value'.
		require
			exists: exists
			valid_value: value >= 0
		ensure
			length_set: length = value

	set_style (value: INTEGER_32)
			-- Set `cbSize' (size of the structure) as `value'.
		require
			exists: exists
		ensure
			style_set: style = value

	set_text (txt: STRING_GENERAL)
			-- Set text as `txt'.
		require
			exists: exists
			a_text_not_void: txt /= Void
		ensure
			text_set: text.is_equal (txt)

	set_unpositionable_child (window: WEL_WINDOW)
			-- Set child as `window'.
			-- Use this features for controls as toolbars
			-- that reposition themself automaticaly at a specific
			-- place. Use `set_reposition_child'.
			-- Do not use for usual controls.
		require
			exists: exists
			window_not_void: window /= Void
			window_is_inside: window.is_inside
		ensure
			window_set: child.is_equal (window.parent)
	
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 -- Duplication

	frozen deep_copy (other: like Current)
			-- Effect equivalent to that of:
			--		copy (`other' . deep_twin)
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
		ensure -- from ANY
			deep_equal: deep_equal (Current, other)

	frozen deep_twin: like Current
			-- New object structure recursively duplicated from Current.
			-- (from ANY)
		ensure -- from ANY
			deep_equal: deep_equal (Current, Result)

	frozen standard_copy (other: like Current)
			-- Copy every field of `other' onto corresponding field
			-- of current object.
			-- (from ANY)
		require -- from ANY
			other_not_void: other /= Void
			type_identity: same_type (other)
		ensure -- from ANY
			is_standard_equal: standard_is_equal (other)

	frozen standard_twin: like Current
			-- New object field-by-field identical to `other'.
			-- Always uses default copying semantics.
			-- (from ANY)
		ensure -- from ANY
			standard_twin_not_void: Result /= Void
			equal: standard_equal (Result, Current)

	frozen twin: like Current
			-- New object equal to `Current'
			-- twin calls copy; to change copying/twining semantics, redefine copy.
			-- (from ANY)
		ensure -- from ANY
			twin_not_void: Result /= Void
			is_equal: Result.is_equal (Current)
	
feature -- Basic operations

	copy (other: like Current)
			-- Update current object using fields of object attached
			-- to `other', so as to yield equal objects.
			-- (from WEL_STRUCTURE)
		require -- from ANY
			other_not_void: other /= Void
			type_identity: same_type (other)
		ensure -- from ANY
			is_equal: is_equal (other)

	frozen default: like Current
			-- Default value of object's type
			-- (from ANY)

	frozen default_pointer: POINTER
			-- Default value of type `POINTER'
			-- (Avoid the need to write `p'.default for
			-- some `p' of type `POINTER'.)
			-- (from ANY)

	default_rescue
			-- Process exception for routines with no Rescue clause.
			-- (Default: do nothing.)
			-- (from ANY)

	frozen do_nothing
			-- Execute a null action.
			-- (from ANY)

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

	initialize_with_character (a_character: CHARACTER_8)
			-- Fill current with `a_character'.
			-- (from WEL_STRUCTURE)
		require -- from WEL_STRUCTURE
			exists: exists

	is_equal (other: like Current): BOOLEAN
			-- Is `other' attached to an object considered
			-- equal to current object?
			-- (from WEL_STRUCTURE)
		require -- from ANY
			other_not_void: other /= Void
		ensure -- from ANY
			symmetric: Result implies other.is_equal (Current)
			consistent: standard_is_equal (other) implies Result

	memory_copy (source_pointer: POINTER; length: INTEGER_32)
			-- 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
	
feature -- Basic operation

	clear_mask
			-- Clear the current mask.
			-- Call it before to call a set_? feature when you
			-- want to change only one parameter.
		require
			exists: exists
	
feature -- Output

	io: STD_FILES
			-- Handle to standard file setup
			-- (from ANY)

	out: STRING_8
			-- New string containing terse printable representation
			-- of current object
			-- Was declared in ANY as synonym of tagged_out.
			-- (from ANY)

	print (some: ANY)
			-- Write terse external representation of `some'
			-- on standard output.
			-- (from ANY)

	frozen tagged_out: STRING_8
			-- New string containing terse printable representation
			-- of current object
			-- Was declared in ANY as synonym of out.
			-- (from ANY)
	
feature -- Platform

	operating_environment: OPERATING_ENVIRONMENT
			-- Objects available from the operating system
			-- (from ANY)
	
invariant
		-- from ANY
	reflexive_equality: standard_is_equal (Current)
	reflexive_conformance: conforms_to (Current)

indexing
	copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
	license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
	source: "[
		Eiffel Software
		356 Storke Road, Goleta, CA 93117 USA
		Telephone 805-685-1006, Fax 805-685-6869
		Website http://www.eiffel.com
		Customer support http://support.eiffel.com
	]"

end -- class WEL_REBARBANDINFO