Mercurial > gui
changeset 24:d314d2ec3300
Be able to obtain the name from a navItem
author | Ron de Bruijn <rmbruijn@gmail.com> |
---|---|
date | Sun, 04 Dec 2011 16:45:31 +0100 |
parents | 7c734edc6301 |
children | a037ed3854e3 |
files | navbar.ur navbar.urs |
diffstat | 2 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/navbar.ur Sat Sep 24 18:55:27 2011 -0430 +++ b/navbar.ur Sun Dec 04 16:45:31 2011 +0100 @@ -3,6 +3,8 @@ datatype navItem = NavItem of string * url +fun name (NavItem (text, url)) = text + datatype navBar m = NavBar of (list navItem) * (list navItem) (* First list is items before the active item, second list is items at and after the active one. * If the second list is non-empty its head is the active item. Parameter mode is to avoid
--- a/navbar.urs Sat Sep 24 18:55:27 2011 -0430 +++ b/navbar.urs Sun Dec 04 16:45:31 2011 +0100 @@ -47,6 +47,9 @@ (* Pretty print the navigation menu as a piece of xml made of * a chain <li><a>...</a></li> repeated. *) +val name : navItem -> string +(* navItems have a name, which this function returns *) + style active style last (* CSS classes to mark the active and last menu item. *)