    indexing
    	description: "Defines the attributes of a font."
    	legal: "See notice at end of class."
    	status: "See notice at end of class."
    	date: "$Date: 2006-07-12 18:01:36 -0700 (Wed, 12 Jul 2006) $"
    	revision: "$Revision: 61269 $"

    class interface
    	WEL_LOG_FONT

    create
    	make (a_height: INTEGER_32; a_face_name: STRING_GENERAL)
    			-- Make a font with `a_height' as height and
    			-- `a_face_name' as face_name.
    		require
    			a_face_name_not_void: a_face_name /= Void
    			valid_count: a_face_name.count <= max_face_name_length
    		ensure
    			height_set: height = a_height
    			width_set: width = 0
    			escapement_set: escapement = 0
    			weight_set: weight = 0
    			not_italic: not italic
    			not_underlined: not underlined
    			not_strike_out: not strike_out
    			has_default_character_set: has_default_character_set
    			has_default_clipping_precision: has_default_clipping_precision
    			has_default_quality: has_default_quality
    			has_default_pitch: has_default_pitch
    			is_dont_care_family: is_dont_care_family
    			face_name_set: face_name.is_equal (a_face_name)

    	make_with_pointer (a_pointer: POINTER)
    			-- Copy structure pointed by `a_pointer' in
    			-- item.

    	make_by_font (font: WEL_FONT)
    			-- Make a log font using the information of `font'.
    		require
    			font_not_void: font /= Void
    			font_exists: font.exists

    feature -- Access

    	char_set: INTEGER_32
    			-- Character set of current font

    	clip_precision: INTEGER_32
    			-- Clipping precision.
    			-- Define how to clip characters that are
    			-- partially outside clipping region.

    	escapement: INTEGER_32
    			-- Escapement of current font.
    			-- The angle, in tenths of degrees, of each line of
    			-- text written in the font (relative to the
    			-- bottom of the page).

    	face_name: STRING_32
    			-- Face name of current font
    		ensure
    			result_exists: Result /= Void

    	family: INTEGER_32
    			-- Family of current font

    	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)

    	height: INTEGER_32
    			-- Height of current font.
    			-- Specifies the height, in logical units, of the
    			-- font. The font height can be specified in one of
    			-- three ways. If height is greater than zero, it
    			-- is transformed into device units and matched
    			-- against the cell height of the available fonts. If
    			-- it is zero, a reasonable default size is used. If
    			-- it is less than zero, it is transformed into
    			-- device units and the absolute value is matched
    			-- against the character height of the available
    			-- fonts.

    	height_in_points: INTEGER_32
    			-- Size of font in points (1 point = 1/72 of an inch)

    	italic: BOOLEAN
    			-- Is current font italic?

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

    	orientation: INTEGER_32
    			-- Orientation of current font.
    			-- The angle, in tenths of degrees, of each
    			-- character's base line (relative to the bottom
    			-- of the page).

    	out_precision: INTEGER_32
    			-- Output precision of current font.
    			-- The output precision defines how closely the output
    			-- must match the requested font's height, width,
    			-- character orientation, escapement, and pitch.

    	pitch: INTEGER_32
    			-- Pitch of current font

    	pitch_and_family: INTEGER_32
    			-- Pitch and family of current font

    	quality: INTEGER_32
    			-- Quality of current font.
    			-- Specifies the output quality. The output quality
    			-- defines how carefully the graphics device interface
    			-- (GDI) must attempt to match the logical-font
    			-- attributes to those of an actual physical font.

    	strike_out: BOOLEAN
    			-- Is current font striked out?

    	underlined: BOOLEAN
    			-- Is current font underlined?

    	weight: INTEGER_32
    			-- Weight of current font.
    			-- In the range 0 through 1000, for example,
    			-- 400 is normal and 700 is bold).

    	width: INTEGER_32
    			-- Width of current font.
    			-- Specifies the average width, in logical units, of
    			-- characters in the font. If width is zero, the
    			-- aspect ratio of the device is matched against the
    			-- digitization aspect ratio of the available fonts to
    			-- find the closest match, determined by the absolute
    			-- value of the difference.

    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)

    	has_ansi_character_set: BOOLEAN
    			-- Has current font the ansi character set?

    	has_character_clipping_precision: BOOLEAN
    			-- Has current font the character clipping precision?

    	has_character_output_precision: BOOLEAN
    			-- Has current font the character output precision?

    	has_default_character_set: BOOLEAN
    			-- Has current font the default character set?

    	has_default_clipping_precision: BOOLEAN
    			-- Has current font the default clipping precision?

    	has_default_output_precision: BOOLEAN
    			-- Has current font the default output precision?

    	has_default_pitch: BOOLEAN
    			-- Has current font the default pitch?

    	has_default_quality: BOOLEAN
    			-- Has current font the default quality?

    	has_draft_quality: BOOLEAN
    			-- Has current font the draft quality?

    	has_fixed_pitch: BOOLEAN
    			-- Has current font the fixed pitch?

    	has_oem_character_set: BOOLEAN
    			-- Has current font the OEM character set?

    	has_proof_quality: BOOLEAN
    			-- Has current font the proof quality?

    	has_string_output_precision: BOOLEAN
    			-- Has current font the string output precision?

    	has_stroke_clipping_precision: BOOLEAN
    			-- Has current font the stroke clipping precision?

    	has_stroke_output_precision: BOOLEAN
    			-- Has current font the stroke output precision?

    	has_symbol_character_set: BOOLEAN
    			-- Has current font the symbol character set?

    	has_unicode_character_set: BOOLEAN
    			-- Has current font the unicode character set?

    	has_variable_pitch: BOOLEAN
    			-- Has current font the variable pitch?

    	is_decorative_family: BOOLEAN
    			-- Is current font in the decorative family?

    	is_dont_care_family: BOOLEAN
    			-- Is current font in the don t care family?

    	is_modern_family: BOOLEAN
    			-- Is current font in the modern family?

    	is_roman_family: BOOLEAN
    			-- Is current font in the roman family?

    	is_script_family: BOOLEAN
    			-- Is current font in the script family?

    	is_swiss_family: BOOLEAN
    			-- Is current font in the swiss family?

    	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

    	max_face_name_length: INTEGER_32
    			-- Maximum face name length

    	set_ansi_character_set
    			-- Set char_set to ansi.
    		ensure
    			has_ansi_character_set: has_ansi_character_set

    	set_char_set (a_char_set: INTEGER_32)
    			-- Set char_set to `a_char_set'.
    		ensure
    			char_set_set: char_set = a_char_set

    	set_character_clipping_precision
    			-- Set clip_precision to character clipping precision.
    		ensure
    			has_character_clipping_precision: has_character_clipping_precision

    	set_character_output_precision
    			-- Set out_precision to character precision.
    		ensure
    			has_character_output_precision: has_character_output_precision

    	set_clip_precision (a_precision: INTEGER_32)
    			-- Set clip_precision to `a_precision'.
    		ensure
    			clip_precision_set: clip_precision = a_precision

    	set_decorative_family
    			-- Set family to decorative family.
    		ensure
    			is_decorative_family: is_decorative_family

    	set_default_character_set
    			-- Set char_set to the default value.
    		ensure
    			has_default_character_set: has_default_character_set

    	set_default_clipping_precision
    			-- Set clip_precision to the default value.
    		ensure
    			has_default_clipping_precision: has_default_clipping_precision

    	set_default_output_precision
    			-- Set out_precision to default output precision.
    		ensure
    			has_default_output_precision: has_default_output_precision

    	set_default_pitch
    			-- Set pitch to the default value.
    		ensure
    			has_default_pitch: has_default_pitch

    	set_default_quality
    			-- Set quality to the default value.
    		ensure
    			has_default_quality: has_default_quality

    	set_dont_care_family
    			-- Set family to dont care family.
    		ensure
    			is_dont_care_family: is_dont_care_family

    	set_draft_quality
    			-- Set quality to the draft quality.
    		ensure
    			has_draft_quality: has_draft_quality

    	set_escapement (a_escapement: INTEGER_32)
    			-- Set escapement to `a_escapement'.
    		ensure
    			escapement_set: escapement = a_escapement

    	set_face_name (a_face_name: STRING_GENERAL)
    			-- Set face_name to `a_face_name'.
    		require
    			a_face_name_not_void: a_face_name /= Void
    			valid_count: a_face_name.count <= max_face_name_length
    		ensure
    			face_name_set: face_name.is_equal (a_face_name)

    	set_family (a_family: INTEGER_32)
    			-- Set family to `a_family'.
    		ensure
    			family_set: family = a_family

    	set_fixed_pitch
    			-- Set pitch to fixed pitch.
    		ensure
    			has_fixed_pitch: has_fixed_pitch

    	set_height (a_height: INTEGER_32)
    			-- Set height to `a_height'.
    		ensure
    			height_set: height = a_height

    	set_italic
    			-- Set current font italic.
    		ensure
    			italic: italic

    	set_modern_family
    			-- Set family to modern family.
    		ensure
    			is_modern_family: is_modern_family

    	set_not_italic
    			-- Set current font not italic.
    		ensure
    			not_italic: not italic

    	set_not_strike_out
    			-- Set current font not striked out.
    		ensure
    			not_strike_out: not strike_out

    	set_not_underlined
    			-- Set current font not underlined.
    		ensure
    			not_underlined: not underlined

    	set_oem_character_set
    			-- Set char_set to OEM.
    		ensure
    			has_oem_character_set: has_oem_character_set

    	set_orientation (a_orientation: INTEGER_32)
    			-- Set orientation to `a_orientation'.
    		ensure
    			orientation_set: orientation = a_orientation

    	set_out_precision (a_precision: INTEGER_32)
    			-- Set out_precision to `a_out_precision'.
    		ensure
    			out_precision_set: out_precision = a_precision

    	set_pitch (a_pitch: INTEGER_32)
    			-- Set pitch to `a_pitch'.
    		ensure
    			pitch_set: pitch = a_pitch

    	set_pitch_and_family (a_pitch_and_family: INTEGER_32)
    			-- Set pitch_and_family with `a_pitch_and_family'.
    		ensure
    			pitch_and_family_set: pitch_and_family = a_pitch_and_family

    	set_proof_quality
    			-- Set quality to the proof quality.
    		ensure
    			has_proof_quality: has_proof_quality

    	set_quality (a_quality: INTEGER_32)
    			-- Set quality to `a_quality'.
    		ensure
    			quality_set: quality = a_quality

    	set_roman_family
    			-- Set family to roman family.
    		ensure
    			is_roman_family: is_roman_family

    	set_script_family
    			-- Set family to script family.
    		ensure
    			is_script_family: is_script_family

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

    	set_strike_out
    			-- Set current font striked out.
    		ensure
    			strike_out: strike_out

    	set_string_output_precision
    			-- Set out_precision to string output precision.
    		ensure
    			has_string_output_precision: has_string_output_precision

    	set_stroke_clipping_precision
    			-- Set clip_precision to the storke clipping precision.
    		ensure
    			has_stroke_clipping_precision: has_stroke_clipping_precision

    	set_stroke_output_precision
    			-- Set out_precision to stroke output precision.
    		ensure
    			has_stroke_output_precision: has_stroke_output_precision

    	set_swiss_family
    			-- Set family to swiss family.
    		ensure
    			is_swiss_family: is_swiss_family

    	set_symbol_character_set
    			-- Set char_set to symbol.
    		ensure
    			has_symbol_character_set: has_symbol_character_set

    	set_underlined
    			-- Set current font underlined.
    		ensure
    			underlined: underlined

    	set_unicode_character_set
    			-- Set char_set to unicode.
    		ensure
    			has_unicode_character_set: has_unicode_character_set

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

    	set_variable_pitch
    			-- Set pitch to variable pitch.
    		ensure
    			has_variable_pitch: has_variable_pitch

    	set_weight (a_weight: INTEGER_32)
    			-- Set weight to `a_weight'.
    		ensure
    			weight_set: weight = a_weight

    	set_width (a_width: INTEGER_32)
    			-- Set width to `a_width'.
    		ensure
    			width_set: width = a_width

    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 -- 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 -- 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)

    feature -- Re-initialisation

    	update_by_font (font: WEL_FONT)
    			-- Update object attributes using the information of `font'.
    		require
    			font_not_void: font /= Void
    			font_exists: font.exists

    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_LOG_FONT