Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

em.widget.delegates.basic_delegates

Class EM_BASIC_TEXTAREA_DELEGATE


Direct ancestors

EM_TEXTBOX_DELEGATE

Known direct descendants

EM_ECLIPSE_TEXTAREA_DELEGATE

Features

Invariants

indexing

description

Basic delegate of an EM_TEXTAREA.

date

$Date: 2005/10/23 11:16:21 $

revision

$Revision: 1.4 $

class

EM_BASIC_TEXTAREA_DELEGATE

inherit

EM_TEXTBOX_DELEGATE

feature -- Initialisation

install (textarea: EM_TEXTAREA)

-- Install style on textarea.
-- Set up all default values for background, border, font and colors.

-- (From EM_WIDGET_DELEGATE)

require
widget_not_void: widget /= Void
install_surface (widget: EM_WIDGET)

-- Install style on widgets surface
-- This will be called for every resize of the widget.

-- (From EM_WIDGET_DELEGATE)

require
a_widget_not_void: widget /= Void

feature -- Measurement

contains (widget: EM_WIDGET; a_x, a_y: INTEGER): BOOLEAN

-- Does widget contain a_x a_y.

-- (From EM_WIDGET_DELEGATE)

require
widget_not_void: widget /= Void
a_x_in_bounds: 0 <= a_x and a_x <= widget.width
a_y_in_bounds: 0 <= a_y and a_y <= widget.height
optimal_height (textarea: EM_TEXTAREA): INTEGER

-- Optimal height of textarea

-- (From EM_WIDGET_DELEGATE)

require
widget_not_void: widget /= Void
ensure
result_not_negative: Result >= 0
optimal_width (textarea: EM_TEXTAREA): INTEGER

-- Optimal width of textarea

-- (From EM_WIDGET_DELEGATE)

require
widget_not_void: widget /= Void
ensure
result_not_negative: Result >= 0

feature -- Basic operations

position_to_text_index (textarea: EM_TEXTAREA; a_x, a_y: INTEGER): INTEGER

-- Index in string at position a_x a_y.

-- (From EM_TEXTBOX_DELEGATE)

require
textbox_not_void: textbox /= Void

feature -- Drawing

draw_body (textarea: EM_TEXTAREA)

-- Draw body of textarea.

-- (From EM_WIDGET_DELEGATE)

require
widget_not_void: widget /= Void

invariant


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

end