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

em.widget.border

Class EM_NAMED_BORDER


Direct ancestors

EM_BORDER, EM_SHARED_STANDARD_FONTS, EM_SHARED_THEME

Creation

Features

Invariants

indexing

description

Border which displays a title at the top.

date

$Date: 2005/10/23 11:12:24 $

revision

$Revision: 1.5 $

class

EM_NAMED_BORDER

inherit

EM_BORDER

create

make_from_text (a_text: like text)

-- Initialise border with a_text.

require
a_text_not_void: a_text /= Void
ensure
text_set: text = a_text

feature -- Access

bottom: INTEGER

-- Bottom size of border

-- (From EM_BORDER)

font: EM_FONT

-- Text font

inner_color: EM_COLOR

-- Color at bottom and right

left: INTEGER

-- Left size of border

-- (From EM_BORDER)

outer_color: EM_COLOR

-- Color at top and left

right: INTEGER

-- Right size of border

-- (From EM_BORDER)

text: STRING

-- Text on border

text_color: EM_COLOR

-- Text color

top: INTEGER

-- Top size of border

-- (From EM_BORDER)

feature -- Element change

set_font (a_font: like font)

-- Set font to a_font.

require
a_font_not_void: a_font /= Void
ensure
font_set: font = a_font
set_inner_color (a_color: EM_COLOR)

-- Set inner_color to a_color.

require
a_color_not_void: a_color /= Void
ensure
inner_color_set: inner_color = a_color
set_outer_color (a_color: EM_COLOR)

-- Set outer_color to a_color.

require
a_color_not_void: a_color /= Void
ensure
outer_color_set: outer_color = a_color
set_text (a_text: like text)

-- Set text to a_text.

require
a_text_not_void: a_text /= Void
ensure
text_set: text = a_text
set_text_color (a_color: EM_COLOR)

-- Set text_color to a_color.

require
a_color_not_void: a_color /= Void
ensure
text_color_set: text_color = a_color

feature -- Drawing

draw_on (widget: EM_WIDGET)

-- Draw border on widget.

-- (From EM_BORDER)

require
a_widget_not_void: a_widget /= Void

invariant

-- From EM_BORDER
non_negative_size: top >= 0 and left >= 0 and right >= 0 and bottom >= 0

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

end