finfodlg.h File Reference

(r1785/r1765)

#include "fontbase.h"
#include "fileinfolist.h"

Go to the source code of this file.

Classes

class  FileInfo
 The file info dialogue shows information on the selected document. More...
class  RefItem
 Item class for the Reference sorting system. More...

Defines

#define OPTOKEN_FINFODLG   _T("FileInfo")

Functions

NodeStartTreeScan (Document *pDoc)
 To scan a tree "not depth first". Instead of skipping to the bottom of the tree and scanning back up I want to scan to the bottom and skip back up. Initialises the scan of the document. See also: GetNextTreeNode.
NodeGetNextTreeNode (Node *Current)
 To scan a tree "not depth first". Instead of skipping to the bottom of the tree and scanning back up I want to scan to the bottom and skip back up. Gets the node after the current one. Returns NULL if no more See also: StartTreeScan, SkipSubTreeScan.
NodeSkipSubtreeScan (Node *Current)
 To skip the scan of the children of the current node. The node returned is either a sibling or a parent of the current node. Can return NULL. See also: GetNextTreeNode.


Define Documentation

#define OPTOKEN_FINFODLG   _T("FileInfo")
 

Definition at line 106 of file finfodlg.h.


Function Documentation

Node* GetNextTreeNode Node Current  ) 
 

To scan a tree "not depth first". Instead of skipping to the bottom of the tree and scanning back up I want to scan to the bottom and skip back up. Gets the node after the current one. Returns NULL if no more See also: StartTreeScan, SkipSubTreeScan.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
31th August 1994
Parameters:
The current node. [INPUTS]
Returns:
Pointer to the next node.

Definition at line 1091 of file finfodlg.cpp.

01092 {
01093     if (Current == NULL)
01094     {
01095         ENSURE(FALSE,"NULL node pointer passed to GetNextTreeNode");
01096         return NULL;
01097     }
01098     // first try going down one level
01099     if (Current->FindFirstChild() != NULL)
01100     {
01101         return Current->FindFirstChild();
01102     }
01103     // now try going right one
01104     if (Current->FindNext() != NULL)
01105     {
01106         return Current->FindNext();
01107     }
01108     // if we get this far we need to go up and to the right.
01109     Node* Temp = Current->FindParent();;
01110     while (Temp != NULL)
01111     {
01112         if (Temp->FindNext() != NULL)
01113         {
01114             return Temp->FindNext();
01115         }
01116         Temp = Temp->FindParent();
01117     }
01118     // no more nodes left in the document
01119     return NULL;
01120 }   

Node* SkipSubtreeScan Node Current  ) 
 

To skip the scan of the children of the current node. The node returned is either a sibling or a parent of the current node. Can return NULL. See also: GetNextTreeNode.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
31th August 1994
Parameters:
The current node. [INPUTS]
Returns:
Pointer to the next node.

Definition at line 1135 of file finfodlg.cpp.

01136 {
01137     if (Current == NULL)
01138     {
01139         ENSURE(FALSE,"NULL node pointer passed to SkipSubTreeScan");
01140         return NULL;
01141     }
01142     if (Current->FindNext() != NULL)
01143     {
01144         return Current->FindNext();
01145     }
01146 
01147     // now we need to go up and to the right.
01148     Node* Temp = Current->FindParent();
01149     while (Temp != NULL)
01150     {
01151         if (Temp->FindNext() != NULL)
01152         {
01153             return Temp->FindNext();
01154         }
01155         Temp = Temp->FindParent();
01156     }
01157     return NULL;
01158 }   

Node* StartTreeScan Document pDoc  ) 
 

To scan a tree "not depth first". Instead of skipping to the bottom of the tree and scanning back up I want to scan to the bottom and skip back up. Initialises the scan of the document. See also: GetNextTreeNode.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
31th August 1994
Parameters:
Pointer to the document to scan. [INPUTS]
Returns:
Pointer to the first node.

Definition at line 1067 of file finfodlg.cpp.

01068 {
01069     if (pDoc == NULL)          
01070     {
01071         ENSURE(FALSE,"NULL document pointer passed to StartTreeScan");
01072         return NULL;
01073     }
01074     return pDoc->GetFirstNode();
01075 }   


Generated on Sat Nov 10 03:49:09 2007 for Camelot by  doxygen 1.4.4