class interface MENU_BAR
creation
   make (par: OVERLAPPED_WINDOW)
      --  Create a menu bar, when set up, the menubar shall be attach-ed 
      --  to the parent window.
      require
         valid: par /= Void
      ensure
         done: is_valid;
         keep_reference: par = parent
feature(s) from MEMORY
   --  Removal :
   dispose
      --  Low-level API free resource
   full_collect
      --  Force a full collection cycle if garbage collection is
      --  enabled; do nothing otherwise.
feature(s) from MENU
   --  Menu items management
   add_popup (item: POPUP_MENU)
      --  Add a popup menu at the end of the current menu.
      --  It cannot be removed.
      require
         valid_menu: is_valid;
         valid_item: item /= Void
   add_separator
      --  Add a separator at the end of the current menu.
      --  It cannot be removed.
      require
         valid: is_valid
   add_item (item: MENU_ITEM)
      --  Add an item at the end of the current menu.
      --  Use item.detach to remove the item.
      require
         valid_menu: is_valid;
         existing_item: item /= Void;
         unattached_item: not item.is_valid
      ensure
         attached: item.is_valid
feature(s) from MENU
   is_valid: BOOLEAN
feature(s) from MENU_BAR
   --  Installation & Destruction
   attach
      --  Attach menu bar to parent window, attachment should be done 
      --  when the menu is completed.
      require
         valid: is_valid
feature(s) from MENU_BAR
   --  Action(s)
   paint
      --  Update a menu bar.
      require
         valid: is_valid
invariant
   valid_parent: parent /= Void;
   items_ok: items /= Void;
end of MENU_BAR