My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
LayoutNavEntry Struct Reference

Base class for the layout of a navigation item at the top of the HTML pages. More...

#include <layout.h>

Public Types

enum  Kind {
  MainPage, Pages, Modules, Namespaces,
  NamespaceList, NamespaceMembers, Classes, ClassList,
  ClassIndex, ClassHierarchy, ClassMembers, Files,
  FileList, FileGlobals, Examples, User,
  UserGroup
}
 

Public Member Functions

 LayoutNavEntry (LayoutNavEntry *parent, Kind k, bool vs, const QCString &bf, const QCString &tl, const QCString &intro, bool prepend=FALSE)
 
LayoutNavEntryparent () const
 
Kind kind () const
 
QCString baseFile () const
 
QCString title () const
 
QCString intro () const
 
QCString url () const
 
bool visible ()
 
void clear ()
 
void addChild (LayoutNavEntry *e)
 
void prependChild (LayoutNavEntry *e)
 
const QList< LayoutNavEntry > & children () const
 
LayoutNavEntryfind (LayoutNavEntry::Kind k, const char *file=0) const
 

Private Member Functions

 LayoutNavEntry ()
 

Private Attributes

LayoutNavEntrym_parent
 
Kind m_kind
 
bool m_visible
 
QCString m_baseFile
 
QCString m_title
 
QCString m_intro
 
QList< LayoutNavEntrym_children
 

Friends

class LayoutDocManager
 

Detailed Description

Base class for the layout of a navigation item at the top of the HTML pages.

Definition at line 118 of file layout.h.

Member Enumeration Documentation

Enumerator
MainPage 
Pages 
Modules 
Namespaces 
NamespaceList 
NamespaceMembers 
Classes 
ClassList 
ClassIndex 
ClassHierarchy 
ClassMembers 
Files 
FileList 
FileGlobals 
Examples 
User 
UserGroup 

Definition at line 121 of file layout.h.

Constructor & Destructor Documentation

LayoutNavEntry::LayoutNavEntry ( LayoutNavEntry parent,
Kind  k,
bool  vs,
const QCString &  bf,
const QCString &  tl,
const QCString &  intro,
bool  prepend = FALSE 
)
inline

Definition at line 141 of file layout.h.

References addChild(), m_children, and prependChild().

: m_parent(parent), m_kind(k), m_visible(vs), m_baseFile(bf), m_title(tl), m_intro(intro)
{ m_children.setAutoDelete(TRUE);
if (parent) { if (prepend) parent->prependChild(this); else parent->addChild(this); }
}
LayoutNavEntry::LayoutNavEntry ( )
inlineprivate

Definition at line 161 of file layout.h.

: m_parent(0) {}

Member Function Documentation

void LayoutNavEntry::addChild ( LayoutNavEntry e)
inline

Definition at line 155 of file layout.h.

References m_children.

Referenced by VhdlDocGen::findConstraintFile(), and LayoutNavEntry().

{ m_children.append(e); }
QCString LayoutNavEntry::baseFile ( ) const
inline

Definition at line 149 of file layout.h.

References m_baseFile.

Referenced by find(), url(), writeIndexHierarchyEntries(), and writeUserGroupStubPage().

{ return m_baseFile; }
const QList<LayoutNavEntry>& LayoutNavEntry::children ( ) const
inline
void LayoutNavEntry::clear ( )
inline

Definition at line 154 of file layout.h.

References m_children.

Referenced by LayoutParser::startNavIndex().

{ m_children.clear(); }
LayoutNavEntry * LayoutNavEntry::find ( LayoutNavEntry::Kind  k,
const char *  file = 0 
) const

Definition at line 76 of file layout.cpp.

References baseFile(), find(), kind(), and m_children.

Referenced by LayoutParser::endNavIndex(), find(), generateJSNavTree(), writeAlphabeticalIndex(), writeAnnotatedIndex(), writeClassMemberIndex(), writeClassMemberIndexFiltered(), writeExampleIndex(), writeFileIndex(), writeFileMemberIndex(), writeFileMemberIndexFiltered(), writeGraphicalClassHierarchy(), writeGroupIndex(), writeHierarchicalIndex(), writeNamespaceIndex(), writeNamespaceMemberIndex(), writeNamespaceMemberIndexFiltered(), writePageIndex(), and writePages().

{
LayoutNavEntry *result=0;
QListIterator<LayoutNavEntry> li(m_children);
for (li.toFirst();(entry=li.current());++li)
{
// depth first search, needed to find the entry furthest from the
// root in case an entry is in the tree twice
result = entry->find(kind,file);
if (result) return result;
if (entry->kind()==kind && (file==0 || entry->baseFile()==file))
{
return entry;
}
}
return result;
}
QCString LayoutNavEntry::intro ( ) const
inline
Kind LayoutNavEntry::kind ( ) const
inline

Definition at line 148 of file layout.h.

References m_kind.

Referenced by find(), url(), and writeIndexHierarchyEntries().

{ return m_kind; }
LayoutNavEntry* LayoutNavEntry::parent ( ) const
inline

Definition at line 147 of file layout.h.

References m_parent.

Referenced by LayoutParser::endNavEntry(), VhdlDocGen::findConstraintFile(), and renderQuickLinksAsTabs().

{ return m_parent; }
void LayoutNavEntry::prependChild ( LayoutNavEntry e)
inline

Definition at line 156 of file layout.h.

References m_children.

Referenced by LayoutNavEntry().

{ m_children.prepend(e); }
QCString LayoutNavEntry::title ( ) const
inline
QCString LayoutNavEntry::url ( ) const

Definition at line 96 of file layout.cpp.

References baseFile(), Config_getString, Definition::getOutputFileBase(), Doxygen::htmlFileExtension, kind(), msg(), resolveLink(), User, and UserGroup.

Referenced by writeIndexHierarchyEntries().

{
QCString url = baseFile().stripWhiteSpace();
(kind()==LayoutNavEntry::UserGroup && url.left(9)=="usergroup"))
{
}
else if (url.left(5)=="@ref " || url.left(5)=="\\ref ")
{
QCString anchor;
bool found=FALSE;
if (resolveLink(0,url.mid(5).stripWhiteSpace(),TRUE,&d,anchor))
{
if (d && d->isLinkable())
{
if (!anchor.isEmpty())
{
url+="#"+anchor;
}
found=TRUE;
}
}
if (!found)
{
msg("explicit link request to '%s' in layout file '%s' could not be resolved\n",qPrint(url.mid(5)),qPrint(Config_getString(LAYOUT_FILE)));
}
}
//printf("LayoutNavEntry::url()=%s\n",url.data());
return url;
}
bool LayoutNavEntry::visible ( )
inline

Friends And Related Function Documentation

friend class LayoutDocManager
friend

Definition at line 169 of file layout.h.

Member Data Documentation

QCString LayoutNavEntry::m_baseFile
private

Definition at line 165 of file layout.h.

Referenced by baseFile().

QList<LayoutNavEntry> LayoutNavEntry::m_children
private

Definition at line 168 of file layout.h.

Referenced by addChild(), children(), clear(), find(), LayoutNavEntry(), and prependChild().

QCString LayoutNavEntry::m_intro
private

Definition at line 167 of file layout.h.

Referenced by intro().

Kind LayoutNavEntry::m_kind
private

Definition at line 163 of file layout.h.

Referenced by kind().

LayoutNavEntry* LayoutNavEntry::m_parent
private

Definition at line 162 of file layout.h.

Referenced by parent().

QCString LayoutNavEntry::m_title
private

Definition at line 166 of file layout.h.

Referenced by title().

bool LayoutNavEntry::m_visible
private

Definition at line 164 of file layout.h.

Referenced by visible().


The documentation for this struct was generated from the following files: