INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "List box which can have only one selection. ", "WEL: library of reusable components for Eiffel. ", "Based on WEL library for ISE Eiffel, used with permission. "
project: "Windows Eiffel Library"
copyright: "(c) 1986-1997 Interactive Software Engineering Inc. ", "Modifications and extensions: ", "(c) 1997 Object Tools ", "All rights reserved. Duplication and distribution prohibited", "May be used only with Visual Eiffel under terms of user ", "license "
cluster: wel
class WEL_SINGLE_SELECTION_LIST_BOX
inherit

WEL_LIST_BOX
rename
ws_border as wlc_ws_border,
ws_caption as wlc_ws_caption,
ws_child as wlc_ws_child,
ws_childwindow as wlc_ws_childwindow,
ws_clipchildren as wlc_ws_clipchildren,
ws_clipsiblings as wlc_ws_clipsiblings,
ws_disabled as wlc_ws_disabled,
ws_dlgframe as wlc_ws_dlgframe,
ws_ex_acceptfiles as wlc_ws_ex_acceptfiles,
ws_ex_dlgmodalframe as wlc_ws_ex_dlgmodalframe,
ws_ex_noparentnotify as wlc_ws_ex_noparentnotify,
ws_ex_topmost as wlc_ws_ex_topmost,
ws_ex_transparent as wlc_ws_ex_transparent,
ws_group as wlc_ws_group,
ws_hscroll as wlc_ws_hscroll,
ws_maximize as wlc_ws_maximize,
ws_maximizebox as wlc_ws_maximizebox,
ws_minimize as wlc_ws_minimize,
ws_minimizebox as wlc_ws_minimizebox,
ws_overlapped as wlc_ws_overlapped,
ws_overlappedwindow as wlc_ws_overlappedwindow,
ws_popup as wlc_ws_popup,
ws_popupwindow as wlc_ws_popupwindow,
ws_sysmenu as wlc_ws_sysmenu,
ws_tabstop as wlc_ws_tabstop,
ws_thickframe as wlc_ws_thickframe,
ws_visible as wlc_ws_visible,
ws_vscroll as wlc_ws_vscroll
end

WEL_LBS_CONSTANTS
export
{NONE}
all
select
ws_border,
ws_caption,
ws_child,
ws_childwindow,
ws_clipchildren,
ws_clipsiblings,
ws_disabled,
ws_dlgframe,
ws_ex_acceptfiles,
ws_ex_dlgmodalframe,
ws_ex_noparentnotify,
ws_ex_topmost,
ws_ex_transparent,
ws_group,
ws_hscroll,
ws_iconic,
ws_maximize,
ws_maximizebox,
ws_minimize,
ws_minimizebox,
ws_overlapped,
ws_overlappedwindow,
ws_popup,
ws_popupwindow,
ws_sizebox,
ws_sysmenu,
ws_tabstop,
ws_thickframe,
ws_tiled,
ws_tiledwindow,
ws_visible,
ws_vscroll
end
creation

make,
make_by_id
feature -- Status setting

select_item (index: INTEGER)
-- Select item at the zero-based `index'.
ensure
selected: selected
selected_item: selected_item = index
selected_string: strings.item (index).is_equal (selected_string)

unselect
-- Unselect the selected item.
require
exists: exists
ensure
unselected: not selected
feature -- Status report

selected: BOOLEAN
-- Is an item selected?

selected_item: INTEGER
-- Zero-based index of the selected item
require
exists: exists
selected: selected
ensure
result_large_enough: Result >= 0
result_small_enough: Result < count

selected_string: STRING
-- Selected string
require
exists: exists
selected: selected
ensure
result_not_void: Result /= void
invariant

consistent_selection: exists and then selected implies is_selected (selected_item) and strings.item (selected_item).is_equal (selected_string)
end -- class WEL_SINGLE_SELECTION_LIST_BOX

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES