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.

143  : m_parent(parent), m_kind(k), m_visible(vs), m_baseFile(bf), m_title(tl), m_intro(intro)
145  if (parent) { if (prepend) parent->prependChild(this); else parent->addChild(this); }
146  }
void addChild(LayoutNavEntry *e)
Definition: layout.h:155
LayoutNavEntry * m_parent
Definition: layout.h:162
Kind m_kind
Definition: layout.h:163
QCString m_title
Definition: layout.h:166
bool m_visible
Definition: layout.h:164
QList< LayoutNavEntry > m_children
Definition: layout.h:168
QCString m_baseFile
Definition: layout.h:165
void prependChild(LayoutNavEntry *e)
Definition: layout.h:156
void setAutoDelete(bool enable)
Definition: qlist.h:99
const bool TRUE
Definition: qglobal.h:371
QCString m_intro
Definition: layout.h:167
LayoutNavEntry::LayoutNavEntry ( )
inlineprivate

Definition at line 161 of file layout.h.

161 : m_parent(0) {}
LayoutNavEntry * m_parent
Definition: layout.h:162

Member Function Documentation

void LayoutNavEntry::addChild ( LayoutNavEntry e)
inline

Definition at line 155 of file layout.h.

155 { m_children.append(e); }
void append(const type *d)
Definition: qlist.h:73
QList< LayoutNavEntry > m_children
Definition: layout.h:168
QCString LayoutNavEntry::baseFile ( ) const
inline

Definition at line 149 of file layout.h.

149 { return m_baseFile; }
QCString m_baseFile
Definition: layout.h:165
const QList<LayoutNavEntry>& LayoutNavEntry::children ( ) const
inline

Definition at line 157 of file layout.h.

157 { return m_children; }
QList< LayoutNavEntry > m_children
Definition: layout.h:168
void LayoutNavEntry::clear ( )
inline

Definition at line 154 of file layout.h.

154 { m_children.clear(); }
void clear()
Definition: qlist.h:82
QList< LayoutNavEntry > m_children
Definition: layout.h:168
LayoutNavEntry * LayoutNavEntry::find ( LayoutNavEntry::Kind  k,
const char *  file = 0 
) const

Definition at line 76 of file layout.cpp.

78 {
82  for (li.toFirst();(entry=li.current());++li)
83  {
84  // depth first search, needed to find the entry furthest from the
85  // root in case an entry is in the tree twice
86  result = entry->find(kind,file);
87  if (result) return result;
88  if (entry->kind()==kind && (file==0 || entry->baseFile()==file))
89  {
90  return entry;
91  }
92  }
93  return result;
94 }
QList< Entry > entry
LayoutNavEntry * find(LayoutNavEntry::Kind k, const char *file=0) const
Definition: layout.cpp:76
static QCString result
Base class for the layout of a navigation item at the top of the HTML pages.
Definition: layout.h:118
QCString baseFile() const
Definition: layout.h:149
QList< LayoutNavEntry > m_children
Definition: layout.h:168
Kind kind() const
Definition: layout.h:148
QCString LayoutNavEntry::intro ( ) const
inline

Definition at line 151 of file layout.h.

151 { return m_intro; }
QCString m_intro
Definition: layout.h:167
Kind LayoutNavEntry::kind ( ) const
inline

Definition at line 148 of file layout.h.

148 { return m_kind; }
Kind m_kind
Definition: layout.h:163
LayoutNavEntry* LayoutNavEntry::parent ( ) const
inline

Definition at line 147 of file layout.h.

147 { return m_parent; }
LayoutNavEntry * m_parent
Definition: layout.h:162
void LayoutNavEntry::prependChild ( LayoutNavEntry e)
inline

Definition at line 156 of file layout.h.

156 { m_children.prepend(e); }
QList< LayoutNavEntry > m_children
Definition: layout.h:168
void prepend(const type *d)
Definition: qlist.h:72
QCString LayoutNavEntry::title ( ) const
inline

Definition at line 150 of file layout.h.

150 { return m_title; }
QCString m_title
Definition: layout.h:166
QCString LayoutNavEntry::url ( ) const

Definition at line 96 of file layout.cpp.

97 {
100  (kind()==LayoutNavEntry::UserGroup && url.left(9)=="usergroup"))
101  {
103  }
104  else if (url.left(5)=="@ref " || url.left(5)=="\\ref ")
105  {
106  Definition *d;
107  QCString anchor;
108  bool found=FALSE;
109  if (resolveLink(0,url.mid(5).stripWhiteSpace(),TRUE,&d,anchor))
110  {
111  if (d && d->isLinkable())
112  {
113  url=d->getOutputFileBase()+Doxygen::htmlFileExtension;
114  if (!anchor.isEmpty())
115  {
116  url+="#"+anchor;
117  }
118  found=TRUE;
119  }
120  }
121  if (!found)
122  {
123  msg("explicit link request to '%s' in layout file '%s' could not be resolved\n",qPrint(url.mid(5)),qPrint(Config_getString("LAYOUT_FILE")));
124  }
125  }
126  //printf("LayoutNavEntry::url()=%s\n",url.data());
127  return url;
128 }
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
bool resolveLink(const char *scName, const char *lr, bool, Definition **resContext, QCString &resAnchor)
Definition: util.cpp:4753
bool isEmpty() const
Definition: qcstring.h:189
void msg(const char *fmt,...)
Definition: message.cpp:107
QCString url() const
Definition: layout.cpp:96
static QCString htmlFileExtension
Definition: doxygen.h:130
const bool FALSE
Definition: qglobal.h:370
QCString left(uint len) const
Definition: qcstring.cpp:213
#define Config_getString(val)
Definition: config.cpp:660
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
QCString baseFile() const
Definition: layout.h:149
Kind kind() const
Definition: layout.h:148
const char * qPrint(const char *s)
Definition: qcstring.h:797
const bool TRUE
Definition: qglobal.h:371
bool LayoutNavEntry::visible ( )
inline

Definition at line 153 of file layout.h.

153 { return m_visible; }
bool m_visible
Definition: layout.h:164

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.

QList<LayoutNavEntry> LayoutNavEntry::m_children
private

Definition at line 168 of file layout.h.

QCString LayoutNavEntry::m_intro
private

Definition at line 167 of file layout.h.

Kind LayoutNavEntry::m_kind
private

Definition at line 163 of file layout.h.

LayoutNavEntry* LayoutNavEntry::m_parent
private

Definition at line 162 of file layout.h.

QCString LayoutNavEntry::m_title
private

Definition at line 166 of file layout.h.

bool LayoutNavEntry::m_visible
private

Definition at line 164 of file layout.h.


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