------------------------------------------------------------------------------ -- -- -- XVIEW ADA LIBRARY COMPONENTS -- -- -- -- XV_MENU_PACKAGE -- -- -- -- S p e c -- -- -- -- Copyright (c) 1995 Andreas Almroth, All Rights Reserved -- -- -- -- The XVIEW ADA library is free software; you can redistribute it and/or -- -- modify it under terms of the GNU Library General Public License as -- -- published by the Free Software Foundation; either version 2, or (at your -- -- option) any later version. The XVIEW ADA library 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 Library General Public License for more details. -- -- You should have received a copy of the GNU Library General Public -- -- License along with the XVIEW ADA library; see the file COPYING.LIB. If -- -- not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, -- -- MA 02139, USA. -- -- -- ------------------------------------------------------------------------------ with Xv_Base_Package; use Xv_Base_Package; with Ada.Finalization; use Ada.Finalization; package Xv_Menu_Package is type Menu is new Xv_opaque; type Menu_item is new Xv_opaque; type Callback_Menu_Ptr is access function (Menu : Menu; Item : Menu_Item) return Xv_opaque; type Xv_Menu is new Controlled with private; type Xv_Menu_Ptr is access all xv_menu; procedure Initialize (V : in out Xv_Menu); procedure Finalize (V : in out Xv_Menu); procedure Append_Menu_Item (V : in Xv_Menu; item : Menu_item); procedure Insert_Menu_Item (V : in Xv_Menu; item : Menu_item;Where: Integer); procedure Remove_Menu_Item (V : in Xv_Menu; Where : Integer); procedure Set_Choices (V : in Xv_Menu; Choices : Strings); procedure Set_Callback (V : in Xv_Menu; Func : callback_menu_ptr); function Get_Choosen (V : in Menu_item) return String; function Get_Default_Item (V : in Xv_Menu) return String; function Get_Menu (V : in Xv_Menu) return Menu; type Xv_Menu_Item is new Controlled with private; type Xv_Menu_Item_Ptr is access all Xv_Menu_Item; procedure Initialize (V : in out Xv_Menu_Item); procedure Finalize (V : in out Xv_Menu_Item); procedure Set_Pullright_Menu (V : in Xv_Menu_Item; item : Menu); procedure Set_Choice (V : in Xv_Menu_Item; Choice : String); procedure Set_Callback (V : in Xv_Menu_Item;Func : Callback_Menu_Ptr); function Get_Menu_Item (V : in Xv_Menu_Item) return Menu_item; private type Xv_Menu is new Controlled with record Base : Menu; end record; type Xv_Menu_Item is new Controlled with record Base : Menu_Item; end record; end Xv_Menu_Package;