INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "A window containing one or several parts which can ", "display text or can be owner drawn. ", "note: The common controls dll (WEL_COMMON_CONTROLS_DLL) ", " needs to be loaded to use this control. ", "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
class WEL_STATUS_WINDOW
inherit

WEL_CONTROL
redefine
set_text,
text,
text_length
end

WEL_STATUS_WINDOW_CONSTANTS
export
{NONE}
all
end

WEL_SBT_CONSTANTS
export
{NONE}
all
end

WEL_WORD_OPERATIONS
export
{NONE}
all
end
creation

make,
make_by_id
feature {NONE}-- Initialization

make (a_parent: WEL_WINDOW; an_id: INTEGER)
-- Create a status window with `a_parent' as parent and
-- `an_id' as id.
require
a_parent_not_void: a_parent /= void
a_parent_exists: a_parent.exists
ensure
exists: exists
parent_set: parent = a_parent
id_set: id = an_id
feature -- Status report

number_of_parts: INTEGER
-- Current number of parts
require
exists: exists
ensure
positive_result: Result > 0

text_for_part (index: INTEGER): STRING
-- Text for the part identified by the zero-based
-- `index'.
require
exists: exists
index_small_enough: index < number_of_parts
index_large_enough: index >= 0
ensure
result_not_void: Result /= void
consistent_count: Result.count = text_length_for_part (index)

text_length_for_part (index: INTEGER): INTEGER
-- Length of the text in the part identified by the
-- zero-based `index'.
require
exists: exists
index_small_enough: index < number_of_parts
index_large_enough: index >= 0
ensure
positive_result: Result >= 0

text_style_for_part (index: INTEGER): INTEGER
-- Style of the text in the part identified by the
-- zero-based `index'
require
exists: exists
index_small_enough: index < number_of_parts
index_large_enough: index >= 0
ensure
positive_result: Result >= 0

rect_for_part (index: INTEGER): WEL_RECT
-- Rectangle for a part identified by the
-- zero-based `index'.
require
exists: exists
index_small_enough: index < number_of_parts
index_large_enough: index >= 0
ensure
result_not_void: Result /= void

edges: ARRAY [INTEGER]
-- Zero-based integer array which contains
-- all the edges currently present.
require
exists: exists
ensure
result_not_void: Result /= void
consistent_count: Result.count = number_of_parts

horizontal_border_width: INTEGER
-- Width of the horizontal border
require
exists: exists
ensure
positive_result: Result > 0

vertical_border_width: INTEGER
-- Width of the vertical border
require
exists: exists
ensure
positive_result: Result > 0

width_between_rectangles: INTEGER
-- Width between the rectangles
require
exists: exists
ensure
positive_result: Result > 0
feature -- Basic operations

reposition
-- Reposition the window according to the parent.
-- This function needs to be called in the
-- `on_size' routine of the parent.
require
exists: exists
feature -- Element change

set_simple_mode
-- Switch to simple mode.
require
exists: exists

set_multiple_mode
-- Switch to multiple parts mode.
require
exists: exists

set_simple_text (a_text: STRING)
-- Set `a_text' for the simple mode
require
exists: exists
a_text_not_void: a_text /= void

set_simple_text_with_style (a_text: STRING; a_style: INTEGER)
-- Set the text `a_text' with style `a_style' for a part
-- identified by `Simple_part'.
-- See class WEL_SBT_CONSTANTS for `a_style' values.
require
exists: exists
a_text_not_void: a_text /= void

set_parts (a_edges: ARRAY [INTEGER])
-- Set the parts for a multiple parts status window
-- according to the edged defined in `a_edges'.
-- If an element is -1, the position of the right edge
-- for that part extends to the right edge of the
-- window.
require
exists: exists
a_edges_not_void: a_edges /= void
count_large_enough: a_edges.count > 0
count_small_enough: a_edges.count < 255
ensure
edges_set: edges.is_equal (a_edges)

set_text_part (index: INTEGER; a_text: STRING)
-- Set the text for a part identified by the
-- zero-based `index'.
require
exists: exists
index_small_enough: index < number_of_parts
index_large_enough: index >= 0
a_text_not_void: a_text /= void
ensure
text_set: a_text.is_equal (text_for_part (index))

set_text_part_with_style (index: INTEGER; a_text: STRING; a_style: INTEGER)
-- Set the text for a part identified by the
-- zero-based `index'.
-- See class WEL_SBT_CONSTANTS for `a_style' values.
require
exists: exists
index_small_enough: index < number_of_parts
index_large_enough: index >= 0
a_text_not_void: a_text /= void
ensure
text_set: a_text.is_equal (text_for_part (index))
style_is_set: a_style = text_style_for_part (index)

set_part_owner_drawn (index, value, a_style: INTEGER)
-- Set a part identified by the zero-based `index' to
-- be owner drawn using `a_style' as extended style.
-- `value' will be present in the `on_draw_item'
-- routine of the `parent' as `item_data' in class
-- WEL_DRAW_ITEM_STRUCT.
-- See class WEL_SBT_CONSTANTS for `a_style' values.
require
exists: exists
index_small_enough: index < number_of_parts
index_large_enough: index >= 0
ensure
style_is_set: text_style_for_part (index) = sbt_ownerdraw + a_style

set_minimum_height (a_height: INTEGER)
-- Set the minimun height with `a_height' in pixels.
-- To let the change take effect, call
-- the `reposition' procedure.
require
exists: exists
minimum_height: a_height >= 2 * vertical_border_width
end -- class WEL_STATUS_WINDOW

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES