with Claw;
package Claw.Menus is
--
-- CLAW - Class Library for Ada and Windows.
--
-- Package implementing menu objects.
--
-- Copyright 1996, 1997 R.R. Software, Inc.
-- P.O. Box 1512, Madison WI 53701
-- All rights reserved.
--
-- Emasculated version for demo.
pragma Elaborate_Body; -- Insure that the body is elaborated before anyone
-- can call CLAW.
type Basic_Menu_Type is abstract new Claw.Root_Menu_Type with private;
-- Operations on Basic_Menu_Type.
-- All but the following are omitted from the demo.
procedure Mark_Item (Menu : in out Basic_Menu_Type;
First, Last,
Item : in Menu_Identifier_Type);
-- Marks the specified item with a (menu) radiobutton and unmarks other
-- items in the group from First .. Last. (Note: On Windows 3.x, an
-- ordinary checkmark is used).
-- First, Last, and Item are all menu identifiers.
-- Raises:
-- Not_Valid_Error if Menu isn't valid.
-- Windows_Error if Windows returns an error (usually meaning
-- that some menu entry doesn't exist).
-- Not_Supported_Error if Menu is a menu bar.
type Submenu_Type is new Basic_Menu_Type with private;
-- Implements Submenus (also known as drop-down or pull-down menus).
function Get_Submenu (Menu : in Basic_Menu_Type;
Position : in Menu_Item_Position_Type) return Submenu_Type'Class;
-- Returns the Submenu for the menu item at (one-based) Position.
-- Raises:
-- Not_Valid_Error if Menu isn't valid.
-- Not_Found_Error if Position is not within the menu, or
-- this is not a Submenu item.
private
type Basic_Menu_Type is new Claw.Root_Menu_Type with null record;
type Submenu_Type is new Basic_Menu_Type with null record;
procedure Load_Resource (Menu : in out Basic_Menu_Type'Class;
Menu_Name : in String);
-- Load Menu_Name from a resource, and insert it into Menu.
-- Raises:
-- Windows_Error if Windows reports an error.
procedure Figure_Ids_and_Submenus (Menu : in out Basic_Menu_Type'Class);
-- Setup the internal information for Ids and Submenus.
end Claw.Menus;