DebugTreeInfo Class Reference

Encapsulates the platform dependent parts of the debug tree dialog. It provides a simple way of linking a datum to a particular item in the debug tree dialog's list box. This kind of facility can often be supported by the GUI, hence it is in the OIL layer. More...

#include <oildbug.h>

List of all members.

Public Member Functions

 DebugTreeInfo (CWindowID NewID)
 ~DebugTreeInfo ()
BOOL Init ()
void AddDebugInfo (INT32 Index, void *Ref)
 Associate a piece of data with a given item in the listbox of the tree dialog.
void RemoveDebugInfo (INT32 Index)
void * GetDebugInfo (INT32 Index)
 Retrieve the piece of data associated with a list item (from the list box of the tree dialog).
void OutputDebugLine (TCHAR *)
 Output a string to whatever debug console type device this OS supports.

Static Public Member Functions

static void OutputDebug (TCHAR *)
 Output a string to whatever debug console type device this OS supports. (This version is static so anyone can use it. It's implemented as a separate function so that I can guarantee not to upset OutputDebugLine above...).

Private Attributes

CWindowID WindowID


Detailed Description

Encapsulates the platform dependent parts of the debug tree dialog. It provides a simple way of linking a datum to a particular item in the debug tree dialog's list box. This kind of facility can often be supported by the GUI, hence it is in the OIL layer.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
06/06/94
See also:
DebugTreeInfo::AddDebugInfo; DebugTreeInfo::GetDebugInfo

Definition at line 119 of file oildbug.h.


Constructor & Destructor Documentation

DebugTreeInfo::DebugTreeInfo CWindowID  NewID  )  [inline]
 

Definition at line 122 of file oildbug.h.

00122 { WindowID = NewID; }

DebugTreeInfo::~DebugTreeInfo  )  [inline]
 

Definition at line 123 of file oildbug.h.

00123 {}


Member Function Documentation

void DebugTreeInfo::AddDebugInfo INT32  Index,
void *  Ref
 

Associate a piece of data with a given item in the listbox of the tree dialog.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
06/06/94
Parameters:
Index - the index of the item to associate the datum with. [INPUTS] Ref - the datum to associate with the list item.
See also:
DebugTreeInfo::GetDebugInfo

Definition at line 121 of file oildbug.cpp.

00122 {
00123     PORTNOTETRACE("other","DebugTreeInfo::AddDebugInfo - do nothing");
00124 #ifndef EXCLUDE_FROM_XARALX
00125     // Take the easy way out under Windows - let the list box do all the hard work.
00126     ::SendMessage( (HWND)WindowID, LB_SETITEMDATA, (WPARAM) Index, (LPARAM) Ref );
00127 #endif
00128 }

void * DebugTreeInfo::GetDebugInfo INT32  Index  ) 
 

Retrieve the piece of data associated with a list item (from the list box of the tree dialog).

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
06/06/94
Parameters:
Index - the index of the listbox item to examine. [INPUTS]
Returns:
The datum for the specified listbox item.
See also:
DebugTreeInfo::AddDebugInfo

Definition at line 144 of file oildbug.cpp.

00145 {
00146     PORTNOTETRACE("other","DebugTreeInfo::GetDebugInfo - do nothing");
00147 #ifndef EXCLUDE_FROM_XARALX
00148     // Take the easy way out under Windows - let the list box do all the hard work.
00149     INT32               nVal = INT32(::SendMessage((HWND) WindowID, LB_GETITEMDATA, (WPARAM) Index, 0));
00150     if( -1 == nVal )
00151         return NULL;
00152     return (void *)nVal
00153 #else
00154     return NULL;
00155 #endif
00156 }

BOOL DebugTreeInfo::Init void   )  [inline]
 

Definition at line 125 of file oildbug.h.

00125 { return TRUE; }

void DebugTreeInfo::OutputDebug TCHAR Str  )  [static]
 

Output a string to whatever debug console type device this OS supports. (This version is static so anyone can use it. It's implemented as a separate function so that I can guarantee not to upset OutputDebugLine above...).

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/94
Parameters:
Str - the string to dump [INPUTS]

Definition at line 192 of file oildbug.cpp.

00193 {
00194 #if defined(__WXMSW__)
00195     OutputDebugString( Str );
00196 #elif defined(__WXGTK__)
00197     camPrintf( Str );
00198 #else
00199     #pragma error( "Not impl'ed from this architechure" );
00200 #endif
00201 }

void DebugTreeInfo::OutputDebugLine TCHAR Str  ) 
 

Output a string to whatever debug console type device this OS supports.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/94
Parameters:
Str - the string to dump [INPUTS]

Definition at line 169 of file oildbug.cpp.

00170 {
00171 #if defined(__WXMSW__)
00172     OutputDebugString( Str );
00173 #else
00174     #pragma error( "Not impl'ed from this architechure" );
00175 #endif
00176 }

void DebugTreeInfo::RemoveDebugInfo INT32  Index  )  [inline]
 

Definition at line 129 of file oildbug.h.

00129 {}


Member Data Documentation

CWindowID DebugTreeInfo::WindowID [private]
 

Definition at line 138 of file oildbug.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:53:29 2007 for Camelot by  doxygen 1.4.4