-- Automatic generation produced by ISE Eiffel --
class interface
CARD
create
make (number: INTEGER)
-- Make the card identified by number.
require
number_greater_than_card_offset: number > card_offset
number_less_or_equal_maximun: number <= maximum_number_of_cards + card_offset
ensure
card_number_set: card_number = number
feature -- Access
card_image: WEL_BITMAP
-- The image of the card
card_number: INTEGER
-- The number of the card
height: INTEGER
-- The height of the card
ensure
positive_result: Result >= 0
includes_point (x_pos, y_pos: INTEGER): BOOLEAN
-- Does the point defined by
-- (x_pos, y_pos) is inside the image?
offset_x: INTEGER
-- Offset to the x-position of the mouse when
-- moving a card
offset_y: INTEGER
-- Offset to the y-position off the mouse when
-- moving a card
overlapped_with (a_card: CARD): BOOLEAN
-- Does 'a_card' overlap my image more than 50% horizontally?
require
a_card_not_void: a_card /= void
set_offset_x (a_x: INTEGER)
-- Set the offset_x to a_x
ensure
offset_x_is_set: offset_x = a_x
set_offset_y (a_y: INTEGER)
-- Set the offset_y to a_y
ensure
offset_y_is_set: offset_y = a_y
set_x (a_x: INTEGER)
-- Set the x_position to a_y
ensure
x_position_set: x_position = a_x
set_y (a_y: INTEGER)
-- Set the y_position to a_y
ensure
y_position_set: y_position = a_y
width: INTEGER
-- The width of the card
ensure
positive_result: Result >= 0
x_position: INTEGER
-- x_position of the card in the client-area
y_position: INTEGER
-- y_position of the card in the client-area
invariant
card_image_not_void: card_image /= void
card_image_exists: card_image.exists
card_number_set: card_number /= 0
-- from ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
end -- class CARD
-- Generated by ISE Eiffel --
-- For more details: www.eiffel.com --