@DATABASE "Control of GadTools Menus"

@NODE MAIN "Controle of GadTools Menus"

@FONT Topaz 11@{FG Shine}					@{u}GADTOOLS MENUS@{uu}

@{FG Text}
  
  Gadtools menus were created with same objective of gadgets : STANDARD.

@{BG Fill}
	@{" _gmn List Alloc " Link _gmn_List_Alloc}		@{" _gmn List Free  " Link _gmn_List_Free}
	@{" _gmn Set        " Link _gmn_Set}		@{" _gmn End        " Link _gmn_End}
	@{" _gmn Create     " Link _gmn_Create}		@{" _gmn Free       " Link _gmn_Free}
	@{" _gmn Layout     " Link _gmn_Layout}

	@{" _menu What Address " Link _menu_What_Address}		@{" _menu Clear " Link _menu_Clear}
	@{" _menu What Menu Nb " Link _menu_What_Menu_Nb}		@{" _menu Set   " Link _menu_Set}
	@{" _menu What Item Nb " Link _menu_What_Item_Nb}		@{" _menu Off   " Link _menu_Off}
	@{" _menu What Sub Nb  " Link _menu_What_Sub_Nb}		@{" _menu On    " Link _menu_On}
@ENDNODE

@NODE _gmn_List_Alloc "_gmn List Alloc"
@{BG Text}@{FG Fill}_gmn List Alloc
@{BG Background}@{FG Text}
  This function allocates memory for menus list, and returns its pointer.

	NEWMENU=_gmn List Alloc(NB)

	NB	-> Max number of menus in list.

@ENDNODE

@NODE _gmn_List_Free "_gmn List Free"
@{BG Text}@{FG Fill}_gmn List Free
@{BG Background}@{FG Text}
  This function frees of memoty a menus list.

	_gmn List Free NEWMENU

	NEWMENU	-> Pointer of menus list

@ENDNODE

@NODE _gmn_Set "_gmn Set"
@{BG Text}@{FG Fill}_gmn Set
@{BG Background}@{FG Text}
  This function defines an item of the menu.

	_gmn Set NEWMENU,TYPE,PTXT,COMKEY,FLAGS,MUTEXCL,USER

	NEWMENU	-> Pointer of menus list
	TYPE	-> Type of item
	PTXT	-> Pointer of text
	COMKEY	-> Pointer of character (Hot-Key)
	FLAGS	-> Flags
	MUTEXCL	-> Pointer on Item Menu
	USER	-> User data

@ENDNODE

@NODE _gmn_End "_gmn End"
@{BG Text}@{FG Fill}_gmn End
@{BG Background}@{FG Text}
  This function marks the end of list like _tag End.
  
	_gmn End NEWMENU

	NEWMENU	-> Pointer of menus list

@ENDNODE

@NODE _gmn_Create "_gmn Create"
@{BG Text}@{FG Fill}_gmn Create
@{BG Background}@{FG Text}
  This function creates menus with descriptive list, then returns menu
pointer.

	MENUSTRP=_gmn Create(NEWMENU,TAGLIST)

	MENUSTRP-> Pointer of menus list
	TAGLIST	-> Pointer of TAG list

@ENDNODE

@NODE _gmn_Free "_gmn Free"
@{BG Text}@{FG Fill}_gmn Free
@{BG Background}@{FG Text}
  This function frees of memory menus created with @{BG Fill}@{" _gmn Create " Link _gmn_Create}@{BG Background}.

	_gmn Free MENUSTRP

	MENUSTRP-> Pointer of menu

@ENDNODE

@NODE _gmn_Layout "_gmn Layout"
@{BG Text}@{FG Fill}_gmn Layout
@{BG Background}@{FG Text}
  This function initialize necessary structures for the rendering operations
of menu. It returns a value (0 If fails).

	OK=_gmn Layout(MENUSTRP,VINF,TAGLIST)

	MENUSTRP-> Pointer of du Menu
	VINF	-> Pointer of VisualInfo
	TAGLIST	-> Pointer of TAG list

@ENDNODE

@NODE _menu_Clear "_menu Clear"
@{BG Text}@{FG Fill}_menu Clear
@{BG Background}@{FG Text}
  This function attaches no menu to the window.

	_menu Clear WND

	WND	-> Pointer of Window

@ENDNODE

@NODE _menu_Set "_menu Set"
@{BG Text}@{FG Fill}_menu Set
@{BG Background}@{FG Text}
  This function attaches the menu to the window.

	_menu Set WND,MENUSTRP

	MENUSTRP-> Pointer of menu

@ENDNODE

@NODE _menu_Off "_menu Off"
@{BG Text}@{FG Fill}_menu Off
@{BG Background}@{FG Text}
  This command disables a sub-item, an item, or a whole menu.This depends on
the contents of the data packed into MenuNumber.
	_menu Off WND,MENUNUM

	WND	-> Pointer of Window.
	MENUNUM	-> MenuNumber

@ENDNODE

@NODE _menu_On "_menu On"
@{BG Text}@{FG Fill}_menu On
@{BG Background}@{FG Text}
  This command enables a sub-item, an item, or a whole menu.This depends on
the contents of the data packed into MenuNumber.

	_menu On WND,MENUNUM

	WND	-> Pointer of Window.
	MENUNUM	-> WindowNumber

@ENDNODE

@NODE _menu_What_Address "_menu What Address"
@{BG Text}@{FG Fill}_menu What Address
@{BG Background}@{FG Text}
  This routine feels through the specified menu strip and returns the address
of the item specified by the menu number.  Typically, you will use this
routine to get the address of a menu item from a menu number sent to you by
Intuition after user has chosen from a window's menus.  

	ITEMPTR=_menu What Address(MENUSTRP,MENUNUM)

	MENUSTRP-> Pointer of Menu
	MENUNUM	-> MenuNumber

@ENDNODE

@NODE _menu_What_Menu_Nb "_menu What Menu Nb"
@{BG Text}@{FG Fill}_menu What Menu Nb
@{BG Background}@{FG Text}
  This function returns the number of selected menu header.

	MENUNB=_menu What Menu Nb(MENUNUM)

	MENUNUM	-> MenuNumber

@ENDNODE

@NODE _menu_What_Item_Nb "_menu What Item Nb"
@{BG Text}@{FG Fill}_menu What Item Nb
@{BG Background}@{FG Text}
  This function returns the number of selected item.

	ITEMNB=_menu What Item nb(MENUNUM)

	MENUNUM	-> MenuNumber

@ENDNODE


@NODE _menu_What_Sub_Nb "_menu What Sub Nb"
@{BG Text}@{FG Fill}_menu What Sub Nb
@{BG Background}@{FG Text}
  This function returns the number of selected sub-menu.

	SUBNB=_menu What Sub Nb(MENUNUM)

	MENUNUM	-> MenuNumber


@ENDNODE
