class REPEAT_BUTTON

Features exported to LAYOUT

Direct parents

conformant parents

BUTTON

Summary

creation features

exported features

Details

make (p: CONTAINER)
with_label (p: CONTAINER, text: UNICODE_STRING)
make_layout (p: CONTAINER, lo: LAYOUT)

require

  • p /= Void
  • lo /= Void
  • lo.container = Void

ensure

  • parent = p
  • layout = lo

sub_window_create (x: INTEGER, y: INTEGER, w: INTEGER, h: INTEGER, parent_window: WINDOW)

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_create

Default creation method. It is used when no creation method is specified if allowed. Note it may be renamed.

layout: ROW_LAYOUT
set_state (n: INTEGER)
update_decoration
set_background_color (c: COLOR)

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)

Call this function again if you modify the pixmap (copy may have been done)

require

  • p /= Void

map
unmap
mapped: BOOLEAN

Warning: this information is asynchronous

expose_event
clear_without_expose

clear the all the drawable area. WARNING: don't redraw the content (no expose event)

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).

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

  • layout /= Void

set_geometry (x: INTEGER, y: INTEGER, w: INTEGER, h: INTEGER)

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, min_h: INTEGER, std_w: INTEGER, std_h: INTEGER)

require

  • min_w.in_range(0, std_w)
  • min_h.in_range(0, std_h)

ensure

    adjust_size
    width: INTEGER
    height: INTEGER
    min_width: INTEGER
    min_height: INTEGER
    std_width: INTEGER
    std_height: INTEGER
    child: FAST_ARRAY[WIDGET]
    layout_update_paused: BOOLEAN

    TODO: suppress. Handle this with mapped

    set_layout (l: LAYOUT)

    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

    layout_pause

    TODO: remove when mapped ready

    require

    • not layout_update_paused

    ensure

    • layout_update_paused

    layout_continue

    TODO: remove when mapped ready

    require

    • layout_update_paused

    ensure

    • not layout_update_paused

    child_attach (w: WIDGET)

    Add widget w in this container.

    require

    • layout /= Void
    • w /= Void
    • w.parent = Void
    • not has_child(w)

    ensure

    • w.parent = Current
    • has_child(w)
    • last_child = w

    child_dettach (w: WIDGET)
    This feature is obsolete: Use `child_detach' instead.
    child_detach (w: WIDGET)

    Remove widget w from this container.

    require

    • w /= Void
    • has_child(w)

    ensure

    • child.count = old child.count - 1
    • not has_child(w)
    • w.parent = Void

    has_child (w: WIDGET): BOOLEAN
    last_child: WIDGET

    require

    • not is_empty

    is_empty: BOOLEAN
    clear_area (x: INTEGER, y: INTEGER, w: INTEGER, h: INTEGER)

    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)

    parent: CONTAINER
    pos_x: INTEGER
    pos_y: INTEGER
    x_shrink_allowed: BOOLEAN
    x_expand_allowed: BOOLEAN
    y_shrink_allowed: BOOLEAN
    y_expand_allowed: BOOLEAN
    valid_width (w: INTEGER): BOOLEAN
    valid_height (h: INTEGER): 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

    use values from STATE_CONSTANTS

    frozen is_state_normal: BOOLEAN
    frozen is_state_active: BOOLEAN
    frozen is_state_prelight: BOOLEAN
    frozen is_state_selected: BOOLEAN
    frozen is_state_insensitive: BOOLEAN
    deferred hash_code: INTEGER

    The hash-code value of Current.

    ensure

    • good_hash_value: Result >= 0

    deferred is_equal (other: REPEAT_BUTTON): BOOLEAN

    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)

    when_left_down (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    when_left_down_signal: SIGNAL_0
    when_left_up (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    when_left_up_signal: SIGNAL_0
    when_middle_down (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    when_middle_down_signal: SIGNAL_0
    when_middle_up (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    when_middle_up_signal: SIGNAL_0
    when_right_down (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    when_right_down_signal: SIGNAL_0
    when_right_up (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    when_right_up_signal: SIGNAL_0
    when_wheel_up (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    when_wheel_up_signal: SIGNAL_0
    when_wheel_down (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    when_wheel_down_signal: SIGNAL_0
    when_pointer_move (p: PROCEDURE [O_ -> TUPLE][TUPLE 2 [A_, B_][INTEGERINTEGER]])
    when_pointer_move_signal: SIGNAL_2 [E, F][INTEGERINTEGER]
    when_pointer_enter (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    when_pointer_enter_signal: SIGNAL_0
    when_pointer_leave (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    when_pointer_leave_signal: SIGNAL_0
    when_key_down (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    when_key_down_signal: SIGNAL_0
    when_mapped (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    when_mapped_signal: SIGNAL_0
    when_unmapped (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    when_unmapped_signal: SIGNAL_0
    when_geometry_change (p: PROCEDURE [O_ -> TUPLE][TUPLE 4 [A_, B_, C_, D_][INTEGERINTEGERINTEGERINTEGER]])
    when_geometry_change_signal: SIGNAL_4 [E, F, G, H][INTEGERINTEGERINTEGERINTEGER]
    when_expose (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    when_expose_signal: SIGNAL_0
    double_click_delay: INTEGER
    double_click_signal: SIGNAL_0
    when_double_clicked (p: PROCEDURE [O_ -> TUPLE][TUPLE])

    double click on left button NOTE: click has been generated before!

    set_double_click_delay (cd: INTEGER)

    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

    left_click_signal: SIGNAL_0
    when_left_clicked (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    left_is_down: BOOLEAN
    is_pointer_inside: BOOLEAN
    middle_click_signal: SIGNAL_0
    when_middle_clicked (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    middle_is_down: BOOLEAN
    right_click_signal: SIGNAL_0
    when_right_clicked (p: PROCEDURE [O_ -> TUPLE][TUPLE])
    right_is_down: BOOLEAN

    Class invariant