Automatic generation produced by ISE Eiffel

Classes Clusters Cluster hierarchy Chart Relations Flat contracts Go to:
note description: "[ Representation of a typeface. Appearance is specified in terms of font family, height, shape and weight. The local system font closest to the specification will be displayed. A specific font name may optionally be specified. See set_preferred_face" There are two available queries for a font height, height and height_in_points. Changing one, changes the other accordingly. height is given in pixels while height_in_points is in points or 1/72 of an inch. Using height_in_points ensures that on different screen resolutions Current has the same physical size, although the pixel height may differ to achieve this. ]" legal: "See notice at end of class." status: "See notice at end of class." keywords: "character, face, height, family, weight, shape, bold, italic" date: "$Date: 2011-10-13 11:36:42 -0700 (Thu, 13 Oct 2011) $" revision: "$Revision: 87465 $" class interface EV_FONT create default_create -- Standard creation procedure. -- (from EV_ANY) require -- from ANY True ensure then -- from EV_ANY is_coupled: implementation /= Void is_initialized: is_initialized default_create_called: default_create_called is_in_default_state: is_in_default_state make_with_values (a_family, a_weight, a_shape, a_height: INTEGER_32) -- Create with a_family, a_weight, a_shape and a_height. require a_family_valid: valid_family (a_family) a_weight_valid: valid_weight (a_weight) a_shape_valid: valid_shape (a_shape) a_height_bigger_than_zero: a_height > 0 ensure a_family_set: family = a_family a_weight_set: weight = a_weight a_shape_set: shape = a_shape a_height_set: height = a_height feature -- Access char_set: INTEGER_32 -- Charset of the font. -- Only meaningful on windows. require not_destroyed: not is_destroyed ensure bridge_ok: Result = implementation.char_set data: detachable ANY -- Arbitrary user data may be stored here. -- (from EV_ANY) family: INTEGER_32 -- Font category. Can be any of the Family_* constants -- defined in EV_FONT_CONSTANTS. -- Default: Family_sans require not_destroyed: not is_destroyed ensure bridge_ok: Result = implementation.family generating_type: TYPE [detachable EV_FONT] -- Type of current object -- (type of which it is a direct instance) -- (from ANY) ensure -- from ANY generating_type_not_void: Result /= Void generator: STRING_8 -- Name of current object's generating class -- (base class of the type of which it is a direct instance) -- (from ANY) ensure -- from ANY generator_not_void: Result /= Void generator_not_empty: not Result.is_empty height: INTEGER_32 -- Preferred font height in pixels. -- Default: 8 require not_destroyed: not is_destroyed ensure bridge_ok: Result = implementation.height height_in_points: INTEGER_32 -- Preferred font height in points. require not_destroyed: not is_destroyed ensure bridge_ok: Result = implementation.height_in_points line_height: INTEGER_32 -- Preferred text editor line height in pixels for Current. require not_destroyed: not is_destroyed ensure bridge_ok: Result = implementation.line_height preferred_families: EV_ACTIVE_LIST [STRING_32] -- Preferred families. The first one in the list -- will be tried first. If it does not exists on -- the system, the second will be tried, etc. -- -- Overrides family if found on current system. require not_destroyed: not is_destroyed ensure bridge_ok: Result = implementation.preferred_families result_not_void: Result /= Void shape: INTEGER_32 -- Preferred font slant. Can be any of the Shape_* -- constants defined in EV_FONT_CONSTANTS. -- Default: Shape_regular require not_destroyed: not is_destroyed ensure bridge_ok: Result = implementation.shape weight: INTEGER_32 -- Preferred font thickness. Can be any of the Weight_* -- constants defined in EV_FONT_CONSTANTS. -- Default: Weight_regular require not_destroyed: not is_destroyed ensure bridge_ok: Result = implementation.weight feature -- Comparison frozen deep_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void -- or attached to isomorphic object structures? -- (from ANY) ensure -- from ANY instance_free: class shallow_implies_deep: standard_equal (a, b) implies Result both_or_none_void: (a = Void) implies (Result = (b = Void)) same_type: (Result and (a /= Void)) implies (b /= Void and then a.same_type (b)) symmetric: Result implies deep_equal (b, a) frozen equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached -- to objects considered equal? -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.is_equal (b)) frozen is_deep_equal (other: EV_FONT): BOOLEAN -- Are Current and other attached to isomorphic object structures? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY shallow_implies_deep: standard_is_equal (other) implies Result same_type: Result implies same_type (other) symmetric: Result implies other.is_deep_equal (Current) frozen standard_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b 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 instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.standard_is_equal (b)) frozen standard_is_equal (other: EV_FONT): 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 ascent: INTEGER_32 -- Vertical distance from the origin of the drawing -- operation to the top of the drawn character. require not_destroyed: not is_destroyed ensure bridge_ok: Result = implementation.ascent 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 descent: INTEGER_32 -- Vertical distance from the origin of the drawing -- operation to the bottom of the drawn character. require not_destroyed: not is_destroyed ensure bridge_ok: Result = implementation.descent horizontal_resolution: INTEGER_32 -- Horizontal resolution of screen for which the font is designed. -- Measured in dots per inch. If return value is zero, the -- resolution is not known. require not_destroyed: not is_destroyed ensure bridge_ok: Result = implementation.horizontal_resolution is_proportional: BOOLEAN -- Can characters in the font have different widths? require not_destroyed: not is_destroyed ensure bridge_ok: Result = implementation.is_proportional maximum_width: INTEGER_32 -- Width of the biggest character in the font. require not_destroyed: not is_destroyed ensure bridge_ok: Result = implementation.maximum_width minimum_width: INTEGER_32 -- Width of the smallest character in the font. require not_destroyed: not is_destroyed ensure bridge_ok: Result = implementation.minimum_width name: STRING_32 -- Face name chosen by toolkit. require not_destroyed: not is_destroyed ensure bridge_ok: Result.is_equal (implementation.name) 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)) string_size (a_string: READABLE_STRING_GENERAL): TUPLE [width: INTEGER_32; height: INTEGER_32; left_offset: INTEGER_32; right_offset: INTEGER_32] -- [width, height, left_offset, right_offset] in pixels of a_string in the current font, -- taking into account line breaks ('%N'). -- width and height correspond to the rectange used to bound a_string, and -- should be used when placing strings next to each as part of a text. -- On some fonts, characters may extend outside of the bounds given by width and height, -- for example certain italic letters may overhang other letters. Use left_offset and -- right_offset to determine if there is any overhang for a_string. a negative left_offset -- indicates overhang to the left, while a positive right_offset indicates an overhang to the right. -- To determine the complete bounding rectangle for a_string add negative left_offset -- and positive right_offset to width. require not_destroyed: not is_destroyed a_string_not_void: a_string /= Void ensure result_not_void: Result /= Void bridge_ok: Result.width = implementation.string_size (a_string).width and Result.height = implementation.string_size (a_string).height string_width (a_string: READABLE_STRING_GENERAL): INTEGER_32 -- Width in pixels of a_string in the current font. require not_destroyed: not is_destroyed a_string_not_void: a_string /= Void ensure bridge_ok: Result = implementation.string_width (a_string) positive: Result >= 0 vertical_resolution: INTEGER_32 -- Vertical resolution of screen for which the font is designed. -- Measured in dots per inch. If return value is zero, the -- resolution is not known. require not_destroyed: not is_destroyed ensure bridge_ok: Result = implementation.vertical_resolution width: INTEGER_32 -- Character width of current fixed-width font. -- If font is proportional, returns the average width. require not_destroyed: not is_destroyed ensure bridge_ok: Result = implementation.width feature -- Element change set_data (some_data: like data) -- Assign some_data to data. -- (from EV_ANY) require -- from EV_ANY not_destroyed: not is_destroyed ensure -- from EV_ANY data_assigned: data = some_data set_family (a_family: INTEGER_32) -- Assign  a_family to family. require not_destroyed: not is_destroyed a_family_valid: valid_family (a_family) ensure family_assigned: family = a_family set_height (a_height: INTEGER_32) -- Set a_height to height. -- height_in_points changes accordingly based on screen resolution. require not_destroyed: not is_destroyed a_height_bigger_than_zero: a_height > 0 ensure height_assigned: height = a_height set_height_in_points (a_height: INTEGER_32) -- Set height_in_points to a_height. -- height changes accordingly based on screen resolution. require not_destroyed: not is_destroyed a_height_bigger_than_zero: a_height > 0 ensure height_assigned: height_in_points = a_height set_shape (a_shape: INTEGER_32) -- Set a_shape to shape. require not_destroyed: not is_destroyed a_shape_valid: valid_shape (a_shape) ensure shape_assigned: shape = a_shape set_weight (a_weight: INTEGER_32) -- Set a_weight to weight. require not_destroyed: not is_destroyed a_weight_valid: valid_weight (a_weight) ensure weight_assigned: weight = a_weight feature -- Duplication frozen deep_copy (other: EV_FONT) -- 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: EV_FONT -- New object structure recursively duplicated from Current. -- (from ANY) ensure -- from ANY deep_twin_not_void: Result /= Void deep_equal: deep_equal (Current, Result) frozen standard_copy (other: EV_FONT) -- 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: EV_FONT -- 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: EV_FONT -- New object equal to Current -- twin calls copy; to change copying/twinning semantics, redefine copy. -- (from ANY) ensure -- from ANY twin_not_void: Result /= Void is_equal: Result ~ Current feature -- Basic operations copy (other: like Current) -- Update Current with all attributes of other. require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_equal: Current ~ other frozen default: detachable EV_FONT -- 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) ensure -- from ANY instance_free: class default_rescue -- Process exception for routines with no Rescue clause. -- (Default: do nothing.) -- (from ANY) frozen do_nothing -- Execute a null action. -- (from ANY) ensure -- from ANY instance_free: class is_equal (other: like Current): BOOLEAN -- Does other have same appearance? require -- from ANY other_not_void: other /= Void ensure -- from ANY symmetric: Result implies other ~ Current consistent: standard_is_equal (other) implies Result feature -- Command destroy -- Destroy underlying native toolkit object. -- Render Current unusable. -- (from EV_ANY) ensure -- from EV_ANY is_destroyed: is_destroyed feature -- Contract support valid_family (a_family: INTEGER_32): BOOLEAN -- Is a_family a valid family value. -- (from EV_FONT_CONSTANTS) valid_shape (a_shape: INTEGER_32): BOOLEAN -- Is a_shape a valid shape value. -- (from EV_FONT_CONSTANTS) valid_weight (a_weight: INTEGER_32): BOOLEAN -- Is a_weight a valid weight value. -- (from EV_FONT_CONSTANTS) feature -- Output Io: STD_FILES -- Handle to standard file setup -- (from ANY) ensure -- from ANY instance_free: class io_not_void: Result /= Void out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY out_not_void: Result /= Void print (o: detachable ANY) -- Write terse external representation of o -- on standard output. -- (from ANY) ensure -- from ANY instance_free: class frozen tagged_out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY tagged_out_not_void: Result /= Void feature -- Platform Operating_environment: OPERATING_ENVIRONMENT -- Objects available from the operating system -- (from ANY) ensure -- from ANY instance_free: class operating_environment_not_void: Result /= Void feature -- Status Report is_destroyed: BOOLEAN -- Is Current no longer usable? -- (from EV_ANY) ensure -- from EV_ANY bridge_ok: Result = implementation.is_destroyed invariant family_valid: is_initialized implies valid_family (family) weight_valid: is_initialized implies valid_weight (weight) shape_valid: is_initialized implies valid_shape (shape) height_positive: is_initialized implies height > 0 height_in_points_positive: is_initialized implies height_in_points > 0 ascent_not_negative: is_initialized implies ascent >= 0 descent_not_negative: is_initialized implies descent >= 0 width_of_empty_string_equals_zero: is_initialized implies string_width ("") = 0 horizontal_resolution_non_negative: is_initialized implies horizontal_resolution >= 0 vertical_resolution_non_negative: is_initialized implies vertical_resolution >= 0 -- from EV_ANY is_initialized: is_initialized default_create_called: default_create_called is_coupled: default_create_called implies (implementation.interface = Current or (attached {EV_ENVIRONMENT} Current and then attached implementation.interface)) -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) note 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 EV_FONT
Classes Clusters Cluster hierarchy Chart Relations Flat contracts Go to:

-- Generated by Eiffel Studio --
For more details: eiffel.org