home
wiki
classes/clusters list
class information
+
Point of view
LAYOUT
ANY
CONTAINER
LAYOUT
INTERNALS_HANDLER
All features
class LABEL
Summary
top
LABEL
is a widget to draw (unicode) string. See class
TEXT_FIELD
if you want to allow the user to edit the string.
Direct parents
inherit list:
DRAWABLE_HANDLER
,
GRAPHIC
,
WIDGET
Known children
inherit list:
ALIGNABLE_LABEL
,
COMBO_HANDLE
,
LABEL_ALIGNABLE
Class invariant
top
text
/= Void
private_copy_is_read_only:
not
text_changed_from_outside
(
text
)
std_width > 0
std_height > 0
Overview
top
creation features
make
(s:
UNICODE_STRING
)
s
is copied, future changes by the caller has no influence.
exported features
width
:
INTEGER_32
height
:
INTEGER_32
min_width
:
INTEGER_32
min_height
:
INTEGER_32
std_width
:
INTEGER_32
std_height
:
INTEGER_32
font
:
BASIC_FONT
style
:
DRAW_STYLE
text
:
UNICODE_STRING
This access to the current text value for this label is READ ONLY.
set_min_width
(w:
INTEGER_32
)
Allow to chose the width your label may be shrinked to.
set_min_height
(h:
INTEGER_32
)
Allow to chose the height your label may be shrinked to.
set_text
(s:
UNICODE_STRING
)
Allow to change the label's text.
set_with_integer
(i:
INTEGER_64
)
Set the label's text with value of
i
(as decimal).
append_integer
(i:
INTEGER_64
)
Append the value of
i
(as decimal) to the label's text.
set_style
(s:
DRAW_STYLE
)
Change the style used to draw the line.
reset_default_style
The renderer will be used to draw the line.
text_changed_from_outside
(s:
UNICODE_STRING
):
BOOLEAN
This function check that text didn't change.
expose_paint
Apply paint with limited depth to the first window.
set_geometry
(x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
)
parent
:
CONTAINER
pos_x
:
INTEGER_32
pos_y
:
INTEGER_32
x_shrink_allowed
:
BOOLEAN
x_expand_allowed
:
BOOLEAN
y_shrink_allowed
:
BOOLEAN
y_expand_allowed
:
BOOLEAN
valid_width
(w:
INTEGER_32
):
BOOLEAN
valid_height
(h:
INTEGER_32
):
BOOLEAN
area
:
RECT
root_area
:
RECT
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
state
:
INTEGER_32
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
width
:
INTEGER_32
writable attribute
top
height
:
INTEGER_32
writable attribute
top
min_width
:
INTEGER_32
writable attribute
top
min_height
:
INTEGER_32
writable attribute
top
std_width
:
INTEGER_32
writable attribute
top
std_height
:
INTEGER_32
writable attribute
top
font
:
BASIC_FONT
writable attribute
top
style
:
DRAW_STYLE
writable attribute
top
text
:
UNICODE_STRING
writable attribute
top
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_32
)
effective procedure
top
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_32
)
effective procedure
top
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
)
effective procedure
top
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
)
effective procedure
top
Set the label's text with value of
i
(as decimal).
require
private_copy_is_read_only:
not
text_changed_from_outside
("")
ensure
private_copy_is_read_only:
not
text_changed_from_outside
(
text
)
append_integer
(i:
INTEGER_64
)
effective procedure
top
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
)
effective procedure
top
Change the style used to draw the line.
NOTE: The screen is not updated. --TODO: change this ?
ensure
style
= s
reset_default_style
effective procedure
top
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
effective function
top
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.
expose_paint
effective procedure
top
Apply paint with limited depth 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:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
)
effective procedure
top
require
x >= 0
y >= 0
w >= min_width
h >= min_height
ensure
width = w
height = h
parent
:
CONTAINER
writable attribute
top
pos_x
:
INTEGER_32
writable attribute
top
pos_y
:
INTEGER_32
writable attribute
top
x_shrink_allowed
:
BOOLEAN
writable attribute
top
x_expand_allowed
:
BOOLEAN
writable attribute
top
y_shrink_allowed
:
BOOLEAN
writable attribute
top
y_expand_allowed
:
BOOLEAN
writable attribute
top
valid_width
(w:
INTEGER_32
):
BOOLEAN
effective function
top
valid_height
(h:
INTEGER_32
):
BOOLEAN
effective function
top
area
:
RECT
effective function
top
root_area
:
RECT
effective function
top
set_x_shrink
(b:
BOOLEAN
)
effective procedure
top
set_x_expand
(b:
BOOLEAN
)
effective procedure
top
set_y_shrink
(b:
BOOLEAN
)
effective procedure
top
set_y_expand
(b:
BOOLEAN
)
effective procedure
top
set_shrink
(b:
BOOLEAN
)
effective procedure
top
change both x and y shrink state
set_expand
(b:
BOOLEAN
)
effective procedure
top
change both x and y expand state
state
:
INTEGER_32
writable attribute
top
use values from
STATE_CONSTANTS
is_state_normal
:
BOOLEAN
frozen
effective function
top
is_state_active
:
BOOLEAN
frozen
effective function
top
is_state_prelight
:
BOOLEAN
frozen
effective function
top
is_state_selected
:
BOOLEAN
frozen
effective function
top
is_state_insensitive
:
BOOLEAN
frozen
effective function
top