indexing
description: "Defines the x and y coordinates of a point."
status: "See notice at end of class."
date: "$Date$"
revision: "$Revision$"
class interface
WEL_POINT
create
make (a_x, a_y: INTEGER)
xya_xa_y
ensure
x_set: x = a_x
y_set: y = a_y
make_by_pointer (a_pointer: POINTER)
itema_pointer
item
a_pointer
WEL_ANY
ensure WEL_ANY
item_set: item = a_pointer
shared: shared
make_by_cursor_position
xy
feature
item: POINTER
WEL_ANY
x: INTEGER
y: INTEGER
feature
structure_size: INTEGER
ensure WEL_STRUCTURE
positive_result: Result > 0
feature
is_equal (other: like Current): BOOLEAN
Currentother
require ANY
other_not_void: other /= void
ensure ANY
symmetric: Result implies other.is_equal (Current)
consistent: standard_is_equal (other) implies Result
feature
exists: BOOLEAN
item
WEL_ANY
ensure WEL_ANY
Result = (item /= default_pointer)
shared: BOOLEAN
item
item
destroy_item
item
WEL_ANY
window_at: WEL_WINDOW
feature
set_shared
shared
WEL_ANY
ensure WEL_ANY
shared: shared
set_unshared
shared
WEL_ANY
ensure WEL_ANY
unshared: not shared
feature
set_cursor_position
xy
set_item (an_item: POINTER)
iteman_item
WEL_ANY
ensure WEL_ANY
item_set: item = an_item
set_x (a_x: INTEGER)
xa_x
ensure
x_set: x = a_x
set_x_y (a_x, a_y: INTEGER)
xa_xya_y
ensure
x_set: x = a_x
y_set: y = a_y
set_y (a_y: INTEGER)
ya_y
ensure
y_set: y = a_y
feature
dispose
Current
Current
WEL_ANY
feature
client_to_screen (window: WEL_WINDOW)
Current
window
require
window_not_void: window /= void
window_exists: window.exists
screen_to_client (window: WEL_WINDOW)
Current
window
require
window_not_void: window /= void
window_exists: window.exists
to_integer: INTEGER
item
WEL_ANY
ensure WEL_ANY
Result = cwel_pointer_to_integer (item)
feature
initialize
WEL_STRUCTURE
require WEL_STRUCTURE
exists: exists
initialize_with_character (a_character: CHARACTER)
a_character
WEL_STRUCTURE
require WEL_STRUCTURE
exists: exists
memory_copy (source_pointer: POINTER; length: INTEGER)
lengthsource_pointeritem
WEL_STRUCTURE
require WEL_STRUCTURE
length_small_enough: length <= structure_size
length_large_enough: length > 0
exists: exists
invariant
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
end -- WEL_POINT