INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Menu group class"
project: "Visual Eiffel"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: grape
class MENU
inherit

GROUP
rename
make as group_make
redefine
add,
build,
destroy,
init,
insert,
remove
end
creation

load,
make,
make_root
feature

make
-- Create an empty popup menu structure. The menu is initially empty,
-- but can be filled later with menu items by using the append or
-- insert functions.

make_root
-- A root menu is a special kind of Menu.
-- On most platforms it is represented by a menu bar, wich is always
-- visible, and is placed below the window caption bar.

add (item: MENU_ENTRY)
-- Adds an item to the end of menu-items list
require
item_must_exist: item /= void

insert (item: MENU_ENTRY; before: MENU_ENTRY)
-- Inserts a new item in a requested position in the menu items list
require
item_must_exist: item /= void

remove (item: MENU_ENTRY)
-- Remove an item from the menu-items list

destroy
-- Destroy's the menu
-- Since in Eiffel we have no destructors we only frees system
-- resource.

init

track (t: TILE; x, y: INTEGER)
-- This method allow explicit displaying of a popup menu
-- in a specified location within the client area of a Tile
-- The menu is centered horizontally.
require
menu_bar_cannot_be_tracked: not is_root_menu

enable_items (recursive: BOOLEAN; command_set: ARRAY [INTEGER])
-- Enables a set of items defined by their command set

disable_items (recursive: BOOLEAN; command_set: ARRAY [INTEGER])
-- disables a set of items defined by their command set

check_items (recursive: BOOLEAN; command_set: ARRAY [INTEGER])
-- Enables a set of items defined by their command set

uncheck_items (recursive: BOOLEAN; command_set: ARRAY [INTEGER])
-- disables a set of items defined by their command set

get_entry_by_context (recursive: BOOLEAN; ctx: INTEGER): MENU_ENTRY

get_item_by_command (recursive: BOOLEAN; cmd: INTEGER): MENU_ITEM

get_window_menu: MENU
-- We are suppose that Window popup menu always has
-- a "&Window" title. !! BE CAREFUL !!
require
initialised: sys_id /= 0
must_be_menu_bar: is_root_menu

is_root_menu: BOOLEAN

build (rc: RESOURCE_CONTAINER; p: POINTER)
end -- class MENU

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES