indexing
description: "Representation of a row of an EV_GRID"
legal: "See notice at end of class."
status: "See notice at end of class."
date: "$Date: 2006-08-30 16:39:03 -0700 (Wed, 30 Aug 2006) $"
revision: "$Revision: 63152 $"
class interface
EV_GRID_ROW_I
create
make (an_interface: like interface)
`Current'`an_interface'
require EV_ANY_I
an_interface_not_void: an_interface /= Void
ensure EV_ANY_I
interface_assigned: interface = an_interface
base_make_called: base_make_called
feature
collapse_actions: EV_NOTIFY_ACTION_SEQUENCE
`Current'
EV_GRID_ROW_ACTION_SEQUENCES_I
ensure EV_GRID_ROW_ACTION_SEQUENCES_I
result_not_void: Result /= Void
deselect_actions: EV_NOTIFY_ACTION_SEQUENCE
`Current'
EV_GRID_ROW_ACTION_SEQUENCES_I
ensure EV_GRID_ROW_ACTION_SEQUENCES_I
result_not_void: Result /= Void
expand_actions: EV_NOTIFY_ACTION_SEQUENCE
`Current'
EV_GRID_ROW_ACTION_SEQUENCES_I
ensure EV_GRID_ROW_ACTION_SEQUENCES_I
result_not_void: Result /= Void
generating_type: STRING_8
ANY
generator: STRING_8
ANY
has_subrow (a_row: EV_GRID_ROW): BOOLEAN
`a_row'
require
a_row_not_void: a_row /= Void
is_parented: parent /= Void
ensure
has_subrow_same_parent: Result implies ((a_row.parent /= Void and parent /= Void) and then a_row.parent = parent)
height: INTEGER_32
`Current'parent
`is_row_height_fixed'`False'
height
`is_row_height_fixed'`True'
`parent.row_height'
require
is_parented: parent /= Void
ensure
result_not_negative: Result >= 0
internal_are_all_non_void_items_selected: BOOLEAN
`Current'
internal_height: INTEGER_32
internal_is_selected: BOOLEAN
`Current'
internal_update_selection (a_selection_state: BOOLEAN)
`Current'`a_selection_state'
is_expandable: BOOLEAN
`Current'
require
is_parented: parent /= Void
is_expanded: BOOLEAN
`Current'
is_selectable: BOOLEAN
is_selected: BOOLEAN
item (i: INTEGER_32): EV_GRID_ITEM
`i'
require
i_within_bounds: i > 0 and i <= count
is_parented: parent /= Void
parent: EV_GRID
parent_row: EV_GRID_ROW
require
is_parented: parent /= Void
ensure
result_void_when_tree_node_enabled: (parent = Void) or (parent /= Void and then not parent.is_tree_enabled) implies Result = Void
has_parent: Result /= Void implies Result.has_subrow (interface)
parent_row_root: EV_GRID_ROW
`Current'`Current'
`Current'
require
is_parented: parent /= Void
ensure
result_consistent_with_parent_tree_properties: (parent = Void or else not parent.is_tree_enabled) = (Result = Void)
select_actions: EV_NOTIFY_ACTION_SEQUENCE
`Current'
EV_GRID_ROW_ACTION_SEQUENCES_I
ensure EV_GRID_ROW_ACTION_SEQUENCES_I
result_not_void: Result /= Void
selected_items: ARRAYED_LIST [EV_GRID_ITEM]
`Current'
require
is_parented: parent /= Void
ensure
result_not_void: Result /= Void
valid_count: Result.count <= count
subrow (i: INTEGER_32): EV_GRID_ROW
`i'
require
is_parented: parent /= Void
i_positive: i > 0
i_less_than_subrow_count: i <= subrow_count
ensure
subrow_not_void: Result /= Void
subrow_valid: (Result.parent /= Void) and then has_subrow (Result) and then Result.parent_row = interface
virtual_y_position: INTEGER_32
`Current'
parent
`Result'parent`Void'
ensure
parent_void_implies_result_zero: parent = Void implies Result = 0
virtual_y_position_unlocked: INTEGER_32
`Current'
parent
is_lockedvirtual_y_position`unlocked_virtual_y_position'
is_locked`Result'
ensure
parent_void_implies_result_zero: parent = Void implies Result = 0
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
background_color: EV_COLOR
`Current'
`Void'background_color`Void'background_colorparent
conforms_to (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
count: INTEGER_32
ensure
count_not_negative: count >= 0
foreground_color: EV_COLOR
`Current'
`Void'foreground_color`Void'foreground_colorparent
index: INTEGER_32
parent
index_of_first_item: INTEGER_32
`Void'`Current'
ensure
valid_result: Result >= 0 and Result <= count
value_valid: index_of_first_item_internal = index_of_first_item_value
index_of_first_item_value: INTEGER_32
`Void'`Current'
ensure
valid_result: Result >= 0 and Result <= count
is_hashable: BOOLEAN
HASHABLE
ensure HASHABLE
ok_if_not_default: Result implies (Current /= default)
is_locked: BOOLEAN
`Current'
locked_position: INTEGER_32
`Current'parent
`Result'is_locked
ensure
not_locked_implies_result_zero: not is_locked implies Result = 0
locked_row: EV_GRID_LOCKED_ROW_I
`Current'
`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))
subrow_count: INTEGER_32
require
is_parented: parent /= Void
ensure
subrow_count_non_negative: subrow_count >= 0
subrow_count_in_range: subrow_count <= (parent.row_count - index)
subrow_count_recursive: INTEGER_32
subrow_index: INTEGER_32
`Current'parent_row
feature
collapse
`Current'
require
is_parented: parent /= Void
ensure
not_is_expanded: not is_expanded
node_counts_correct: node_counts_correct
ensure_expandable
`Current'`row_count'
`grid.row_expand_actions'
`Current'`grid.row_expand_actions'
`Current'ensure_expandable
`grid.row_expand_actions'`Current'
ensure_expandable
ensure_expandable
require
parented: parent /= Void
parent_tree_enabled: parent.is_tree_enabled
ensure
is_expandable: is_expandable
ensure_non_expandable
`Current'ensure_expandable
require
parented: parent /= Void
no_subrows_contained: subrow_count = 0
ensure
not_is_expandable: not is_expandable
ensure_visible
`Current'parent
require
parented: parent /= Void
ensure
parent_virtual_x_position_unchanged: old parent.virtual_x_position = parent.virtual_x_position
to_implement_assertion ("old_is_visible_implies_vertical_position_not_changed")
row_visible_when_heights_fixed_in_parent: parent.is_row_height_fixed implies virtual_y_position >= parent.virtual_y_position and virtual_y_position + parent.row_height <= parent.virtual_y_position + (parent.viewable_height).max (parent.row_height)
row_visible_when_heights_not_fixed_in_parent: not parent.is_row_height_fixed implies virtual_y_position >= parent.virtual_y_position and virtual_y_position + height <= parent.virtual_y_position + (parent.viewable_height).max (height)
expand
`Current'
require
is_parented: parent /= Void
is_expandable: is_expandable
ensure
is_expanded: is_expanded or subrow_count = 0
node_counts_correct: node_counts_correct
hide
`Current'parent
require
parented: parent /= Void
is_ensured_expandable: BOOLEAN
is_show_requested: BOOLEAN
`Current'
`False'hide`Current'
is_show_requested
parent_row`Current'
parent
lock_at_position (a_position: INTEGER_32)
is_locked`True'
parent`a_position'
ensure
is_locked: is_locked
locked_position_set: locked_position = a_position
redraw
`Current'
require
parented: parent /= Void
set_background_color (a_color: EV_COLOR)
background_color`a_color'
require
is_parented: parent /= Void
ensure
background_color_set: background_color = a_color
set_foreground_color (a_color: EV_COLOR)
foreground_color`a_color'
require
is_parented: parent /= Void
ensure
foreground_color_set: foreground_color = a_color
set_height (a_height: INTEGER_32)
`a_height'height
require
is_parented: parent /= Void
ensure
height_set: height = a_height
show
`Current'parent
require
parented: parent /= Void
unlock
is_locked`False'
ensure
not_is_locked: not is_locked
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
feature
fixme (comment: STRING_8)
`comment'
REFACTORING_HELPER
require REFACTORING_HELPER
comment_not_void: comment /= Void
to_implement (comment: STRING_8)
`comment'
REFACTORING_HELPER
require REFACTORING_HELPER
comment_not_void: comment /= Void
to_implement_assertion (comment: STRING_8): BOOLEAN
`comment'
REFACTORING_HELPER
require REFACTORING_HELPER
comment_not_void: comment /= Void
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
no_subrows_implies_not_expanded: parent /= Void and then subrow_count = 0 implies not is_expanded
subrows_not_void: is_initialized implies subrows /= Void
hash_code_valid: is_initialized implies ((parent = Void and then hash_code = -1) or else (parent /= Void and then hash_code > 0))
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
EV_ANY_I
interface_coupled: is_usable implies interface /= Void and then interface.implementation = Current
base_make_called: base_make_called
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 EV_GRID_ROW_I