deferred class WIDGET

All features

WIDGET is the most abstract class for all graphics objects. width and height are current object size min_width and min_height are the absolute minimal size std_width and std_height are the needed dimensions to see the entire object

If the object may not be shrink, size >= std If the object may be shrink, size >= min If the object may not be expanded, size <= std If the object may be expanded, size may increase

Direct parents

conformant parents

STATE

Known children

conformant children

ALIGNABLE, BUTTON_SPACE, CHECK_SPACE, CURSOR_SPACE, DECORATION, DRAWABLE, LABEL, LINE, RECTANGLE

Summary

exported features

Details

parent: CONTAINER
pos_x: INTEGER
pos_y: INTEGER
x_shrink_allowed: BOOLEAN
x_expand_allowed: BOOLEAN
y_shrink_allowed: BOOLEAN
y_expand_allowed: BOOLEAN
deferred min_width: INTEGER
deferred min_height: INTEGER
deferred std_width: INTEGER
deferred std_height: INTEGER
deferred width: INTEGER
deferred height: INTEGER
valid_width (w: INTEGER): BOOLEAN
valid_height (h: INTEGER): 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

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

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

require

  • x >= 0
  • y >= 0
  • w >= min_width
  • h >= min_height

ensure

  • width = w
  • height = h

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

computing_size: BOOLEAN
deferred resize (w: INTEGER, h: INTEGER)

require

  • w >= min_width
  • h >= min_height

ensure

  • width = w
  • height = h

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
frozen set_state_normal
frozen set_state_active
frozen set_state_prelight
frozen set_state_selected
frozen set_state_insensitive
set_state (n: INTEGER)
renderer: RENDERER
state_normal: INTEGER
state_active: INTEGER
state_prelight: INTEGER
state_selected: INTEGER
state_insensitive: INTEGER

Class invariant