home
wiki
classes/clusters list
class information
+
Point of view
All features
ANY
ROOT_WINDOW
WINDOW
WIDGET
EXTENSION_DEVICE
DRAW_STYLE
DRAWABLE_HANDLER
VISION
DRAWABLE
CONTAINER
LAYOUT
INTERNALS_HANDLER
All features
class REPEAT_BUTTON
Summary
top
Direct parents
inherit list:
BUTTON
Class invariant
top
width >= 1
height >= 1
child /= Void
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
Overview
top
creation features
make
(p:
CONTAINER
)
with_label
(p:
CONTAINER
, text:
UNICODE_STRING
)
make_layout
(p:
CONTAINER
, lo:
LAYOUT
)
sub_window_create
(x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
, parent_window:
WINDOW
)
default_create
Default creation method.
features
make
(p:
CONTAINER
)
repeat
:
REPEAT_JOB
with_label
(p:
CONTAINER
, text:
UNICODE_STRING
)
layout
:
ROW_LAYOUT
set_state
(n:
INTEGER_32
)
update_decoration
vision
:
VISION
font_manager
:
FONT_MANAGER
default_font
:
BASIC_FONT
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
state_normal
:
INTEGER_32
state_active
:
INTEGER_32
state_prelight
:
INTEGER_32
state_selected
:
INTEGER_32
state_insensitive
:
INTEGER_32
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
make_layout
(p:
CONTAINER
, lo:
LAYOUT
)
sub_window_create
(x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
, parent_window:
WINDOW
)
default_init
set_parent
(p:
CONTAINER
)
set_background_color
(c:
COLOR
)
The color is copied, next changes to c won't change the background.
set_background_pixmap
(p:
PIXMAP
)
Call this function again if you modify the pixmap (copy may have been done)
map
unmap
mapped
:
BOOLEAN
Warning: this information is asynchronous
expose_event
clear_without_expose
clear the all the drawable area.
area
:
RECT
refresh
clear and update entire object (sub_window(s) are not updated).
clear
clear and update entire object (sub_window(s) are not updated).
as_x_root
(x:
INTEGER_32
):
INTEGER_32
TODO: add basic conversion to speed up
as_y_root
(y:
INTEGER_32
):
INTEGER_32
TODO: add basic conversion to speed up
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
)
Position may be negative (used for scrolling).
set_requisition
(min_w:
INTEGER_32
, min_h:
INTEGER_32
, std_w:
INTEGER_32
, std_h:
INTEGER_32
)
adjust_size
resize
(w:
INTEGER_32
, h:
INTEGER_32
)
Warning: do not redraw content if not window subtype
paint_decorations
(x:
INTEGER_32
, y:
INTEGER_32
)
resize_decorations
(w:
INTEGER_32
, h:
INTEGER_32
)
set_mapped
(b:
BOOLEAN
)
geometry_changed
(x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
)
dispatch
Should be called only from
set_geometry
and
set_requisition
.
basic_window_create
(x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
, parent_win:
POINTER
, decorate:
BOOLEAN
):
POINTER
basic_window_set_geometry
(win:
POINTER
, x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
)
basic_window_set_position
(win:
POINTER
, x:
INTEGER_32
, y:
INTEGER_32
)
basic_window_set_size
(win:
POINTER
, x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
)
basic_window_set_bg_color
(win:
POINTER
, color:
POINTER
)
basic_window_set_bg_pixmap
(win:
POINTER
, pixmap:
POINTER
)
basic_window_clear_no_expose
(win:
POINTER
)
basic_window_set_kbd_focus
(win:
POINTER
)
basic_window_map
(win:
POINTER
)
basic_window_unmap
(win:
POINTER
)
basic_window_get_drawing_widget
(w:
POINTER
):
POINTER
default_create
Default creation method.
container_init
width
:
INTEGER_32
height
:
INTEGER_32
min_width
:
INTEGER_32
min_height
:
INTEGER_32
std_width
:
INTEGER_32
std_height
:
INTEGER_32
child
:
FAST_ARRAY
[
WIDGET
]
layout_update_paused
:
BOOLEAN
TODO: suppress.
set_layout
(l:
LAYOUT
)
Change the layout for the container (layout choose children position and size).
layout_pause
TODO: remove when mapped ready
layout_continue
TODO: remove when mapped ready
child_attach
(w:
WIDGET
)
Add widget
w
in this container.
child_detach
(w:
WIDGET
)
Remove widget
w
from this container.
has_child
(w:
WIDGET
):
BOOLEAN
last_child
:
WIDGET
is_empty
:
BOOLEAN
clear_area
(x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
)
clear area and emit expose event (contents will be drawn) x and y are relative to current object
done
:
BOOLEAN
TODO: suppress.
child_requisition_changed
layout_ready
:
BOOLEAN
requisition_changed
:
BOOLEAN
invalidate_layout
computing_size
:
BOOLEAN
This is only used for invariant defined in
widget
.
basic_window_clear_area
(window:
POINTER
, x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
)
TODO: invalid for pixmap.
basic_window_clear_area_no_expose
(window:
POINTER
, x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
)
TODO: invalid for pixmap.
drawing_widget
:
POINTER
Because Windows can not paint on widgets like windows or bitmaps, it needs another object (Device Context) attached to the widget.
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
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
set_state_normal
set_state_active
set_state_prelight
set_state_selected
set_state_insensitive
renderer
:
RENDERER
hash_code
:
INTEGER_32
The hash-code value of
Current
.
is_equal
(other: REPEAT_BUTTON):
BOOLEAN
Is
other
attached to an object considered equal to current object?
widget
:
POINTER
widget identifier from the native graphic API.
when_left_down
(p:
PROCEDURE
[
TUPLE
])
when_left_down_signal
:
SIGNAL_0
when_left_up
(p:
PROCEDURE
[
TUPLE
])
when_left_up_signal
:
SIGNAL_0
when_middle_down
(p:
PROCEDURE
[
TUPLE
])
when_middle_down_signal
:
SIGNAL_0
when_middle_up
(p:
PROCEDURE
[
TUPLE
])
when_middle_up_signal
:
SIGNAL_0
when_right_down
(p:
PROCEDURE
[
TUPLE
])
when_right_down_signal
:
SIGNAL_0
when_right_up
(p:
PROCEDURE
[
TUPLE
])
when_right_up_signal
:
SIGNAL_0
when_wheel_up
(p:
PROCEDURE
[
TUPLE
])
when_wheel_up_signal
:
SIGNAL_0
when_wheel_down
(p:
PROCEDURE
[
TUPLE
])
when_wheel_down_signal
:
SIGNAL_0
when_pointer_move
(p:
PROCEDURE
[
TUPLE 2
[
INTEGER_32
,
INTEGER_32
]])
when_pointer_move_signal
:
SIGNAL_2
[
INTEGER_32
,
INTEGER_32
]
when_pointer_enter
(p:
PROCEDURE
[
TUPLE
])
when_pointer_enter_signal
:
SIGNAL_0
when_pointer_leave
(p:
PROCEDURE
[
TUPLE
])
when_pointer_leave_signal
:
SIGNAL_0
when_key_down
(p:
PROCEDURE
[
TUPLE
])
when_key_down_signal
:
SIGNAL_0
when_key_up
(p:
PROCEDURE
[
TUPLE
])
when_key_up_signal
:
SIGNAL_0
when_mapped
(p:
PROCEDURE
[
TUPLE
])
when_mapped_signal
:
SIGNAL_0
when_unmapped
(p:
PROCEDURE
[
TUPLE
])
when_unmapped_signal
:
SIGNAL_0
when_geometry_change
(p:
PROCEDURE
[
TUPLE 4
[
INTEGER_32
,
INTEGER_32
,
INTEGER_32
,
INTEGER_32
]])
when_geometry_change_signal
:
SIGNAL_4
[
INTEGER_32
,
INTEGER_32
,
INTEGER_32
,
INTEGER_32
]
when_expose
(p:
PROCEDURE
[
TUPLE
])
when_expose_signal
:
SIGNAL_0
double_click_delay
:
INTEGER_32
double_click_signal
:
SIGNAL_0
when_double_clicked
(p:
PROCEDURE
[
TUPLE
])
double click on left button NOTE: click has been generated before!
set_double_click_delay
(cd:
INTEGER_32
)
Set the maximum time (in milliseconds) between a up and next down sequence for a double-click to be emitted
default_double_click_delay
:
INTEGER_32
Maximum time (milliseconds) for a up/nextdown sequence to be considered as double click
when_double_clicked_init
left_up_time
:
INTEGER_32
private_left_down
private_left_up
left_click_signal
:
SIGNAL_0
when_left_clicked
(p:
PROCEDURE
[
TUPLE
])
left_is_down
:
BOOLEAN
when_left_clicked_init
left_may_click
:
BOOLEAN
private_left_pointer_enter
private_left_pointer_leave
is_pointer_inside
:
BOOLEAN
pointer_status_init
private_pointer_in
private_pointer_out
pointer_status_initialized
:
BOOLEAN
middle_click_signal
:
SIGNAL_0
when_middle_clicked
(p:
PROCEDURE
[
TUPLE
])
middle_is_down
:
BOOLEAN
when_middle_clicked_init
middle_may_click
:
BOOLEAN
private_middle_down
private_middle_up
private_middle_pointer_enter
right_click_signal
:
SIGNAL_0
when_right_clicked
(p:
PROCEDURE
[
TUPLE
])
right_is_down
:
BOOLEAN
when_right_clicked_init
right_may_click
:
BOOLEAN
private_right_down
private_right_up
private_right_pointer_enter
make
(p:
CONTAINER
)
effective procedure
top
repeat
:
REPEAT_JOB
effective function
top
with_label
(p:
CONTAINER
, text:
UNICODE_STRING
)
effective procedure
top
layout
:
ROW_LAYOUT
writable attribute
top
set_state
(n:
INTEGER_32
)
effective procedure
top
update_decoration
effective procedure
top
vision
:
VISION
once function
top
font_manager
:
FONT_MANAGER
once function
top
default_font
:
BASIC_FONT
once function
top
white_color
:
COLOR
once function
top
black_color
:
COLOR
once function
top
dim_grey_color
:
COLOR
once function
top
dark_grey_color
:
COLOR
once function
top
grey_color
:
COLOR
once function
top
light_grey_color
:
COLOR
once function
top
dark_blue_color
:
COLOR
once function
top
medium_blue_color
:
COLOR
once function
top
blue_color
:
COLOR
once function
top
royal_blue_color
:
COLOR
once function
top
deep_sky_blue_color
:
COLOR
once function
top
sky_blue_color
:
COLOR
once function
top
light_sky_blue_color
:
COLOR
once function
top
steel_blue_color
:
COLOR
once function
top
light_steel_blue_color
:
COLOR
once function
top
light_blue_color
:
COLOR
once function
top
pale_turquoise_color
:
COLOR
once function
top
dark_turquoise_color
:
COLOR
once function
top
medium_turquoise_color
:
COLOR
once function
top
turquoise_color
:
COLOR
once function
top
dark_cyan_color
:
COLOR
once function
top
cyan_color
:
COLOR
once function
top
light_cyan_color
:
COLOR
once function
top
dark_green_color
:
COLOR
once function
top
green_color
:
COLOR
once function
top
light_green_color
:
COLOR
once function
top
yellow_green_color
:
COLOR
once function
top
dark_khaki_color
:
COLOR
once function
top
khaki_color
:
COLOR
once function
top
yellow_color
:
COLOR
once function
top
light_yellow_color
:
COLOR
once function
top
gold_color
:
COLOR
once function
top
beige_color
:
COLOR
once function
top
chocolate_color
:
COLOR
once function
top
firebrick_color
:
COLOR
once function
top
brown_color
:
COLOR
once function
top
dark_salmon_color
:
COLOR
once function
top
salmon_color
:
COLOR
once function
top
light_salmon_color
:
COLOR
once function
top
dark_orange_color
:
COLOR
once function
top
orange_color
:
COLOR
once function
top
orange_red_color
:
COLOR
once function
top
dark_red_color
:
COLOR
once function
top
red_color
:
COLOR
once function
top
hot_pink_color
:
COLOR
once function
top
deep_pink_color
:
COLOR
once function
top
pink_color
:
COLOR
once function
top
light_pink_color
:
COLOR
once function
top
pale_violet_red_color
:
COLOR
once function
top
maroon_color
:
COLOR
once function
top
medium_violet_red_color
:
COLOR
once function
top
violet_red_color
:
COLOR
once function
top
violet_color
:
COLOR
once function
top
dark_magenta_color
:
COLOR
once function
top
magenta_color
:
COLOR
once function
top
dark_violet_color
:
COLOR
once function
top
blue_violet_color
:
COLOR
once function
top
medium_purple_color
:
COLOR
once function
top
purple_color
:
COLOR
once function
top
state_normal
:
INTEGER_32
constant attribute
top
state_active
:
INTEGER_32
constant attribute
top
state_prelight
:
INTEGER_32
constant attribute
top
state_selected
:
INTEGER_32
constant attribute
top
state_insensitive
:
INTEGER_32
constant attribute
top
center_alignment
:
ALIGNMENT
once function
top
left_alignment
:
ALIGNMENT
once function
top
right_alignment
:
ALIGNMENT
once function
top
top_alignment
:
ALIGNMENT
once function
top
down_alignment
:
ALIGNMENT
once function
top
top_left_alignment
:
ALIGNMENT
once function
top
top_right_alignment
:
ALIGNMENT
once function
top
down_right_alignment
:
ALIGNMENT
once function
top
down_left_alignment
:
ALIGNMENT
once function
top
make_layout
(p:
CONTAINER
, lo:
LAYOUT
)
effective procedure
top
require
p /= Void
lo /= Void
lo.container = Void
ensure
parent = p
layout = lo
sub_window_create
(x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
, parent_window:
WINDOW
)
effective procedure
top
require
x.in_range(0, parent_window.width - 1)
y.in_range(0, parent_window.height - 1)
w.in_range(1, parent_window.width - x)
h.in_range(1, parent_window.height - y)
default_init
effective procedure
top
set_parent
(p:
CONTAINER
)
effective procedure
top
require
p = Void implies parent /= Void
p /= Void implies parent = Void
p /= Void implies p.has_child(Current)
ensure
parent = p
set_background_color
(c:
COLOR
)
effective procedure
top
The color is copied, next changes to c won't change the background.
Call clear_area (or refresh) to update the background from application, not needed from renderer
require
c /= Void
set_background_pixmap
(p:
PIXMAP
)
effective procedure
top
Call this function again if you modify the pixmap (copy may have been done)
require
p /= Void
map
effective procedure
top
unmap
effective procedure
top
mapped
:
BOOLEAN
writable attribute
top
Warning: this information is asynchronous
expose_event
effective procedure
top
clear_without_expose
effective procedure
top
clear the all the drawable area.
WARNING: don't redraw the content (no expose event)
area
:
RECT
effective function
top
refresh
effective procedure
top
clear and update entire object (sub_window(s) are not updated).
clear
effective procedure
top
clear and update entire object (sub_window(s) are not updated).
as_x_root
(x:
INTEGER_32
):
INTEGER_32
effective function
top
TODO: add basic conversion to speed up
require
x >= 0
x <
width
x >= pos_x
x < pos_x + width
as_y_root
(y:
INTEGER_32
):
INTEGER_32
effective function
top
TODO: add basic conversion to speed up
require
y >= 0
y <
height
y >= pos_y
y < pos_y + height
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
layout /= Void
set_geometry
(x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
)
effective procedure
top
Position may be negative (used for scrolling).
require
w >=
min_width
h >=
min_height
x >= 0
y >= 0
w >= min_width
h >= min_height
ensure
width = w
height = h
set_requisition
(min_w:
INTEGER_32
, min_h:
INTEGER_32
, std_w:
INTEGER_32
, std_h:
INTEGER_32
)
effective procedure
top
require
min_w.in_range(0, std_w)
min_h.in_range(0, std_h)
ensure
not layout_update_paused implies layout_ready or not done
adjust_size
effective procedure
top
resize
(w:
INTEGER_32
, h:
INTEGER_32
)
effective procedure
top
Warning: do not redraw content if not window subtype
require
w >= min_width
h >= min_height
ensure
width = w
height = h
paint_decorations
(x:
INTEGER_32
, y:
INTEGER_32
)
effective procedure
top
resize_decorations
(w:
INTEGER_32
, h:
INTEGER_32
)
effective procedure
top
set_mapped
(b:
BOOLEAN
)
effective procedure
top
geometry_changed
(x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
)
effective procedure
top
dispatch
effective procedure
top
Should be called only from
set_geometry
and
set_requisition
.
require
not layout_ready
layout /= Void
ensure
layout_ready
basic_window_create
(x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
, parent_win:
POINTER
, decorate:
BOOLEAN
):
POINTER
top
basic_window_set_geometry
(win:
POINTER
, x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
)
top
basic_window_set_position
(win:
POINTER
, x:
INTEGER_32
, y:
INTEGER_32
)
top
basic_window_set_size
(win:
POINTER
, x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
)
top
basic_window_set_bg_color
(win:
POINTER
, color:
POINTER
)
top
basic_window_set_bg_pixmap
(win:
POINTER
, pixmap:
POINTER
)
top
basic_window_clear_no_expose
(win:
POINTER
)
top
basic_window_set_kbd_focus
(win:
POINTER
)
top
basic_window_map
(win:
POINTER
)
top
basic_window_unmap
(win:
POINTER
)
top
basic_window_get_drawing_widget
(w:
POINTER
):
POINTER
top
default_create
effective procedure
top
Default creation method.
It is used when no creation method is specified if allowed. Note it may be renamed.
container_init
effective procedure
top
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
child
:
FAST_ARRAY
[
WIDGET
]
writable attribute
top
layout_update_paused
:
BOOLEAN
writable attribute
top
TODO: suppress.
Handle this with mapped
set_layout
(l:
LAYOUT
)
effective procedure
top
Change the layout for the container (layout choose children position and size).
The layout has to be free (not used by another container).
require
l /= Void
l.container = Void
ensure
layout
= l
layout
.container = Current
not
layout_update_paused
implies
layout_ready
layout_pause
effective procedure
top
TODO: remove when mapped ready
require
not
layout_update_paused
ensure
layout_update_paused
layout_continue
effective procedure
top
TODO: remove when mapped ready
require
layout_update_paused
ensure
layout_ready
not
layout_update_paused
child_attach
(w:
WIDGET
)
effective procedure
top
Add widget
w
in this container.
See also
child_detach
,
has_child
.
require
layout
/= Void
w /= Void
w.parent = Void
not
has_child
(w)
ensure
w.parent = Current
has_child
(w)
last_child
= w
not
layout_update_paused
implies
layout_ready
or not
done
TODO: not mapped implies not layout_ready???
child_detach
(w:
WIDGET
)
effective procedure
top
Remove widget
w
from this container.
See also
child_attach
,
has_child
.
require
w /= Void
has_child
(w)
ensure
child
.count = old
child
.count - 1
not
has_child
(w)
w.parent = Void
not
layout_update_paused
implies
layout_ready
TODO: not mapped implies not layout_ready???
has_child
(w:
WIDGET
):
BOOLEAN
effective function
top
last_child
:
WIDGET
effective function
top
require
not
is_empty
is_empty
:
BOOLEAN
effective function
top
clear_area
(x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
)
effective procedure
top
clear area and emit expose event (contents will be drawn) x and y are relative to current object
require
w > 0
h > 0
area
.include(x, y)
area
.include(x + w - 1, y + h - 1)
done
:
BOOLEAN
writable attribute
top
TODO: suppress.
Handle this with mapped
child_requisition_changed
effective procedure
top
require
layout
/= Void
ensure
not
layout_update_paused
implies
layout_ready
or not
done
layout_ready
:
BOOLEAN
writable attribute
top
requisition_changed
:
BOOLEAN
writable attribute
top
invalidate_layout
effective procedure
top
ensure
not
layout_ready
computing_size
:
BOOLEAN
effective function
top
This is only used for invariant defined in
widget
.
Sizes may be invalid while they are computed
basic_window_clear_area
(window:
POINTER
, x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
)
top
TODO: invalid for pixmap.
Redefine allowed ?
basic_window_clear_area_no_expose
(window:
POINTER
, x:
INTEGER_32
, y:
INTEGER_32
, w:
INTEGER_32
, h:
INTEGER_32
)
top
TODO: invalid for pixmap.
Redefine allowed ?
drawing_widget
:
POINTER
writable attribute
top
Because Windows can not paint on widgets like windows or bitmaps, it needs another object (Device Context) attached to the widget.
For X11, it is the same value as widget.
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
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
set_state_normal
frozen
effective procedure
top
set_state_active
frozen
effective procedure
top
set_state_prelight
frozen
effective procedure
top
set_state_selected
frozen
effective procedure
top
set_state_insensitive
frozen
effective procedure
top
renderer
:
RENDERER
once function
top
ensure
Result /= Void
hash_code
:
INTEGER_32
deferred function
top
The hash-code value of
Current
.
ensure
good_hash_value:
Result >= 0
is_equal
(other: REPEAT_BUTTON):
BOOLEAN
deferred function
top
Is
other
attached to an object considered equal to current object?
require
other /= Void
ensure
Result implies
hash_code
= other.
hash_code
commutative:
generating_type = other.generating_type implies Result = other.is_equal(Current)
widget
:
POINTER
writable attribute
top
widget identifier from the native graphic API.
when_left_down
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
when_left_down_signal
:
SIGNAL_0
effective function
top
when_left_up
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
when_left_up_signal
:
SIGNAL_0
effective function
top
when_middle_down
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
when_middle_down_signal
:
SIGNAL_0
effective function
top
when_middle_up
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
when_middle_up_signal
:
SIGNAL_0
effective function
top
when_right_down
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
when_right_down_signal
:
SIGNAL_0
effective function
top
when_right_up
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
when_right_up_signal
:
SIGNAL_0
effective function
top
when_wheel_up
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
when_wheel_up_signal
:
SIGNAL_0
effective function
top
when_wheel_down
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
when_wheel_down_signal
:
SIGNAL_0
effective function
top
when_pointer_move
(p:
PROCEDURE
[
TUPLE 2
[
INTEGER_32
,
INTEGER_32
]])
effective procedure
top
when_pointer_move_signal
:
SIGNAL_2
[
INTEGER_32
,
INTEGER_32
]
effective function
top
when_pointer_enter
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
when_pointer_enter_signal
:
SIGNAL_0
effective function
top
when_pointer_leave
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
when_pointer_leave_signal
:
SIGNAL_0
effective function
top
when_key_down
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
when_key_down_signal
:
SIGNAL_0
effective function
top
when_key_up
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
when_key_up_signal
:
SIGNAL_0
effective function
top
when_mapped
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
when_mapped_signal
:
SIGNAL_0
effective function
top
when_unmapped
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
when_unmapped_signal
:
SIGNAL_0
effective function
top
when_geometry_change
(p:
PROCEDURE
[
TUPLE 4
[
INTEGER_32
,
INTEGER_32
,
INTEGER_32
,
INTEGER_32
]])
effective procedure
top
when_geometry_change_signal
:
SIGNAL_4
[
INTEGER_32
,
INTEGER_32
,
INTEGER_32
,
INTEGER_32
]
effective function
top
when_expose
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
when_expose_signal
:
SIGNAL_0
effective function
top
double_click_delay
:
INTEGER_32
writable attribute
top
double_click_signal
:
SIGNAL_0
writable attribute
top
when_double_clicked
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
double click on left button NOTE: click has been generated before!
set_double_click_delay
(cd:
INTEGER_32
)
effective procedure
top
Set the maximum time (in milliseconds) between a up and next down sequence for a double-click to be emitted
require
cd > 0 and then cd < 1000
ensure
double_click_delay
= cd
default_double_click_delay
:
INTEGER_32
constant attribute
top
Maximum time (milliseconds) for a up/nextdown sequence to be considered as double click
when_double_clicked_init
effective procedure
top
left_up_time
:
INTEGER_32
writable attribute
top
private_left_down
effective procedure
top
ensure
left_is_down
private_left_up
effective procedure
top
require
left_is_down
ensure
not left_is_down
left_click_signal
:
SIGNAL_0
writable attribute
top
when_left_clicked
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
left_is_down
:
BOOLEAN
writable attribute
top
when_left_clicked_init
effective procedure
top
left_may_click
:
BOOLEAN
writable attribute
top
private_left_pointer_enter
effective procedure
top
private_left_pointer_leave
effective procedure
top
is_pointer_inside
:
BOOLEAN
writable attribute
top
pointer_status_init
effective procedure
top
private_pointer_in
effective procedure
top
private_pointer_out
effective procedure
top
pointer_status_initialized
:
BOOLEAN
writable attribute
top
middle_click_signal
:
SIGNAL_0
writable attribute
top
when_middle_clicked
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
middle_is_down
:
BOOLEAN
writable attribute
top
when_middle_clicked_init
effective procedure
top
middle_may_click
:
BOOLEAN
writable attribute
top
private_middle_down
effective procedure
top
ensure
middle_is_down
private_middle_up
effective procedure
top
require
middle_is_down
ensure
not
middle_is_down
private_middle_pointer_enter
effective procedure
top
right_click_signal
:
SIGNAL_0
writable attribute
top
when_right_clicked
(p:
PROCEDURE
[
TUPLE
])
effective procedure
top
right_is_down
:
BOOLEAN
writable attribute
top
when_right_clicked_init
effective procedure
top
right_may_click
:
BOOLEAN
writable attribute
top
private_right_down
effective procedure
top
ensure
right_is_down
private_right_up
effective procedure
top
require
right_is_down
ensure
not
right_is_down
private_right_pointer_enter
effective procedure
top