When Drupal renders a menu, it shows only those links that the current user has the right to actually click on and visit. Instead of that behavior, I would like to see permissible pages as clickable links and non-permissible pages as non-clickable menu item titles, so that the user can see what they cannot yet click.
I have code that so far loads menu links and creates a list like this, but it doesn't support hierarchy, expanded/collapsed, site-wide menu theming, etc. because all it does is build a <ul> with a <li> item for each menu link title. If you want to look a the code so far, it's Foreshadow Menu (in my Github account). My goal is to render my version of the menu in a way that is consistent with and retains the features of the Drupal-rendered menus.
My question is: how does Drupal render menus? Specifically, how does it determine whether to show/hide a link? Does it use
hide() somewhere internally, where I could override and change the menu output? Or am I going about this all wrong?