INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Abstract notions of a window. ", "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-2001 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_WINDOW
inherit

WEL_ANY
redefine
exists
end

WEL_WINDOW_MANAGER
export
{NONE}
all
undefine
is_equal
end

WEL_SYSTEM_METRICS
export
{NONE}
all
end

WEL_WORD_OPERATIONS
export
{NONE}
all
end

WEL_BIT_OPERATIONS
export
{NONE}
all
end

WEL_SB_CONSTANTS
export
{NONE}
all
end

WEL_WM_CONSTANTS
export
{NONE}
all
end

WEL_WS_CONSTANTS
export
{NONE}
all
end

WEL_GWL_CONSTANTS
export
{NONE}
all
end

WEL_SWP_CONSTANTS
export
{NONE}
all
end

WEL_SW_CONSTANTS
export
{NONE}
all
end

WEL_MB_CONSTANTS
export
{NONE}
all
end

WEL_ID_CONSTANTS
export
{NONE}
all
end

WEL_HWND_CONSTANTS
export
{NONE}
all
{ANY}
valid_hwnd_constant
end

WAPI_ATOMS
end
feature -- Access

parent: WEL_WINDOW

commands: WEL_COMMAND_MANAGER
feature -- Status report

exists: BOOLEAN

default_processing_enabled: BOOLEAN
-- Is the default window processing enabled?
-- If True (by default) the standard window
-- procedure will be called. Otherwise, the standard
-- window procedure will not be called and the
-- normal behavior will not occur.

enabled: BOOLEAN
-- Is the window enabled for mouse and keyboard input?
require
exists: exists

shown: BOOLEAN
-- Is the window shown?
require
exists: exists

minimized: BOOLEAN
-- Is the window minimized?
require
exists: exists

maximized: BOOLEAN
-- Is the window maximized?
require
exists: exists

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

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

window_captured: BOOLEAN
-- Has a window been captured?

has_focus: BOOLEAN
-- Does this window have the focus?
require
exists: exists

has_capture: BOOLEAN
-- Does this window have the capture?
require
exists: exists

has_vertical_scroll_bar: BOOLEAN
-- Does this window have a vertical scroll bar?
require
exists: exists

has_horizontal_scroll_bar: BOOLEAN
-- Does this window have a horizontal scroll bar?
require
exists: exists

x: INTEGER
-- Window x position
require
exists: exists
ensure
parent = void implies Result = absolute_x

y: INTEGER
-- Window y position
require
exists: exists
ensure
parent = void implies Result = absolute_y

width: INTEGER
-- Window width
require
exists: exists

height: INTEGER
-- Window height
require
exists: exists

absolute_x: INTEGER
-- Absolute x position
require
exists: exists
ensure
Result = window_rect.x

absolute_y: INTEGER
-- Absolute y position
require
exists: exists
ensure
Result = window_rect.y

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

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

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

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

client_rect: WEL_RECT
-- Client rectangle
require
exists: exists
ensure
result_not_void: Result /= void

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

text: STRING
-- Window text
require
exists: exists
ensure
result_not_void: Result /= void

text_length: INTEGER
-- Text length
require
exists: exists
ensure
positive_result: Result >= 0

placement: WEL_WINDOW_PLACEMENT
-- Window placement information
require
exists: exists
ensure
result_not_void: Result /= void

style: INTEGER
-- Window style
require
exists: exists

commands_enabled: BOOLEAN
-- Is the commands execution enabled?

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

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

command_argument (message: INTEGER): ANY
-- Command argument associated to `message'
require
positive_message: message >= 0
command_exists: command_exists (message)
feature -- Status setting

enable_commands
-- Enable commands execution.
ensure
commands_enabled: commands_enabled

disable_commands
-- Disable commands execution.
ensure
commands_disabled: not 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.
ensure
default_processing_enabled: default_processing_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.
ensure
default_processing_disabled: not default_processing_enabled

enable
-- Enable mouse and keyboard input.
require
exists: exists
ensure
enabled: enabled

disable
-- Disable mouse and keyboard input
require
exists: exists
ensure
disabled: not enabled

show
-- Show the window
require
exists: exists

hide
-- Hide the window
require
exists: exists
ensure
hidden: not shown

minimize
-- Minimize the window and display its icon
require
exists: exists
ensure
minimized: minimized

maximize
-- Maximize the window
require
exists: exists
ensure
maximized: maximized

restore
-- Restore the window to its
-- original size and position after
-- `minimize' or `maximize'
require
exists: exists

set_focus
-- Set the focus to `Current'
require
exists: exists

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.
require
exists: exists
ensure
has_capture: has_capture

release_capture
-- Release the mouse capture after a call
-- to `set_capture'.
require
exists: exists
ensure
not_has_capture: not has_capture

set_style (a_style: INTEGER)
-- Set `style' with `a_style'.
require
exists: exists
ensure
style_set: style = a_style
feature -- Element change

set_text (a_text: STRING)
-- Set the window text
require
exists: exists
a_text_not_void: a_text /= void
ensure
text_set: text.is_equal (a_text)

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

set_x (a_x: INTEGER)
-- Set `x' with `a_x'
require
exists: exists

set_y (a_y: INTEGER)
-- Set `y' with `a_y'
require
exists: exists

set_width (a_width: INTEGER)
-- Set `width' with `a_width'
require
exists: exists

set_height (a_height: INTEGER)
-- Set `height' with `a_height'
require
exists: exists

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'.
require
exists: exists
positive_timer_id: timer_id > 0
positive_time_out: time_out > 0
feature -- Basic operations

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

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

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

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'.
require
exists: exists

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

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

set_z_order (z_order: INTEGER)
-- Set the z-order of the window.
-- See class WEL_HWND_CONSTANTS for `z_order' values.
require
exists: exists
valid_hwnd_constant: valid_hwnd_constant (z_order)

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

show_scroll_bars
-- Show the horizontal and vertical scroll bars.
require
exists: exists

show_vertical_scroll_bar
-- Show the vertical scroll bar.
require
exists: exists

show_horizontal_scroll_bar
-- Show the horizontal scroll bar.
require
exists: exists

hide_scroll_bars
-- Hide the horizontal and vertical scroll bars.
require
exists: exists

hide_vertical_scroll_bar
-- Hide the vertical scroll bar.
require
exists: exists

hide_horizontal_scroll_bar
-- Hide the horizontal scroll bar.
require
exists: exists

message_box (a_text, a_title: STRING; a_style: INTEGER): INTEGER
-- Show an information message box with `Current'
-- as parent with `a_text' and `a_title'.
-- See class WEL_MB_CONSTANTS for `a_style' value.
-- See class WEL_ID_CONSTANTS for the return value.
require
exists: exists
text_not_void: a_text /= void
title_not_void: a_title /= void

information_message_box (a_text, a_title: STRING)
-- Show an information message box with `Current'
-- as parent with `a_text' and `a_title'.
require
exists: exists
text_not_void: a_text /= void
title_not_void: a_title /= void

warning_message_box (a_text, a_title: STRING)
-- Show a warning message box with `Current'
-- as parent with `a_text' and `a_title'.
require
exists: exists
text_not_void: a_text /= void
title_not_void: a_title /= void

error_message_box (a_text: STRING)
-- Show an error message box with `Current' as
-- parent with `a_text' and error as title.
require
exists: exists
text_not_void: a_text /= void

question_message_box (a_text, a_title: STRING): BOOLEAN
-- Show a question message box with `Current'
-- as parent with `a_text' and `a_title'.
-- True is returned if the user answers yes, False
-- otherwise.
require
exists: exists
text_not_void: a_text /= void
title_not_void: a_title /= void

update
-- Update the client area by sending a Wm_paint message.
require
exists: exists

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

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

invalidate_rect (rect: WEL_RECT; erase_background: BOOLEAN)
-- Invalidate the area `rect' and erase
-- the background if `erase_background' is True.
require
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.
require
exists: exists
region_not_void: region /= void
region_exists: region.exists

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

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

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

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.
require
exists: 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.
require
exists: exists
help_file_not_void: help_file /= void
feature -- Removal

destroy
-- Destroy the window.
require
exists: exists
ensure
not_exists: not exists
feature -- Messages

on_size (size_type, a_width, a_height: INTEGER)
-- Wm_size message
-- See class WEL_SIZE_CONSTANTS for `size_type' value
require
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.
require
exists: exists

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

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

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

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

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

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

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

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

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

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

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

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

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

on_set_focus
-- Wm_setfocus message
require
exists: exists

on_kill_focus
-- Wm_killfocus message
require
exists: exists

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

on_show
-- Wm_showwindow message.
-- The window is being shown.
require
exists: exists

on_hide
-- Wm_showwindow message.
-- The window is being hidden.
require
exists: exists

on_destroy
-- Wm_destroy message.
-- The window is about to be destroyed.
require
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'.
require
exists: exists
positive_timer_id: timer_id > 0

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

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES