| 44 | } |
| 45 | |
| 46 | NODESIZE CNodeClass::Draw( const PVIEWINFO View, int x, int y ) |
| 47 | { |
| 48 | NODESIZE DrawSize; |
| 49 | NODESIZE ChildDrawSize; |
| 50 | |
| 51 | DrawSize.x = 0; |
| 52 | DrawSize.y = 0; |
| 53 | |
| 54 | AddSelection( View, x, y, g_FontHeight ); |
| 55 | x = AddOpenClose( View, x, y ); |
| 56 | |
| 57 | // Save tx here |
| 58 | int tx = x; |
| 59 | |
| 60 | x = AddIcon( View, x, y, ICON_CLASS, -1, -1 ); |
| 61 | x = AddText( View, x, y, g_crOffset, 0, _T( "%s" ), m_strOffset ) + g_FontWidth; |
| 62 | |
| 63 | // x += ( NumDigits( m_Offset ) ) * FontWidth; |
| 64 | // TODO, figure this out better |
| 65 | // x += ( ( NumDigits( m_Offset ) - 7 ) * FontWidth ) / 2; |
| 66 | // printf( "Print %s at %d\n", m_strOffset, x ); |
| 67 | |
| 68 | x = AddText( View, x, y, g_crIndex, HS_NONE, _T( "(" ) ); |
| 69 | x = AddText( View, x, y, g_crIndex, HS_OPENCLOSE, _T( "%i" ), m_Idx ); |
| 70 | x = AddText( View, x, y, g_crIndex, HS_NONE, _T( ")" ) ); |
| 71 | |
| 72 | x = AddText( View, x, y, g_crType, HS_NONE, _T( "Class " ) ); |
| 73 | x = AddText( View, x, y, g_crName, HS_NAME, m_strName ) + g_FontWidth; |
| 74 | x = AddText( View, x, y, g_crValue, HS_NONE, _T( "[%i]" ), GetMemorySize( ) ) + g_FontWidth; |
| 75 | x = AddComment( View, x, y ); |
| 76 | |
| 77 | DrawSize.x = x; |
| 78 | y += g_FontHeight; |
| 79 | if (m_LevelsOpen[View->Level]) |
| 80 | { |
| 81 | VIEWINFO ViewInfo; |
| 82 | memcpy( &ViewInfo, View, sizeof( ViewInfo ) ); |
| 83 | ViewInfo.Level++; |
| 84 | |
| 85 | for (UINT i = 0; i < m_ChildNodes.size( ); i++) |
| 86 | { |
| 87 | CNodeBase* pNode = m_ChildNodes[i]; |
| 88 | if (!pNode) |
| 89 | { |
| 90 | PrintOut( _T( "Node %d is NULL in class %s!" ), i, m_strName.GetString( ) ); |
| 91 | continue; |
| 92 | } |
| 93 | |
| 94 | if (pNode->GetType( ) == nt_vtable) |
| 95 | { |
| 96 | CNodeVTable* VTableNode = static_cast<CNodeVTable*>(pNode); |
| 97 | if (!VTableNode->IsInitialized( ) && m_pChildClassFrame != nullptr) |
| 98 | VTableNode->Initialize( static_cast<CWnd*>(m_pChildClassFrame->GetChildView( )) ); |
| 99 | } |
| 100 | |
| 101 | if (pNode->GetType( ) == nt_function) |
| 102 | { |
| 103 | CNodeFunction* FunctionNode = static_cast<CNodeFunction*>(pNode); |
nothing calls this directly
no test coverage detected