m4_dnl M4 / HTML macro package - navigation menu support
m4_dnl Copyright 1997-2003 Perette Barella.
m4_dnl All rights reserved.
m4_dnl vim:ts=8:sw=8
_REVISION(``$Id: navigation.m4,v 1.4 2008/12/12 21:26:48 perette Exp perette $'')
__STYLESHEET(DIR_TOP/Include/m4navigation.css)
m4_dnl Initialize the left-edge navigation menu.
m4_define(``__NAVIGATION_MENU'', ``
m4_divert(DIV_CONTENT_BEGIN)
m4_divert(DIV_NAVIGATION_MENU)
m4_define(``_NAV_END_CONTENT'', ``
m4_pushdef(``__DIVERTS'', m4_divnum)
m4_divert(DIV_CONTENT)
m4_dnl end of class "content"
m4_dnl end of class "navicanvas"
m4_divert(__DIVERTS)
m4_popdef(``__DIVERTS'')
m4_define(``_NAV_END_CONTENT'', ``'')
'')
'')
m4_define(``__NAV_MENU_INIT'', ``false'')
m4_define(``_NAV_END_CONTENT'', ``'')
m4_m4wrap(``
_NAV_END_CONTENT
m4_divert(DIV_NAVIGATION_MENU)
m4_ifelse(__NAV_MENU_INIT,``true'', ``'')
m4_ifelse(__NAV_MENU_INIT,``false'',, ``
'')
m4_divert(DIV_NAVIGATION_BAR)
m4_ifelse(__NAV_BAR_INIT,``true'', ``'')
'')
m4_dnl add a category of buttons to the left-edge navigation menu.
m4_dnl Usage: NAV_MENU_GROUP(text [, href], class)
m4_define(``_NAV_MENU_GROUP'', ``
m4_pushdef(``__DIVERTS'', m4_divnum)
m4_divert(DIV_NAVIGATION_MENU)
m4_ifelse(__NAV_MENU_INIT,``false'',``
__NAVIGATION_MENU
'',__NAV_MENU_INIT,``partial'', ``
m4_dnl do nothing
'', ``
'')
m4_define(``__NAV_MENU_INIT'', ``partial'')
$1
m4_divert(__DIVERTS)
m4_popdef(``__DIVERTS'')
'')
m4_dnl Add a menu item to the left-edge navigation menu.
m4_dnl Usage: _NAV_MENU_ITEM(href, link-text [, details])
m4_define(``_NAV_MENU_ITEM'', ``
m4_pushdef(``__DIVERTS'', m4_divnum)
m4_divert(DIV_NAVIGATION_MENU)
m4_ifelse(__NAV_MENU_INIT,false,``
__NAVIGATION_MENU