-- Automatic generation produced by ISE Eiffel --

indexing
     description: "TREEVIEW class of the WEL example : Tree_view."
     author: "Arnaud PICHERY [ aranud@mail.dotcom.fr ]"
     status: "See notice at end of class."
     date: "$Date$"
     revision: "$Revision$"

class interface
     TREEVIEW

create

     make (a_parent: WEL_WINDOW; a_x, a_y, a_width, a_height, an_id: INTEGER)
                 -- Create the tree and some items in it.
           require -- from WEL_TREE_VIEW
                 a_parent_not_void: a_parent /= void
           ensure -- from WEL_TREE_VIEW
                 exists: exists
                 parent_set: parent = a_parent
                 id_set: id = an_id

feature -- Access

     Color_activeborder: INTEGER is 10
                 -- (from WEL_COLOR_CONSTANTS)

     Color_activecaption: INTEGER is 2
                 -- (from WEL_COLOR_CONSTANTS)

     Color_appworkspace: INTEGER is 12
                 -- (from WEL_COLOR_CONSTANTS)

     Color_background: INTEGER is 1
                 -- (from WEL_COLOR_CONSTANTS)

     Color_btnface: INTEGER is 15
                 -- (from WEL_COLOR_CONSTANTS)

     Color_btnhighlight: INTEGER is 20
                 -- (from WEL_COLOR_CONSTANTS)

     Color_btnshadow: INTEGER is 16
                 -- (from WEL_COLOR_CONSTANTS)

     Color_btntext: INTEGER is 18
                 -- (from WEL_COLOR_CONSTANTS)

     Color_captiontext: INTEGER is 9
                 -- (from WEL_COLOR_CONSTANTS)

     Color_graytext: INTEGER is 17
                 -- (from WEL_COLOR_CONSTANTS)

     Color_highlight: INTEGER is 13
                 -- (from WEL_COLOR_CONSTANTS)

     Color_highlighttext: INTEGER is 14
                 -- (from WEL_COLOR_CONSTANTS)

     Color_inactiveborder: INTEGER is 11
                 -- (from WEL_COLOR_CONSTANTS)

     Color_inactivecaption: INTEGER is 3
                 -- (from WEL_COLOR_CONSTANTS)

     Color_inactivecaptiontext: INTEGER is 19
                 -- (from WEL_COLOR_CONSTANTS)

     Color_menu: INTEGER is 4
                 -- (from WEL_COLOR_CONSTANTS)

     Color_menutext: INTEGER is 7
                 -- (from WEL_COLOR_CONSTANTS)

     Color_scrollbar: INTEGER is 0
                 -- (from WEL_COLOR_CONSTANTS)

     Color_window: INTEGER is 5
                 -- (from WEL_COLOR_CONSTANTS)

     Color_windowframe: INTEGER is 6
                 -- (from WEL_COLOR_CONSTANTS)

     Color_windowtext: INTEGER is 8
                 -- (from WEL_COLOR_CONSTANTS)

     commands: WEL_COMMAND_MANAGER
                 -- Command manager associated to the current window.
                 -- (from WEL_WINDOW)

     default_processing: BOOLEAN
                 -- (from WEL_RETURN_VALUE)

     font: WEL_FONT
                 -- Font with which the control is drawing its text.
                 -- (from WEL_CONTROL)
           require -- from WEL_CONTROL
                 exists: exists
           ensure -- from WEL_CONTROL
                 result_not_void: Result /= void

     get_parent_item (an_item: WEL_TREE_VIEW_ITEM): WEL_TREE_VIEW_ITEM
                 -- Return the parent item of the given item.
                 -- (from WEL_TREE_VIEW)

     has_return_value: BOOLEAN
                 -- Should the window procedure return a value?
                 -- (from WEL_RETURN_VALUE)

     id: INTEGER
                 -- Control id
                 -- (from WEL_CONTROL)

     Id_ico_application: INTEGER is 1
                 -- (from APPLICATION_IDS)

     Idb_document_normal: INTEGER is 403
                 -- (from APPLICATION_IDS)

     Idb_document_selected: INTEGER is 404
                 -- (from APPLICATION_IDS)

     Idb_folder_normal: INTEGER is 401
                 -- (from APPLICATION_IDS)

     Idb_folder_selected: INTEGER is 402
                 -- (from APPLICATION_IDS)

     item: POINTER
                 -- Generic Windows handle or structure pointer.
                 -- Can be a HWND, HICON, RECT *, WNDCLASS *, etc...
                 -- (from WEL_ANY)

     item_output: WEL_STATIC

     last_item: POINTER
                 -- Handle of the last item inserted
                 -- (from WEL_TREE_VIEW)

     mess_output: WEL_SINGLE_SELECTION_LIST_BOX

     message_return_value: INTEGER
                 -- Return value of the window procedure.
                 -- (from WEL_RETURN_VALUE)
           require -- from WEL_RETURN_VALUE
                 has_return_value: has_return_value

     parent: WEL_WINDOW
                 -- Parent window
                 -- (from WEL_WINDOW)
     
feature -- Status report

     absolute_x: INTEGER
                 -- Absolute x position
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 Result = window_rect.x

     absolute_y: INTEGER
                 -- Absolute y position
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 Result = window_rect.y

     background_brush: WEL_BRUSH
                 -- Current window background color used to refresh the window when
                 -- requested by the WM_ERASEBKGND windows message.
                 -- By default there is no background
                 -- (from WEL_WINDOW)
           ensure -- from WEL_WINDOW
                 new_object: Result /= void implies Result /= background_brush

     captured_window: WEL_WINDOW
                 -- Current window which has been captured.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 window_captured: window_captured

     client_rect: WEL_RECT
                 -- Client rectangle
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 result_not_void: Result /= void

     command (message: INTEGER): WEL_COMMAND
                 -- Command associated to message
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 positive_message: message >= 0
                 command_exists: command_exists (message)
           ensure -- from WEL_WINDOW
                 result_not_void: Result /= void

     command_argument (message: INTEGER): ANY
                 -- Command argument associated to message
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 positive_message: message >= 0
                 command_exists: command_exists (message)

     command_exists (message: INTEGER): BOOLEAN
                 -- Does a command associated to message exist?
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 positive_message: message >= 0

     commands_enabled: BOOLEAN
                 -- Is the commands execution enabled?
                 -- (from WEL_WINDOW)

     count: INTEGER
                 -- Number of items in the tree view window
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
           ensure -- from WEL_TREE_VIEW
                 positive_result: Result >= 0

     enabled: BOOLEAN
                 -- Is the window enabled for mouse and keyboard input?
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     ex_style: INTEGER
                 -- Window ex_style
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     exists: BOOLEAN
                 -- Does the item exist?
                 -- (from WEL_ANY)
           ensure -- from WEL_ANY
                 Result = (item /= default_pointer)

     focused_window: WEL_WINDOW
                 -- Current window which has the focus.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     get_image_list: WEL_IMAGE_LIST
                 -- Get the image list associated with this treeview.
                 -- Returns Void if none.
                 -- (from WEL_TREE_VIEW)

     get_item_rect (an_item: WEL_TREE_VIEW_ITEM): WEL_RECT
                 -- (from WEL_TREE_VIEW)

     get_tooltip: WEL_TOOLTIP
                 -- Result is tooltip associated with Current.
                 -- (from WEL_TREE_VIEW)

     has_capture: BOOLEAN
                 -- Does this window have the capture?
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     has_focus: BOOLEAN
                 -- Does this window have the focus?
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     has_heavy_capture: BOOLEAN
                 -- Does this window have the heavy capture?
                 -- (from WEL_WINDOW)

     has_horizontal_scroll_bar: BOOLEAN
                 -- Does this window have a horizontal scroll bar?
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     has_item (an_item: WEL_TREE_VIEW_ITEM): BOOLEAN
                 -- Does an_item exist in the tree?
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 item_not_void: an_item /= void
                 item_valid: an_item.exists
           ensure -- from WEL_TREE_VIEW
                 mask_unchanged: an_item.mask = old an_item.mask

     has_system_font: BOOLEAN
                 -- Does the control use the system font?
                 -- (from WEL_CONTROL)
           require -- from WEL_CONTROL
                 exists: exists

     has_vertical_scroll_bar: BOOLEAN
                 -- Does this window have a vertical scroll bar?
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     heavy_capture_activated: BOOLEAN
                 -- Is the heavy capture currently running?
                 -- (i.e. is there a window in the current program
                 -- with has_heavy_capture to True?)
                 -- (from WEL_WINDOW)

     height: INTEGER
                 -- Window height
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     indent: INTEGER
                 -- Amout, in pixels, that child items are indented
                 -- relative to their parent items.
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists

     is_bold (an_item: WEL_TREE_VIEW_ITEM): BOOLEAN
                 -- Is an_item bold?
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 valid_item: has_item (an_item)

     is_cut (an_item: WEL_TREE_VIEW_ITEM): BOOLEAN
                 -- Is an_item selected as part of a cut and paste
                 -- operation?
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 valid_item: has_item (an_item)

     is_drophilited (an_item: WEL_TREE_VIEW_ITEM): BOOLEAN
                 -- Is an_item selected as a drag ans drop target?
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 valid_item: has_item (an_item)

     is_expanded (an_item: WEL_TREE_VIEW_ITEM): BOOLEAN
                 -- Is an_item expanded?
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 valid_item: has_item (an_item)

     is_inside: BOOLEAN
                 -- Is the current window inside another window?
                 -- (from WEL_WINDOW)

     is_parent (an_item: WEL_TREE_VIEW_ITEM): BOOLEAN
                 -- Is an_item a parent of other items?
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 valid_item: has_item (an_item)

     is_selected (an_item: WEL_TREE_VIEW_ITEM): BOOLEAN
                 -- Is an_item selected?
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 valid_item: has_item (an_item)

     maximal_height: INTEGER
                 -- Maximal height allowed for the window
                 -- (from WEL_WINDOW)
           ensure -- from WEL_WINDOW
                 result_large_enough: Result >= minimal_height

     maximal_width: INTEGER
                 -- Maximal width allowed for the window
                 -- (from WEL_WINDOW)
           ensure -- from WEL_WINDOW
                 result_large_enough: Result >= minimal_width

     maximized: BOOLEAN
                 -- Is the window maximized?
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     minimal_height: INTEGER
                 -- Minimal height allowed for the window
                 -- Zero by default.
                 -- (from WEL_WINDOW)
           ensure -- from WEL_WINDOW
                 positive_result: Result >= 0
                 result_small_enough: Result <= maximal_height

     minimal_width: INTEGER
                 -- Minimal width allowed for the window
                 -- Zero by default.
                 -- (from WEL_WINDOW)
           ensure -- from WEL_WINDOW
                 positive_result: Result >= 0
                 result_small_enough: Result <= maximal_width

     minimized: BOOLEAN
                 -- Is the window minimized?
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     placement: WEL_WINDOW_PLACEMENT
                 -- Window placement information
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 result_not_void: Result /= void

     selected: BOOLEAN
                 -- Is an item selected?
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists

     selected_item: WEL_TREE_VIEW_ITEM
                 -- Return the currently selected item.
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 selected: selected
           ensure -- from WEL_TREE_VIEW
                 item_valid: Result.exists

     shared: BOOLEAN
                 -- Is item shared by another object?
                 -- If False (by default), item will
                 -- be destroyed by destroy_item.
                 -- If True, item will not be destroyed.
                 -- (from WEL_ANY)

     shown: BOOLEAN
                 -- Is the window shown?
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     style: INTEGER
                 -- Window style
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     text: STRING
                 -- Window text
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 result_not_void: Result /= void

     text_length: INTEGER
                 -- Text length
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 positive_result: Result >= 0

     valid_color_constant (c: INTEGER): BOOLEAN
                 -- Is c a valid color constant?
                 -- (from WEL_COLOR_CONSTANTS)

     visible_count: INTEGER
                 -- Number of items that will fit into the tree
                 -- view window
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
           ensure -- from WEL_TREE_VIEW
                 positive_result: Result >= 0

     width: INTEGER
                 -- Window width
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     window_captured: BOOLEAN
                 -- Has a window been captured?
                 -- (from WEL_WINDOW)

     window_rect: WEL_RECT
                 -- Window rectangle (absolute position)
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 result_not_void: Result /= void

     x: INTEGER
                 -- Window x position
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 parent = void implies Result = absolute_x

     y: INTEGER
                 -- Window y position
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 parent = void implies Result = absolute_y
     
feature -- Status report

     valid_hwnd_constant (c: POINTER): BOOLEAN
                 -- Is c a valid hwnd constant?
                 -- (from WEL_HWND_CONSTANTS)
     
feature -- Status setting

     collapse_item (an_item: WEL_TREE_VIEW_ITEM)
                 -- Collapse the given item.
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 is_parent (an_item)
                 valid_item: has_item (an_item)
           ensure -- from WEL_TREE_VIEW
                 item_collapse: not is_expanded (an_item)

     deselect_item (an_item: WEL_TREE_VIEW_ITEM)
                 -- Deselect the given item
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 valid_item: has_item (an_item)
           ensure -- from WEL_TREE_VIEW
                 item_deselected: not is_selected (an_item)

     disable
                 -- Disable mouse and keyboard input
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 disabled: not enabled

     disable_commands
                 -- Disable commands execution.
                 -- (from WEL_WINDOW)
           ensure -- from WEL_WINDOW
                 commands_disabled: not commands_enabled

     disable_default_processing
                 -- Disable default window processing.
                 -- The standard window procedure will not be called for
                 -- each messages received by the window and then the
                 -- normal behavior will not occur.
                 -- (from WEL_WINDOW)
           ensure -- from WEL_WINDOW
                 default_processing_disabled: not default_processing

     enable
                 -- Enable mouse and keyboard input.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 enabled: enabled

     enable_commands
                 -- Enable commands execution.
                 -- (from WEL_WINDOW)
           ensure -- from WEL_WINDOW
                 commands_enabled: commands_enabled

     enable_default_processing
                 -- Enable default window processing.
                 -- The standard window procedure will be called for
                 -- each messages received by the window and then the
                 -- normal behavior will occur.
                 -- (from WEL_WINDOW)
           ensure -- from WEL_WINDOW
                 default_processing_enabled: default_processing

     expand_item (an_item: WEL_TREE_VIEW_ITEM)
                 -- Expand the given item.
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 is_parent: is_parent (an_item)
                 valid_item: has_item (an_item)
           ensure -- from WEL_TREE_VIEW
                 item_expanded: is_expanded (an_item)

     hide
                 -- Hide the window
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 hidden: not shown

     maximize
                 -- Maximize the window
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 maximized: maximized

     minimize
                 -- Minimize the window and display its icon
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 minimized: minimized

     release_capture
                 -- Release the mouse capture after a call
                 -- to set_capture.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 has_capture: has_capture
           ensure -- from WEL_WINDOW
                 not_has_capture: not has_capture

     release_heavy_capture
                 -- Release the mouse capture after a call
                 -- to set_heavy_capture.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 has_heavy_capture: has_heavy_capture
                 heavy_capture_activated: heavy_capture_activated
           ensure -- from WEL_WINDOW
                 heavy_capture_set: not has_heavy_capture
                 heavy_capture_deactivated: not heavy_capture_activated

     restore
                 -- Restore the window to its
                 -- original size and position after
                 -- minimize or maximize
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     select_drop_target (an_item: WEL_TREE_VIEW_ITEM)
                 -- Redraw the given an_item in the style used to
                 -- indicate the target of a drag and drop operation.
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 valid_item: has_item (an_item)

     select_first_visible (an_item: WEL_TREE_VIEW_ITEM)
                 -- Scrolls the tree view vertically so that
                 -- the given an_item is the first visible item.
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 valid_item: has_item (an_item)

     select_item (an_item: WEL_TREE_VIEW_ITEM)
                 -- Set the selection to the given an_item.
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 valid_item: has_item (an_item)
           ensure -- from WEL_TREE_VIEW
                 item_selected: is_selected (an_item)

     set_capture
                 -- Set the mouse capture to the Current window.
                 -- Once the window has captured the mouse, all
                 -- mouse input is directed to this window, regardless
                 -- of whether the cursor is over that window. Only
                 -- one window can have the mouse capture at a time.
                 --
                 -- Works only for windows in the same thread as your
                 -- application.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 has_not_capture: not has_capture
                 has_not_heavy_capture: not has_heavy_capture
           ensure -- from WEL_WINDOW
                 has_capture: has_capture

     set_ex_style (an_ex_style: INTEGER)
                 -- Set an_ex_style with ex_style.
                 --
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     set_focus
                 -- Set the focus to Current
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     set_heavy_capture
                 -- Set the mouse capture to the Current window.
                 -- Once the window has captured the mouse, all
                 -- mouse input is directed to this window, regardless
                 -- of whether the cursor is over that window. Only
                 -- one window can have the mouse capture at a time.
                 --
                 -- Works for ALL windows.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 has_not_heavy_capture: not has_heavy_capture
                 heavy_capture_deactivated: not heavy_capture_activated
           ensure -- from WEL_WINDOW
                 heavy_capture_set: has_heavy_capture
                 heavy_capture_activated: heavy_capture_activated

     set_image_list (an_imagelist: WEL_IMAGE_LIST)
                 -- Set the current image list to an_imagelist.
                 -- If an_imagelist is set to Void, it removes
                 -- the current associated image list (if any).
                 -- (from WEL_TREE_VIEW)

     set_indent (an_indent: INTEGER)
                 -- Set indent with an_indent.
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists

     set_shared
                 -- Set shared to True.
                 -- (from WEL_ANY)
           ensure -- from WEL_ANY
                 shared: shared

     set_style (a_style: INTEGER)
                 -- Set style with a_style.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     set_tooltip (tooltip: WEL_TOOLTIP)
                 -- (from WEL_TREE_VIEW)

     set_unshared
                 -- Set shared to False.
                 -- (from WEL_ANY)
           ensure -- from WEL_ANY
                 unshared: not shared

     show
                 -- Show the window
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     update_cached_style (new_ex_style, old_ex_style: INTEGER)
                 -- Update Window cache buffer for Window style.
                 --
                 -- (from WEL_WINDOW)
     
feature -- Element change

     add_mess_output (str: STRING)
                 -- Add a message to the output.

     delete_item (an_item: WEL_TREE_VIEW_ITEM)
                 -- Remove an_item from the tree.
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 item_not_void: an_item /= void
                 valid_item: has_item (an_item)
                 has_items: count > 0

     has_system_window_locked: BOOLEAN
                 -- Is there any window locked ?
                 -- (from WEL_WINDOW)

     insert_item (an_item: WEL_TREE_VIEW_INSERT_STRUCT)
                 -- Insert an_item in the tree.
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 an_item_not_void: an_item /= void
                 an_item_exists: an_item.exists
           ensure -- from WEL_TREE_VIEW
                 new_count: count = old count + 1

     lock_window_update
                 -- Disables drawing in the current window. A locked window cannot be moved.
                 -- Only one window can be locked at a time. To unlock a window locked with
                 -- lock_window_update , call 'unlock_window_update'.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 has_system_window_locked

     set_font (a_font: WEL_FONT)
                 -- Set font with a_font.
                 -- (from WEL_CONTROL)
           require -- from WEL_CONTROL
                 exists: exists
                 a_font_not_void: a_font /= void
                 a_font_exists: a_font.exists
           ensure -- from WEL_CONTROL
                 font_set: not has_system_font implies font.item = a_font.item

     set_height (a_height: INTEGER)
                 -- Set height with a_height
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     set_item (an_item: POINTER)
                 -- Set item with an_item
                 -- (from WEL_ANY)
           ensure -- from WEL_ANY
                 item_set: item = an_item

     set_item_output (static: WEL_STATIC)
                 -- Make static the new output.

     set_mess_output (list: WEL_SINGLE_SELECTION_LIST_BOX)
                 -- Make static the new output.

     set_parent (a_parent: WEL_WINDOW)
                 -- Change the parent of the current window.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     set_placement (a_placement: WEL_WINDOW_PLACEMENT)
                 -- Set placement with a_placement
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 a_placement_not_void: a_placement /= void

     set_text (a_text: STRING)
                 -- Set the window text
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 text_set_when_not_void: a_text /= void implies equal (text, a_text)
                 text_set_when_void: a_text = void implies text.count = 0

     set_timer (timer_id, time_out: INTEGER)
                 -- Set a timer identified by timer_id with a
                 -- time_out value (in milliseconds).
                 -- See also on_timer, kill_timer.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 positive_timer_id: timer_id > 0
                 positive_time_out: time_out > 0

     set_tree_item (an_item: WEL_TREE_VIEW_ITEM)
                 -- Set some or all of a tree view item's attributes.
                 -- (from WEL_TREE_VIEW)
           require -- from WEL_TREE_VIEW
                 exists: exists
                 item_exists: an_item /= void and then an_item.exists
                 valid_item: has_item (an_item)
                 has_items: count > 0

     set_width (a_width: INTEGER)
                 -- Set width with a_width
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     set_x (a_x: INTEGER)
                 -- Set x with a_x
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     set_y (a_y: INTEGER)
                 -- Set y with a_y
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     unlock_window_update
                 -- Unlock a locked window.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
     
feature -- Removal

     destroy
                 -- Destroy the window.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
           ensure -- from WEL_WINDOW
                 not_exists: not exists

     dispose
                 -- Destroy the inner structure of Current.
                 --
                 -- This function should be called by the GC when the
                 -- object is collected or by the user if Current is
                 -- no more usefull.
                 -- (from WEL_ANY)
     
feature -- Conversion

     to_integer: INTEGER
                 -- Converts item to an integer.
                 -- (from WEL_ANY)
           ensure -- from WEL_ANY
                 Result = cwel_pointer_to_integer (item)
     
feature -- Basic operations

     bring_to_top
                 -- Bring this window to the top of the Z order.
                 --
                 -- Note:
                 --  * If the window is a top-level window, it is activated.
                 --  * If the window is a child window, the top-level parent window
                 --    associated with the child window is activated.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     default_process_notification (notification_code: INTEGER)
                 -- Process a notification_code which has not been
                 -- processed by process_notification.
                 -- (from WEL_CONTROL)
           require -- from WEL_CONTROL
                 exists: exists

     disable_horizontal_scroll_bar
                 -- Disable the horizontal scroll bar.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     disable_vertical_scroll_bar
                 -- Disable the vertical scroll bar.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     enable_horizontal_scroll_bar
                 -- Enable the horizontal scroll bar.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     enable_vertical_scroll_bar
                 -- Enable the vertical scroll bar.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     go_to_next_group_item (a_parent: WEL_COMPOSITE_WINDOW; after: BOOLEAN)
                 -- Find the previous or following control with the
                 -- Wm_tabstop style in the current group in a_parent
                 -- depending on the value of after.
                 -- (from WEL_CONTROL)
           require -- from WEL_CONTROL
                 valid_parent: a_parent /= void and then a_parent.exists

     go_to_next_tab_item (a_parent: WEL_COMPOSITE_WINDOW; after: BOOLEAN)
                 -- Find the previous or following control with the
                 -- Wm_tabstop style in `a_parent depending on the
                 -- value of after.
                 -- (from WEL_CONTROL)
           require -- from WEL_CONTROL
                 valid_parent: a_parent /= void and then a_parent.exists

     hide_horizontal_scroll_bar
                 -- Hide the horizontal scroll bar.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     hide_scroll_bars
                 -- Hide the horizontal and vertical scroll bars.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     hide_vertical_scroll_bar
                 -- Hide the vertical scroll bar.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     insert_after (a_window: WEL_WINDOW)
                 -- Insert the current window after a_window.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 a_window_not_void: a_window /= void
                 a_window_not_current: a_window /= Current
                 a_window_exists: a_window.exists

     invalidate
                 -- Invalide the entire client area of the window. The
                 -- background will be erased before.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     invalidate_rect (rect: WEL_RECT; erase_background: BOOLEAN)
                 -- Invalidate the area rect and erase
                 -- the background if erase_background is True.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 rect_not_void: rect /= void

     invalidate_region (region: WEL_REGION; erase_background: BOOLEAN)
                 -- Invalidate the area region and erase
                 -- the background if erase_background is True.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 region_not_void: region /= void
                 region_exists: region.exists

     invalidate_without_background
                 -- Invalidate the entire client area of the window. The
                 -- background will not be erased.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     kill_timer (timer_id: INTEGER)
                 -- Kill the timer identified by timer_id.
                 -- See also set_timer, on_timer.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 positive_timer_id: timer_id > 0

     move (a_x, a_y: INTEGER)
                 -- Move the window to a_x, a_y.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     move_and_resize (a_x, a_y, a_width, a_height: INTEGER; repaint: BOOLEAN)
                 -- Move the window to a_x, a_y position and
                 -- resize it with a_width, a_height.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     put_command (a_command: WEL_COMMAND; message: INTEGER; argument: ANY)
                 -- Put a_command associated to message.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 a_command_not_void: a_command /= void
                 positive_message: message >= 0
           ensure -- from WEL_WINDOW
                 command_added: command (message) = a_command and command_argument (message) = argument

     remove_command (message: INTEGER)
                 -- Remove the command associated to message.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 positive_message: message >= 0
                 command_exists: command_exists (message)
           ensure -- from WEL_WINDOW
                 command_removed: not command_exists (message)

     resize (a_width, a_height: INTEGER)
                 -- Resize the window with a_width, a_height.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     scroll (a_x, a_y: INTEGER)
                 -- Scroll the contents of the window's client area.
                 -- a_x and a_y specify the amount of horizontal
                 -- and vertical scrolling.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     set_class_icon (new_icon: WEL_ICON)
                 -- Replace the current icon for the class which this window
                 -- belongs to.
                 --
                 -- The SetClassLong function replaces the specified 32-bit (long)
                 -- value at the specified offset into the extra class memory
                 -- or the WNDCLASSEX structure for the class to which the
                 -- specified window belongs.
                 -- (from WEL_WINDOW)

     set_class_small_icon (new_icon: WEL_ICON)
                 -- Replace the current icon for the class which this window
                 -- belongs to.
                 --
                 -- The SetClassLong function replaces the specified 32-bit (long)
                 -- value at the specified offset into the extra class memory
                 -- or the WNDCLASSEX structure for the class to which the
                 -- specified window belongs.
                 -- (from WEL_WINDOW)

     set_z_order (z_order: POINTER)
                 -- Set the z-order of the window.
                 -- See class WEL_HWND_CONSTANTS for z_order values.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 valid_hwnd_constant: valid_hwnd_constant (z_order)

     show_horizontal_scroll_bar
                 -- Show the horizontal scroll bar.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     show_scroll_bars
                 -- Show the horizontal and vertical scroll bars.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     show_vertical_scroll_bar
                 -- Show the vertical scroll bar.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     show_with_option (cmd_show: INTEGER)
                 -- Set the window's visibility with cmd_show.
                 -- See class WEL_SW_CONSTANTS for cmd_show value.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 parent_shown: parent /= void implies parent.exists and parent.shown

     update
                 -- Update the client area by sending a Wm_paint message.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     validate_rect (rect: WEL_RECT)
                 -- Validate the area rect.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 rect_not_void: rect /= void

     validate_region (region: WEL_REGION)
                 -- Validate the area region.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 region_not_void: region /= void
                 region_exists: region.exists

     win_help (help_file: STRING; a_command, data: INTEGER)
                 -- Start the Windows Help program with help_file.
                 -- a_command specifies the type of help requested. See
                 -- class WEL_HELP_CONSTANTS for a_command values.
                 -- 'data' is depandant on 'a_command'.  Check MSDN for more details.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 help_file_not_void: help_file /= void
     
feature -- Element Change

     set_default_processing (value: BOOLEAN)
                 -- Enable or disable default processing of window messages.
                 -- (from WEL_RETURN_VALUE)
           ensure -- from WEL_RETURN_VALUE
                 value_set: default_processing = value

     set_message_return_value (value: INTEGER)
                 -- Set the window-procedure-return-value.
                 -- (from WEL_RETURN_VALUE)
           ensure -- from WEL_RETURN_VALUE
                 has_return_value: has_return_value
                 value_set: message_return_value = value
     
feature -- Messages

     on_activate
                 -- Called when window gains activation (alt-tab or mouse click on title bar)
                 -- (from WEL_WINDOW)

     on_char (character_code, key_data: INTEGER)
                 -- Wm_char message
                 -- See class WEL_VK_CONSTANTS for character_code value.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_desactivate
                 -- Called when window loses activation.
                 -- (from WEL_WINDOW)

     on_destroy
                 -- Wm_destroy message.
                 -- The window is about to be destroyed.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_erase_background (paint_dc: WEL_PAINT_DC; invalid_rect: WEL_RECT)
                 -- Wm_erasebkgnd message.
                 -- May be redefined to paint something on
                 -- the paint_dc. invalid_rect defines
                 -- the invalid rectangle of the client area that
                 -- needs to be repainted.
                 -- (from WEL_WINDOW)

     on_hide
                 -- Wm_showwindow message.
                 -- The window is being hidden.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_key_down (virtual_key, key_data: INTEGER)
                 -- Wm_keydown message
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_key_up (virtual_key, key_data: INTEGER)
                 -- Wm_keyup message
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_kill_focus
                 -- Wm_killfocus message
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_left_button_double_click (keys, x_pos, y_pos: INTEGER)
                 -- Wm_lbuttondblclk message
                 -- See class WEL_MK_CONSTANTS for keys value
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_left_button_down (keys, x_pos, y_pos: INTEGER)
                 -- Wm_lbuttondown message
                 -- See class WEL_MK_CONSTANTS for keys value
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_left_button_up (keys, x_pos, y_pos: INTEGER)
                 -- Wm_lbuttonup message
                 -- See class WEL_MK_CONSTANTS for keys value
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_middle_button_double_click (keys, x_pos, y_pos: INTEGER)
                 -- Wm_rbuttondblclk message
                 -- See class WEL_MK_CONSTANTS for keys value
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_middle_button_down (keys, x_pos, y_pos: INTEGER)
                 -- Wm_rbuttondown message
                 -- See class WEL_MK_CONSTANTS for keys value
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_middle_button_up (keys, x_pos, y_pos: INTEGER)
                 -- Wm_rbuttonup message
                 -- See class WEL_MK_CONSTANTS for keys value
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_mouse_move (keys, x_pos, y_pos: INTEGER)
                 -- Wm_mousemove message
                 -- See class WEL_MK_CONSTANTS for keys value
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_move (x_pos, y_pos: INTEGER)
                 -- Wm_move message.
                 -- This message is sent after a window has been moved.
                 -- x_pos specifies the x-coordinate of the upper-left
                 -- corner of the client area of the window.
                 -- y_pos specifies the y-coordinate of the upper-left
                 -- corner of the client area of the window.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_notify (control_id: INTEGER; info: WEL_NMHDR)
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 info_not_void: info /= void

     on_right_button_double_click (keys, x_pos, y_pos: INTEGER)
                 -- Wm_rbuttondblclk message
                 -- See class WEL_MK_CONSTANTS for keys value
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_right_button_down (keys, x_pos, y_pos: INTEGER)
                 -- Wm_rbuttondown message
                 -- See class WEL_MK_CONSTANTS for keys value
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_right_button_up (keys, x_pos, y_pos: INTEGER)
                 -- Wm_rbuttonup message
                 -- See class WEL_MK_CONSTANTS for keys value
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_set_cursor (hit_code: INTEGER)
                 -- Wm_setcursor message.
                 -- See class WEL_HT_CONSTANTS for valid hit_code values.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_set_focus
                 -- Wm_setfocus message
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_show
                 -- Wm_showwindow message.
                 -- The window is being shown.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_size (size_type, a_width, a_height: INTEGER)
                 -- Wm_size message
                 -- See class WEL_SIZE_CONSTANTS for size_type value
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_sys_char (character_code, key_data: INTEGER)
                 -- Wm_syschar message
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_sys_key_down (virtual_key, key_data: INTEGER)
                 -- Wm_syskeydown message
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_sys_key_up (virtual_key, key_data: INTEGER)
                 -- Wm_syskeyup message
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists

     on_timer (timer_id: INTEGER)
                 -- Wm_timer message.
                 -- A Wm_timer has been received from timer_id
                 -- See also set_timer, kill_timer.
                 -- (from WEL_WINDOW)
           require -- from WEL_WINDOW
                 exists: exists
                 positive_timer_id: timer_id > 0
     
feature -- Notifications

     on_tvn_begindrag (info: WEL_NM_TREE_VIEW)
                 -- A drag-and-drop operation involving the left mouse
                 -- button is being initiated.
           require -- from WEL_TREE_VIEW
                 exists: exists

     on_tvn_beginlabeledit (info: WEL_TREE_VIEW_ITEM)
                 -- A label editing for an item has started.
           require -- from WEL_TREE_VIEW
                 exists: exists

     on_tvn_beginrdrag (info: WEL_NM_TREE_VIEW)
                 -- A drag-and-drop operation involving the right mouse
                 -- button is being initiated.
           require -- from WEL_TREE_VIEW
                 exists: exists

     on_tvn_deleteitem (info: WEL_NM_TREE_VIEW)
                 -- An item has been deleted.
           require -- from WEL_TREE_VIEW
                 exists: exists

     on_tvn_endlabeledit (info: WEL_TREE_VIEW_ITEM)
                 -- A label editing for an item has ended.
           require -- from WEL_TREE_VIEW
                 exists: exists

     on_tvn_getdispinfo (info: WEL_TREE_VIEW_ITEM)
                 -- The parent window must provide information needed
                 -- to display or sort an item.
           require -- from WEL_TREE_VIEW
                 exists: exists

     on_tvn_itemexpanded (info: WEL_NM_TREE_VIEW)
                 -- a parent item's list of child items has expanded
                 -- or collapsed.
           require -- from WEL_TREE_VIEW
                 exists: exists

     on_tvn_itemexpanding (info: WEL_NM_TREE_VIEW)
                 -- a parent item's list of child items is about to
                 -- expand or collapse.
           require -- from WEL_TREE_VIEW
                 exists: exists

     on_tvn_keydown (virtual_key: INTEGER)
                 -- The user pressed a key and the tree-view control
                 -- has the input focus.
           require -- from WEL_TREE_VIEW
                 exists: exists

     on_tvn_selchanged (info: WEL_NM_TREE_VIEW)
                 -- Selection has changed from one item to another.
           require -- from WEL_TREE_VIEW
                 exists: exists

     on_tvn_selchanging (info: WEL_NM_TREE_VIEW)
                 -- Selection is about to change from one item to
                 -- another.
           require -- from WEL_TREE_VIEW
                 exists: exists

     on_tvn_setdispinfo (info: WEL_TREE_VIEW_ITEM)
                 -- The parent window must update the informations
                 -- it maintains about an item.
           require -- from WEL_TREE_VIEW
                 exists: exists
     
feature -- Registration

     register_current_window
                 -- Register Current in window manager.
                 -- (from WEL_WINDOW)
     
invariant

           -- from ANY
     reflexive_equality: standard_is_equal (Current)
     reflexive_conformance: conforms_to (Current)

end -- class TREEVIEW

-- Generated by ISE Eiffel --

-- For more details: www.eiffel.com --