-------------------------------------------------------------------
--           RAPID - RAPID ADA PORTABLE INTERFACE DESIGNER         
--           MCC GUI PACKAGE LIBRARY                               
--           Copyright (C) 1999 Martin C. Carlisle.                
--                                                                 
-- RAPID is free software; you can redistribute it and/or modify
-- it under terms of the GNU General Public License as published  
-- by the Free Software Foundation; either version 2, or (at your
-- option) any later version.  RAPID is distributed in the hope that 
-- it will be useful, but WITHOUT ANY WARRANTY; without even the 
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-- PURPOSE.  See the GNU General Public License for more details.  
-- You should have received a copy of the GNU General Public License
-- distributed with RAPID; see file COPYING.  If not, write to the 
-- Free Software Foundation,  59 Temple Place - Suite 330,  Boston, 
-- MA 02111-1307, USA.                                                 
--                                                                     
-- As a special exception, if other files instantiate generics from
-- this unit, or you link this unit with other files to produce an 
-- executable, this unit does not by itself cause the resulting 
-- executable to be covered by the GNU General Public License.  
-- This exception does not however invalidate any other reasons 
-- why the executable file might be covered by the GNU Public 
-- License.  This exception does not apply to executables which
-- are GUI design tools, or that could act as a replacement
-- for RAPID.
------------------------------------------------------------------------------
with Gwindows.Windows;
with Gwindows.Menus;
with Peer;
with Ada.Unchecked_Conversion;
package body Mcc.Gui.Menu is
   function Convert is new Ada.Unchecked_Conversion(
      Peer.Peer,Gwindows.Menus.Menu_Type);
   function Convert is new Ada.Unchecked_Conversion(
      Gwindows.Menus.Menu_Type,Peer.Peer);
      
   type Menu_Item_Record is record
      null;
   end record;
   type Menu_Item_Record_Pointer is access all Menu_Item_Record;
   function Convert is new Ada.Unchecked_Conversion(
      Peer.Peer,Menu_Item_Record_Pointer);
   function Convert is new Ada.Unchecked_Conversion(
      Menu_Item_Record_Pointer,Peer.Peer);

   ----------------
   -- Add_Choice --
   ----------------

   procedure Add_Choice
     (Obj         : in out Choice;
      To_Menu     : in     Menu'Class;
      Text        : in     String;
      Action      : in     Menu_Callback;
      Underline   : in     Natural;
      Accelerator : in     String := "")
   is
   begin
      null;
   end Add_Choice;

   ----------------
   -- Add_Choice --
   ----------------

   procedure Add_Choice
     (Obj         : in out Choice;
      To_Menu     : in     Menu'Class;
      Text        : in     String;
      Action      : in     Menu_Callback;
      Underline   : in     Natural;
      Location    : in     Natural;
      Accelerator : in     String := "")
   is
   begin
      null;
   end Add_Choice;

   -------------------
   -- Add_Separator --
   -------------------

   procedure Add_Separator
     (Obj         : in out Separator;
      To_Menu     : in     Menu'Class)
   is
   begin
      null;
   end Add_Separator;

   -------------------
   -- Add_Separator --
   -------------------

   procedure Add_Separator
     (Obj         : in out Separator;
      To_Menu     : in     Menu'Class;
      Location    : in     Natural)
   is
   begin
      null;
   end Add_Separator;

   -----------------
   -- Add_Submenu --
   -----------------

   procedure Add_Submenu
     (Obj         : in out Submenu;
      Text        : in     String;
      Underline   : in     Natural;
      Parent_Menu : in     Menu'Class;
      On_Post     : in     Menu_Callback := null)
   is
   begin
      null;
   end Add_Submenu;

   -----------------
   -- Add_Submenu --
   -----------------

   procedure Add_Submenu
     (Obj         : in out Submenu;
      Text        : in     String;
      Underline   : in     Natural;
      Parent_Menu : in     Menu'Class;
      Location    : in     Natural;
      On_Post     : in     Menu_Callback := null)
   is
   begin
      null;
   end Add_Submenu;

   ------------
   -- Create --
   ------------

   procedure Create
     (Obj    : in out Window_Menu;
      Window : in     Mcc.Gui.Container.Container'Class)
   is
      The_Menu : Gwindows.Menus.Menu_Type;
   begin
      The_Menu := Gwindows.Menus.Create_Menu;
      Gwindows.Windows.Menu(
         Window => Gwindows.Windows.Window_Type(Obj.My_Peer.all),
         Menu   => The_Menu);
      Obj.My_Peer := Convert(The_Menu);
   end Create;

   ------------
   -- Delete --
   ------------

   procedure Delete (Obj : in out Menu_Item) is
   begin
      null;
   end Delete;

   -------------
   -- Disable --
   -------------

   procedure Disable (Obj : in out Choice) is
   begin
      null;
   end Disable;

   ------------
   -- Enable --
   ------------

   procedure Enable (Obj : in out Choice) is
   begin
      null;
   end Enable;

end Mcc.Gui.Menu;

