INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Contains information about the window class. ", "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_WND_CLASS
inherit

WEL_STRUCTURE
rename
make as structure_make
end
creation

make
feature {NONE}-- Initialization

make (a_class_name: STRING)
-- Make a window class named `a_class_name'.
require
class_name_not_void: a_class_name /= void
class_name_not_empty: not a_class_name.is_empty
ensure
style_set: style = 0
window_procedure_unset: not window_procedure_set
class_extra_set: class_extra = 0
window_extra_set: window_extra = 0
instance_set: instance.item = main_args.current_instance.item
icon_unset: not icon_set
cursor_unset: not cursor_set
background_unset: not background_set
menu_nameunset: not menu_name_set
class_name_set: class_name.is_equal (a_class_name)
feature -- Access

class_name: STRING
-- Class name
ensure
result_not_void: Result /= void
result_not_empty: not Result.is_empty

menu_name: STRING
-- Menu name to load from the resource
require
menu_name_set: menu_name_set
ensure
result_not_void: Result /= void

style: INTEGER
-- Class style

window_procedure: POINTER
-- Window procedure to call
require
window_procedure_set: window_procedure_set
ensure
Result /= default_pointer

class_extra: INTEGER
-- Class extra information size
ensure
positive_result: Result >= 0

window_extra: INTEGER
-- Window extra information size
ensure
positive_result: Result >= 0

instance: WEL_INSTANCE
-- Instance of the class.
require
instance_set: instance_set
ensure
result_not_void: Result /= void

icon: WEL_ICON
-- Icon to draw when the window is minimized.
require
icon_set: icon_set
ensure
result_not_void: Result /= void
result_exists: Result.exists

cursor: WEL_CURSOR
-- Cursor to use when the mouse is into the window.
require
cursor_set: cursor_set
ensure
result_not_void: Result /= void
result_exists: Result.exists

background: WEL_BRUSH
-- Background color of the window
require
background_set: background_set
ensure
result_not_void: Result /= void
result_exists: Result.exists
feature -- Element change

set_style (a_style: INTEGER)
-- Set `style' with `a_style'.
ensure
style = a_style

set_window_extra (a_window_extra: INTEGER)
-- Set `window_extra' with `a_window_extra'.
require
positive_extra: a_window_extra >= 0
ensure
window_extra = a_window_extra

set_instance (an_instance: WEL_INSTANCE)
-- Set `instance' with `an_instance'.
require
an_instance_not_void: an_instance /= void
an_instance_exists: an_instance.exists
ensure
instance_equal: instance.item = an_instance.item

set_class_extra (a_class_extra: INTEGER)
-- Set `class_extra' with `a_class_extra'.
require
positive_extra: a_class_extra >= 0
ensure
class_extra = a_class_extra

set_window_procedure (a_window_procedure: POINTER)
-- Set `window_procedure' with `a_window_procedure'.
ensure
window_procedure_equal: window_procedure = a_window_procedure

set_icon (an_icon: WEL_ICON)
-- Set `icon' with `an_icon'.
require
an_icon_not_void: an_icon /= void
an_icon_exists: an_icon.exists
ensure
icon_equal: icon.item = an_icon.item

set_cursor (a_cursor: WEL_CURSOR)
-- Set `cursor' with `a_cursor'.
require
a_cursor_not_void: a_cursor /= void
a_cursor_exists: a_cursor.exists
ensure
cursor_equal: cursor.item = a_cursor.item

set_background (a_background: WEL_BRUSH)
-- Set `background' with `a_background'.
require
a_background_not_void: a_background /= void
a_background_exists: a_background.exists
ensure
background_equal: background.item = a_background.item

set_class_name (a_class_name: STRING)
-- Set `class_name' with `a_class_name'.
require
a_class_name_valid: a_class_name /= void
a_class_name_not_empty: not a_class_name.is_empty
ensure
class_name_set: class_name.is_equal (a_class_name)

set_menu_name (a_menu_name: STRING)
-- Set `menu_name' with `a_menu_name'.
require
a_menu_name_valid: a_menu_name /= void
ensure
menu_name_equal: menu_name.is_equal (a_menu_name)

unset_window_procedure
-- Unset the window procedure (becomes null).
ensure
window_procedure_unset: not window_procedure_set

unset_icon
-- Unset the icon (becomes null).
ensure
icon_unset: not icon_set

unset_cursor
-- Unset the cursor (becomes null).
ensure
cursor_unset: not cursor_set

unset_background
-- Unset the background (becomes null).
ensure
background_unset: not background_set

unset_menu_name
-- Unset the menu (becomes null).
ensure
menu_name_unset: not menu_name_set
feature -- Status report

registered: BOOLEAN
-- Is the class registered?

icon_set: BOOLEAN
-- Is the icon set?

cursor_set: BOOLEAN
-- Is the cursor set?

background_set: BOOLEAN
-- Is the background set?

menu_name_set: BOOLEAN
-- Is the menu name set?

window_procedure_set: BOOLEAN
-- Is the window procedure set?

instance_set: BOOLEAN
-- Is the instance set?
feature -- Basic operations

register
-- Register the window class.
require
not_registered: not registered
ensure
registered: registered

unregister
-- Unregister the window class.
-- All windows using this class must be destroyed.
require
registered: registered
ensure
no_registered: not registered
feature -- Measurement

structure_size: INTEGER
-- Size to allocate (in bytes)
end -- class WEL_WND_CLASS

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES