INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Abstract notions of window which can accept children. ", "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
deferred class WEL_COMPOSITE_WINDOW
inherit

WEL_WINDOW
redefine
destroy,
minimal_height,
minimal_width,
move,
move_and_resize,
on_wm_destroy,
process_message
end

WEL_GW_CONSTANTS
export
{NONE}
all
end

WAPI_ATOMS
end
feature -- Access

children: LINKED_LIST [WEL_WINDOW]
-- Construct a linear representation of the children.
require
exists: exists
ensure
result_not_void: Result /= void

menu: WEL_MENU
-- Associated menu
require
exists: exists
has_menu: has_menu
ensure
result_not_void: Result /= void

system_menu: WEL_MENU
-- Associated system menu
require
exists: exists
has_system_menu: has_system_menu
ensure
result_not_void: Result /= void

scroller: WEL_SCROLLER
feature -- Status report

closeable: BOOLEAN
-- Can the user close the window?
-- Yes by default.

has_menu: BOOLEAN
-- Does the window have a menu?
require
exists: exists

has_system_menu: BOOLEAN
-- Does the window have a system menu?
require
exists: exists

minimal_width: INTEGER
-- Minimal width allowed for the window

minimal_height: INTEGER
-- Minimal height allowed for the window

horizontal_position: INTEGER
-- Current position of the horizontal scroll box
require
exists: exists
ensure
result_small_enough: Result <= maximal_horizontal_position
result_large_enough: Result >= minimal_horizontal_position

vertical_position: INTEGER
-- Current position of the vertical scroll box
require
exists: exists
ensure
result_small_enough: Result <= maximal_vertical_position
result_large_enough: Result >= minimal_vertical_position

maximal_horizontal_position: INTEGER
-- Maxium position of the horizontal scroll box
require
exists: exists
ensure
result_large_enough: Result >= minimal_horizontal_position

maximal_vertical_position: INTEGER
-- Maxium position of the vertical scroll box
require
exists: exists
ensure
result_large_enough: Result >= minimal_vertical_position

minimal_horizontal_position: INTEGER
-- Minimum position of the horizontal scroll box
require
exists: exists
ensure
result_small_enough: Result <= maximal_horizontal_position

minimal_vertical_position: INTEGER
-- Minimum position of the vertical scroll box
require
exists: exists
ensure
result_small_enough: Result <= maximal_vertical_position
feature -- Status setting

set_menu (a_menu: WEL_MENU)
-- Set `menu' with `a_menu'.
require
exists: exists
a_menu_not_void: a_menu /= void
a_menu_exists: a_menu.exists
ensure
has_menu: has_menu
menu_set: menu.item = a_menu.item

unset_menu
-- Unset the current menu associated to the window.
require
exists: exists
ensure
menu_unset: not has_menu

set_horizontal_position (position: INTEGER)
-- Set `horizontal_position' with `position'.
require
exists: exists
position_small_enough: position <= maximal_horizontal_position
position_large_enough: position >= minimal_horizontal_position
ensure
horizontal_position_set: horizontal_position = position

set_vertical_position (position: INTEGER)
-- Set `vertical_position' with `position'.
require
exists: exists
position_small_enough: position <= maximal_vertical_position
position_large_enough: position >= minimal_vertical_position
ensure
vertical_position_set: vertical_position = position

set_horizontal_range (minimum, maximum: INTEGER)
-- Set `minimal_horizontal_position' and
-- `maximal_horizontal_position' with `minimum' and
-- `maximum'.
require
exists: exists
consistent_range: minimum < maximum
ensure
minimal_horizontal_position_set: minimal_horizontal_position = minimum
maximal_horizontal_position_set: maximal_horizontal_position = maximum

set_vertical_range (minimum, maximum: INTEGER)
-- Set `minimal_vertical_position' and
-- `maximal_vertical_position' with `minimum' and
-- `maximum'.
require
exists: exists
consistent_range: minimum < maximum
ensure
minimal_vertical_position_set: minimal_vertical_position = minimum
maximal_vertical_position_set: maximal_vertical_position = maximum

horizontal_update (inc, position: INTEGER)
-- Update the window and the horizontal scroll box with
-- `inc' and `position'.
require
exists: exists
position_small_enough: position <= maximal_horizontal_position
position_large_enough: position >= minimal_horizontal_position
ensure
horizontal_position_set: horizontal_position = position

vertical_update (inc, position: INTEGER)
-- Update the window and the vertical scroll box with
-- `inc' and `position'.
require
exists: exists
position_small_enough: position <= maximal_vertical_position
position_large_enough: position >= minimal_vertical_position
ensure
vertical_position_set: vertical_position = position
feature -- Basic operations

destroy
-- Destroy the window and quit the application
-- if `Current' is the application's main window.

draw_menu
-- Draw the menu bar associated with the window.
require
exists: exists
has_menu: has_menu

move_absolute (a_x, a_y: INTEGER)
-- Move the window to `a_x', `a_y' absolute position.
require
exists: exists

move (a_x, a_y: INTEGER)
-- Move the window to `a_x', `a_y' position.

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'.
feature -- Messages

notify (control: WEL_CONTROL; notify_code: INTEGER)
-- A `notify_code' is received for `control'.
require
exists: exists
control_not_void: control /= void
control_exists: control.exists

on_control_command (control: WEL_CONTROL)
-- A command has been received from `control'.
require
exists: exists
control_not_void: control /= void
control_exists: control.exists

on_control_id_command (control_id: INTEGER)
-- A command has been received from `control_id'.
require
exists: exists

on_menu_command (menu_id: INTEGER)
-- The `menu_id' has been choosen from the menu.
require
exists: exists

on_sys_command (a_command, x_pos, y_pos: INTEGER)
-- Wm_syscommand message.
-- This message is sent when the user selects a command
-- from the system menu or when the user selects the
-- Maximize or Minimize button.
-- See class WEL_SC_CONSTANTS for `a_command' values.
-- `x_pos' and `y_pos' specify the x and y coordinates
-- of the cursor.
require
exists: exists

on_accelerator_command (accelerator_id: INTEGER)
-- The `acelerator_id' has been activated.
require
exists: exists

on_menu_select (menu_item, flags: INTEGER; a_menu: WEL_MENU)
-- The `menu_item' from `a_menu' is currently
-- highlighted by the selection bar. `flags'
-- indicates the state of `a_menu'.
-- The selection does not mean that the user has
-- choosen the option, the option is just highlighted.
require
exists: exists

on_paint (paint_dc: WEL_PAINT_DC; invalid_rect: WEL_RECT)
-- Wm_paint 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.
require
paint_dc_not_void: paint_dc /= void
paint_dc_exists: paint_dc.exists
invalid_rect_not_void: invalid_rect /= void

on_vertical_scroll_control (scroll_code, position: INTEGER; bar: WEL_BAR)
-- Vertical scroll is received with a
-- `scroll_code' type. See class WEL_SB_CONSTANTS
-- for `scroll_code' values. `position' is the new
-- scrollbox position. `bar' indicates the scrollbar
-- or trackbar control activated.
require
exists: exists
bar_not_void: bar /= void
bar_exists: bar.exists

on_horizontal_scroll_control (scroll_code, position: INTEGER; bar: WEL_BAR)
-- Horizontal scroll is received with a
-- `scroll_code' type. See class WEL_SB_CONSTANTS
-- for `scroll_code' values. `position' is the new
-- scrollbox position. `bar' indicates the scroll bar
-- or track bar control activated.
require
exists: exists
bar_not_void: bar /= void
bar_exists: bar.exists

on_vertical_scroll (scroll_code, position: INTEGER)
-- Vertical scroll is received with a
-- `scroll_code' type. See class WEL_SB_CONSTANTS for
-- `scroll_code' values. `position' is the new
-- scrollbox position.
require
exists: exists

on_horizontal_scroll (scroll_code, position: INTEGER)
-- Horizontal scroll is received with a
-- `scroll_code' type. See class WEL_SB_CONSTANTS for
-- `scroll_code' values. `position' is the new
-- scrollbox position.
require
exists: exists

on_draw_item (control_id: INTEGER; draw_item: WEL_DRAW_ITEM_STRUCT)
-- Wm_drawitem message.
-- A owner-draw control identified by `control_id' has
-- been changed and must be drawn. `draw_item' contains
-- information about the item to be drawn and the type
-- of drawing required.
require
exists: exists
draw_item_not_void: draw_item /= void

on_get_min_max_info (min_max_info: WEL_MIN_MAX_INFO)
-- Wm_getminmaxinfo message.
-- The size or position of the window is about to
-- change. An application can change `min_max_info' to
-- override the window's default maximized size and
-- position, or its default minimum or maximum tracking
-- size.
require
exists: exists
min_max_info_not_void: min_max_info /= void

on_window_pos_changed (window_pos: WEL_WINDOW_POS)
-- Wm_windowpschanged message.
-- This message is sent to a window whose size,
-- position, or place in the Z order has changed as a
-- result of a call to `move' or `resize'.
require
exists: exists
window_pos_not_void: window_pos /= void

on_window_pos_changing (window_pos: WEL_WINDOW_POS)
-- Wm_windowposchanging
-- This message is sent to a window whose size,
-- position or place in the Z order is about to change
-- as a result of a call to `move', `resize'.
-- `window_pos' can be changed to override the default
-- values.
require
exists: exists
window_pos_not_void: window_pos /= void

on_palette_is_changing (window: WEL_WINDOW)
-- Wm_paletteischanging.
-- Inform that an application is going to realize its
-- logical palette. `window' identifies the window
-- that is going to realize its logical palette.
require
exists: exists

on_palette_changed (window: WEL_WINDOW)
-- Wm_palettechanged message.
-- This message is sent after the window with the
-- keyboard focus has realized its logical palette.
-- `window' identifies the window that caused the
-- system palette to change.
require
exists: exists

on_query_new_palette
-- Wm_querrynewpalette message.
-- Inform an application that is about to receive the
-- keyboard focus, giving the application an opportunity
-- to realize its logical palette when it receives the
-- focus. If the window realizes its logical palette,
-- it must return True; otherwise it must return False.
-- (False by default)
require
exists: exists
end -- class WEL_COMPOSITE_WINDOW

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES