deferred class GL_WIDGET

Features exported to LAYOUT

Direct parents

conformant parents

SUB_WINDOW

non-conformant parents

GRAPHIC

Known children

conformant children

WORLD

Summary

exported features

Details

make (p: CONTAINER)
make_with_size (p: CONTAINER, w: INTEGER, h: INTEGER)
select_myself_gl
display_gl
deferred init_gl
deferred redraw_gl
deferred resize_gl (w: INTEGER, h: INTEGER)
quit_gl

require

    post_redisplay
    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
      layout: LAYOUT
      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: GL_WIDGET): 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

      Class invariant