ANY LAYOUT NONE
class interface VERTICAL_LINE
   -- VERTICAL_LINE is a widget you can use as separator. As it's
   -- a widget, position and size are managed by the layout
   -- associated with the container the line is put into.

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

feature(s) from STATE
   state: INTEGER
      -- 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

feature(s) from WIDGET
   parent: CONTAINER

   pos_x: INTEGER

   pos_y: INTEGER

   x_shrink_allowed: BOOLEAN

   x_expand_allowed: BOOLEAN

   y_shrink_allowed: BOOLEAN

   y_expand_allowed: BOOLEAN

   min_width: INTEGER

   min_height: INTEGER
      --TODO: change with thickness ?

   std_width: INTEGER

   std_height: INTEGER

   width: INTEGER

   height: INTEGER

   valid_width (w: INTEGER): BOOLEAN

   valid_height (h: INTEGER): BOOLEAN

   area: RECT

   root_area: RECT

   computing_size: BOOLEAN

   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

feature(s) from LINE
   thickness: INTEGER

   style: DRAW_STYLE

   set_thickness (thick: INTEGER)
      -- Set the thickness of the line (drawing' witdh)
      require
         thick > 0
      ensure
         thick = thickness

   set_style (s: DRAW_STYLE)
      -- Change the style used to draw the line.
      -- NOTE: The screen is not updated. --TODO: change this ?
      ensure
         style = s

   reset_default_style
      -- The renderer will be used to draw the line.
      -- NOTE: The screen is not updated. --TODO: change this ?


invariant

    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;

end of VERTICAL_LINE