indexing
description: "This class processes the scroll messages associated to a window."
legal: "See notice at end of class."
status: "See notice at end of class."
date: "$Date: 2006-09-21 17:04:32 -0700 (Thu, 21 Sep 2006) $"
revision: "$Revision: 63798 $"
class interface
WEL_SCROLLER
create
make (a_window: WEL_COMPOSITE_WINDOW; horizontal_size, vertical_size, line, page: INTEGER_32)
`a_window'
`horizontal_size'`vertical_size'
`line'`page'
require
a_window_not_void: a_window /= Void
a_window_exists: a_window.exists
positive_horizontal_size: horizontal_size > 0
positive_vertical_size: vertical_size > 0
positive_line: line >= 0
valid_line: line < horizontal_size and then line < vertical_size
positive_page: page >= 0
valid_page: page < horizontal_size and then page < vertical_size
ensure
window_set: window = a_window
make_with_options (a_window: WEL_COMPOSITE_WINDOW; a_minimal_horizontal_position, a_maximal_horizontal_position, a_minimal_vertical_position, a_maximal_vertical_position, a_horizontal_line, a_horizontal_page, a_vertical_line, a_vertical_page: INTEGER_32)
`a_window'
`a_minimal_horizontal_position'
`a_maximal_horizontal_position'
`a_minimal_vertical_position'
`a_maximal_vertical_position'
`a_horizontal_line'`a_horizontal_page'
`a_vertical_line'`a_vertical_page'
require
a_window_not_void: a_window /= Void
a_window_exists: a_window.exists
consistent_horizontal_range: a_minimal_horizontal_position < a_maximal_horizontal_position
consistent_vertical_range: a_minimal_vertical_position < a_maximal_vertical_position
positive_horizontal_line: a_horizontal_line >= 0
positive_vertical_line: a_vertical_line >= 0
positive_horizontal_page: a_horizontal_page >= 0
positive_vertical_page: a_vertical_page >= 0
ensure
window_set: window = a_window
minimal_horizontal_position_set: minimal_horizontal_position = a_minimal_horizontal_position
maximal_horizontal_position_set: maximal_horizontal_position = a_maximal_horizontal_position
minimal_vertical_position_set: minimal_vertical_position = a_minimal_vertical_position
maximal_vertical_position_set: maximal_vertical_position = a_maximal_vertical_position
feature
make (a_window: WEL_COMPOSITE_WINDOW; horizontal_size, vertical_size, line, page: INTEGER_32)
`a_window'
`horizontal_size'`vertical_size'
`line'`page'
require
a_window_not_void: a_window /= Void
a_window_exists: a_window.exists
positive_horizontal_size: horizontal_size > 0
positive_vertical_size: vertical_size > 0
positive_line: line >= 0
valid_line: line < horizontal_size and then line < vertical_size
positive_page: page >= 0
valid_page: page < horizontal_size and then page < vertical_size
ensure
window_set: window = a_window
make_with_options (a_window: WEL_COMPOSITE_WINDOW; a_minimal_horizontal_position, a_maximal_horizontal_position, a_minimal_vertical_position, a_maximal_vertical_position, a_horizontal_line, a_horizontal_page, a_vertical_line, a_vertical_page: INTEGER_32)
`a_window'
`a_minimal_horizontal_position'
`a_maximal_horizontal_position'
`a_minimal_vertical_position'
`a_maximal_vertical_position'
`a_horizontal_line'`a_horizontal_page'
`a_vertical_line'`a_vertical_page'
require
a_window_not_void: a_window /= Void
a_window_exists: a_window.exists
consistent_horizontal_range: a_minimal_horizontal_position < a_maximal_horizontal_position
consistent_vertical_range: a_minimal_vertical_position < a_maximal_vertical_position
positive_horizontal_line: a_horizontal_line >= 0
positive_vertical_line: a_vertical_line >= 0
positive_horizontal_page: a_horizontal_page >= 0
positive_vertical_page: a_vertical_page >= 0
ensure
window_set: window = a_window
minimal_horizontal_position_set: minimal_horizontal_position = a_minimal_horizontal_position
maximal_horizontal_position_set: maximal_horizontal_position = a_maximal_horizontal_position
minimal_vertical_position_set: minimal_vertical_position = a_minimal_vertical_position
maximal_vertical_position_set: maximal_vertical_position = a_maximal_vertical_position
feature
generating_type: STRING_8
ANY
generator: STRING_8
ANY
horizontal_line: INTEGER_32
horizontal_page: INTEGER_32
require
window_exists: window.exists
horizontal_position: INTEGER_32
require
window_exists: window.exists
maximal_horizontal_position: INTEGER_32
require
window_exists: window.exists
maximal_vertical_position: INTEGER_32
require
window_exists: window.exists
minimal_horizontal_position: INTEGER_32
require
window_exists: window.exists
minimal_vertical_position: INTEGER_32
require
window_exists: window.exists
vertical_line: INTEGER_32
vertical_page: INTEGER_32
require
window_exists: window.exists
vertical_position: INTEGER_32
require
window_exists: window.exists
window: WEL_COMPOSITE_WINDOW
feature
frozen deep_equal (some: ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure 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
`some'`other'
ANY
ensure ANY
definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.is_equal (other))
is_equal (other: like Current): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
symmetric: Result implies other.is_equal (Current)
consistent: standard_is_equal (other) implies Result
frozen standard_equal (some: ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure 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
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
same_type: Result implies same_type (other)
symmetric: Result implies other.standard_is_equal (Current)
feature
conforms_to (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
same_type (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
definition: Result = (conforms_to (other) and other.conforms_to (Current))
valid_maximal_horizontal_position (a_position: INTEGER_32): BOOLEAN
`a_position'horizontal_position
valid_maximal_vertical_position (a_position: INTEGER_32): BOOLEAN
`a_position'vertical_position
feature
set_horizontal_line (unit: INTEGER_32)
horizontal_line`unit'
require
positive_unit: unit >= 0
ensure
horizontal_line_set: horizontal_line = unit
set_horizontal_page (page_magnitude: INTEGER_32)
horizontal_page`unit'
require
window_exists: window.exists
positive_unit: page_magnitude >= 0
ensure
horizontal_page_set: horizontal_page = page_magnitude
set_horizontal_position (position: INTEGER_32)
horizontal_position`position'
require
window_exists: window.exists
position_small_enough: valid_maximal_horizontal_position (position)
position_large_enough: position >= minimal_horizontal_position
ensure
horizontal_position_set: horizontal_position = position
set_horizontal_range (minimum, maximum: INTEGER_32)
`horizontal_minimum_range'
`horizontal_maximal_range'`minimum'
`maximum'
require
window_exists: window.exists
consistent_range: minimum <= maximum
ensure
horizontal_minimum_range_set: minimal_horizontal_position = minimum
horizontal_maximal_range_set: maximal_horizontal_position = maximum
set_vertical_line (unit: INTEGER_32)
vertical_line`unit'
require
positive_unit: unit >= 0
ensure
vertical_line_set: vertical_line = unit
set_vertical_page (page_magnitude: INTEGER_32)
vertical_page`unit'
require
window_exists: window.exists
positive_unit: page_magnitude >= 0
ensure
vertical_page_set: vertical_page = page_magnitude
set_vertical_position (position: INTEGER_32)
vertical_position`position'
require
window_exists: window.exists
position_small_enough: valid_maximal_vertical_position (position)
position_large_enough: position >= minimal_vertical_position
ensure
vertical_position_set: vertical_position = position
set_vertical_range (minimum, maximum: INTEGER_32)
minimal_vertical_position
maximal_vertical_position`minimum'
`maximum'
require
window_exists: window.exists
consistent_range: minimum <= maximum
ensure
minimal_vertical_position_set: minimal_vertical_position = minimum
maximal_vertical_position_set: maximal_vertical_position = maximum
feature
copy (other: like Current)
`other'
ANY
require ANY
other_not_void: other /= Void
type_identity: same_type (other)
ensure ANY
is_equal: is_equal (other)
frozen deep_copy (other: like Current)
copy`other'deep_twin
ANY
require ANY
other_not_void: other /= Void
ensure ANY
deep_equal: deep_equal (Current, other)
frozen deep_twin: like Current
ANY
ensure ANY
deep_equal: deep_equal (Current, Result)
frozen standard_copy (other: like Current)
`other'
ANY
require ANY
other_not_void: other /= Void
type_identity: same_type (other)
ensure ANY
is_standard_equal: standard_is_equal (other)
frozen standard_twin: like Current
`other'
ANY
ensure ANY
standard_twin_not_void: Result /= Void
equal: standard_equal (Result, Current)
frozen twin: like Current
`Current'
twincopycopy
ANY
ensure ANY
twin_not_void: Result /= Void
is_equal: Result.is_equal (Current)
feature
frozen default: like Current
ANY
frozen default_pointer: POINTER
`POINTER'
`p'default
`p'`POINTER'
ANY
default_rescue
ANY
frozen do_nothing
ANY
horizontal_update (inc, position: INTEGER_32)
`inc'`position'
require
window_exists: window.exists
position_small_enough: position <= maximal_horizontal_position
position_large_enough: position >= minimal_horizontal_position
ensure
horizontal_position_set: horizontal_position = position
on_horizontal_scroll (scroll_code, pos: INTEGER_32)
require
window_exists: window.exists
on_vertical_scroll (scroll_code, pos: INTEGER_32)
require
window_exists: window.exists
vertical_update (inc, position: INTEGER_32)
`inc'`position'
require
window_exists: window.exists
position_small_enough: position <= maximal_vertical_position
position_large_enough: position >= minimal_vertical_position
ensure
vertical_position_set: vertical_position = position
feature
io: STD_FILES
ANY
out: STRING_8
ANYtagged_out
ANY
print (some: ANY)
`some'
ANY
frozen tagged_out: STRING_8
ANYout
ANY
feature
operating_environment: OPERATING_ENVIRONMENT
ANY
invariant
window_not_void: window /= Void
horizontal_position_small_enough: window.exists implies horizontal_position <= maximal_horizontal_position
horizontal_position_large_enough: window.exists implies horizontal_position >= minimal_horizontal_position
vertical_position_small_enough: window.exists implies vertical_position <= maximal_vertical_position
vertical_position_large_enough: window.exists implies vertical_position >= minimal_vertical_position
consistent_horizontal_range: window.exists implies minimal_horizontal_position <= maximal_horizontal_position
consistent_vertical_range: window.exists implies minimal_vertical_position <= maximal_vertical_position
positive_horizontal_line: horizontal_line >= 0
positive_vertical_line: vertical_line >= 0
positive_horizontal_page: horizontal_page >= 0
positive_vertical_page: vertical_page >= 0
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 WEL_SCROLLER