class interface COMBO_HANDLE
creation
default_create
-- Default creation method. It is used when no creation
-- method is specified if allowed. Note it may be renamed.
feature(s) from STATE
state: INTEGER
-- use values from STATE_CONSTANTS
is_state_normal: BOOLEAN
is_state_active: BOOLEAN
is_state_prelight: BOOLEAN
is_state_selected: BOOLEAN
is_state_insensitive: BOOLEAN
feature(s) from STATE
set_state_normal
set_state_active
set_state_prelight
set_state_selected
set_state_insensitive
set_state (n: INTEGER)
renderer: RENDERER
feature(s) from WIDGET
parent: CONTAINER
pos_x: INTEGER
pos_y: INTEGER
x_shrink_allowed: BOOLEAN
x_expand_allowed: BOOLEAN
y_shrink_allowed: BOOLEAN
y_expand_allowed: BOOLEAN
min_width: INTEGER
min_height: INTEGER
std_width: INTEGER
std_height: INTEGER
width: INTEGER
height: INTEGER
valid_width (w: INTEGER): BOOLEAN
valid_height (h: INTEGER): BOOLEAN
area: RECT
root_area: RECT
computing_size: BOOLEAN
set_x_shrink (b: BOOLEAN)
set_x_expand (b: BOOLEAN)
set_y_shrink (b: BOOLEAN)
set_y_expand (b: BOOLEAN)
set_shrink (b: BOOLEAN)
-- change both x and y shrink state
set_expand (b: BOOLEAN)
-- change both x and y expand state
feature(s) from WIDGET
expose_paint
-- expose_paint paint with depth limited to the first window
-- Containers have to propagate, with special
-- attention to windows where expose_paint do nothing.
require
private_copy_is_read_only: not text_changed_from_outside(text)
set_geometry (x, y, w, h: INTEGER)
require
x >= 0;
y >= 0;
w >= min_width;
h >= min_height
ensure
width = w;
height = h
feature(s) from WIDGET
set_parent (p: CONTAINER)
require
p = Void implies parent /= Void;
p /= Void implies parent = Void;
p /= Void implies p.has_child(Current)
ensure
parent = p
feature(s) from WIDGET
resize (w, h: INTEGER)
require
w >= min_width;
h >= min_height
ensure
width = w;
height = h
feature(s) from COLOR_LIST
white_color: COLOR
black_color: COLOR
dim_grey_color: COLOR
dark_grey_color: COLOR
grey_color: COLOR
light_grey_color: COLOR
dark_blue_color: COLOR
medium_blue_color: COLOR
blue_color: COLOR
royal_blue_color: COLOR
deep_sky_blue_color: COLOR
sky_blue_color: COLOR
light_sky_blue_color: COLOR
steel_blue_color: COLOR
light_steel_blue_color: COLOR
light_blue_color: COLOR
pale_turquoise_color: COLOR
dark_turquoise_color: COLOR
medium_turquoise_color: COLOR
turquoise_color: COLOR
dark_cyan_color: COLOR
cyan_color: COLOR
light_cyan_color: COLOR
dark_green_color: COLOR
green_color: COLOR
light_green_color: COLOR
yellow_green_color: COLOR
dark_khaki_color: COLOR
khaki_color: COLOR
yellow_color: COLOR
light_yellow_color: COLOR
gold_color: COLOR
beige_color: COLOR
chocolate_color: COLOR
firebrick_color: COLOR
brown_color: COLOR
dark_salmon_color: COLOR
salmon_color: COLOR
light_salmon_color: COLOR
dark_orange_color: COLOR
orange_color: COLOR
orange_red_color: COLOR
dark_red_color: COLOR
red_color: COLOR
hot_pink_color: COLOR
deep_pink_color: COLOR
pink_color: COLOR
light_pink_color: COLOR
pale_violet_red_color: COLOR
maroon_color: COLOR
medium_violet_red_color: COLOR
violet_red_color: COLOR
violet_color: COLOR
dark_magenta_color: COLOR
magenta_color: COLOR
dark_violet_color: COLOR
blue_violet_color: COLOR
medium_purple_color: COLOR
purple_color: COLOR
feature(s) from STATE_CONSTANTS
state_normal: INTEGER
state_active: INTEGER
state_prelight: INTEGER
state_selected: INTEGER
state_insensitive: INTEGER
feature(s) from ALIGNMENT_CONSTANTS
center_alignment: ALIGNMENT
left_alignment: ALIGNMENT
right_alignment: ALIGNMENT
top_alignment: ALIGNMENT
down_alignment: ALIGNMENT
top_left_alignment: ALIGNMENT
top_right_alignment: ALIGNMENT
down_right_alignment: ALIGNMENT
down_left_alignment: ALIGNMENT
feature(s) from GRAPHIC
vision: VISION
font_manager: FONT_MANAGER
default_font: BASIC_FONT
feature(s) from LABEL
label_make (s: UNICODE_STRING)
-- s is copied, future changes by the caller has no influence.
-- Local copy is accessible as READ ONLY through text
require
s /= Void
feature(s) from LABEL
font: BASIC_FONT
style: DRAW_STYLE
text: UNICODE_STRING
-- This access to the current text value for this label is READ ONLY.
-- You have to never change this text, the label need it to
-- refresh the screen.
set_min_width (w: INTEGER)
-- Allow to chose the width your label may be shrinked to.
-- Don't forget to set x_shrink_allowed to this label and
-- upper containers.
-- set_text may change this value if needed.
require
w <= std_width
set_min_height (h: INTEGER)
-- Allow to chose the height your label may be shrinked to.
-- Don't forget to set y_shrink_allowed to this label and
-- upper containers.
require
h <= std_height
set_text (s: UNICODE_STRING)
-- Allow to change the label's text.
-- s is copied, future changes by the caller has no influence.
-- Local copy is accessible as READ ONLY through text
require
s /= Void;
private_copy_is_read_only: not text_changed_from_outside(s)
ensure
private_copy_is_read_only: not text_changed_from_outside(text)
set_with_integer (i: INTEGER_64)
-- Set the label's text with value of i (as decimal).
require
private_copy_is_read_only: not text_changed_from_outside(once "")
ensure
private_copy_is_read_only: not text_changed_from_outside(text)
append_integer (i: INTEGER_64)
-- Append the value of i (as decimal) to the label's text.
require
private_copy_is_read_only: not text_changed_from_outside(i.to_unicode_string)
ensure
private_copy_is_read_only: not text_changed_from_outside(text)
set_style (s: DRAW_STYLE)
-- Change the style used to draw the line.
-- NOTE: The screen is not updated. --TODO: change this ?
ensure
style = s
reset_default_style
-- The renderer will be used to draw the line.
-- NOTE: The screen is not updated. --TODO: change this ?
text_changed_from_outside (s: UNICODE_STRING): BOOLEAN
-- This function check that text didn't change.
-- This function has not to be used externally, it's only
-- used for assertion.
-- s is the future value for the text.
feature(s) from LABEL
internal_text_copy: UNICODE_STRING
-- This attribute is only used if compiled with check (i.e. all
-- mode except -boost and -no_check)
feature(s) from COMBO_HANDLE
default_create
-- Default creation method. It is used when no creation
-- method is specified if allowed. Note it may be renamed.
invariant
text /= Void;
private_copy_is_read_only: not text_changed_from_outside(text);
width >= min_width or computing_size;
height >= min_height or computing_size;
std_width > 0;
std_height > 0;
(not x_shrink_allowed implies width >= std_width) or computing_size;
(not x_expand_allowed implies width <= std_width) or computing_size;
(not y_shrink_allowed implies height >= std_height) or computing_size;
(not y_expand_allowed implies height <= std_height) or computing_size;
end of COMBO_HANDLE