MCPcopy Create free account
hub / github.com/ajkhoury/ReClassEx / Draw

Method Draw

ReClass/CNodeVTable.cpp:21–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21NODESIZE CNodeVTable::Draw( const PVIEWINFO View, int x, int y )
22{
23 NODESIZE DrawSize;
24 NODESIZE ChildDrawSize;
25 ULONG_PTR* Data;
26
27 if (m_bHidden)
28 return DrawHidden( View, x, y );
29
30 Data = (ULONG_PTR*)(View->Data + m_Offset);
31
32 AddSelection( View, 0, y, g_FontHeight );
33 AddDelete( View, x, y );
34 AddTypeDrop( View, x, y );
35
36 x = AddOpenClose( View, x, y );
37 x = AddIcon( View, x, y, ICON_VTABLE, -1, -1 );
38
39 int tx = x;
40 x = AddAddressOffset( View, x, y );
41 x = AddText( View, x, y, g_crVTable, HS_NONE, _T( "VTable[%i]" ), m_ChildNodes.size( ) ) + g_FontWidth;
42
43 //if (m_strName.IsEmpty())
44 x = AddText( View, x, y, g_crName, HS_NAME, _T( "%s" ), m_strName ) + g_FontWidth;
45 //else
46 // x = AddText(View, x, y, g_crName, HS_NONE, _T("%s_vtable"), pParent->m_strName) + FontWidth;
47
48 x = AddComment( View, x, y );
49
50 y += g_FontHeight;
51 DrawSize.x = x;
52 DrawSize.y = y;
53
54 if (m_LevelsOpen[View->Level])
55 {
56 VIEWINFO NewView;
57
58 DWORD NeededSize = (DWORD)m_ChildNodes.size( ) * sizeof( ULONG_PTR );
59 m_Memory.SetSize( NeededSize );
60
61 memcpy( &NewView, View, sizeof( NewView ) );
62 NewView.Data = m_Memory.Data( );
63 NewView.Address = *Data;
64
65 ReClassReadMemory( (LPVOID)NewView.Address, NewView.Data, NeededSize );
66
67 for (UINT i = 0; i < m_ChildNodes.size( ); i++)
68 {
69 CNodeFunctionPtr* FunctionPtrNode = static_cast<CNodeFunctionPtr*>(m_ChildNodes[i]);
70
71 FunctionPtrNode->SetOffset( i * sizeof( ULONG_PTR ) );
72
73 if (!FunctionPtrNode->IsInitialized( ))
74 FunctionPtrNode->Initialize( m_pParentWindow, NewView.Address + i * sizeof( ULONG_PTR ) );
75
76 ChildDrawSize = FunctionPtrNode->Draw( &NewView, tx, y );
77
78 DrawSize.y = ChildDrawSize.y;

Callers

nothing calls this directly

Calls 8

ReClassReadMemoryFunction · 0.85
DataMethod · 0.80
SetOffsetMethod · 0.80
HideAssemblyWindowMethod · 0.80
sizeMethod · 0.45
SetSizeMethod · 0.45
IsInitializedMethod · 0.45
InitializeMethod · 0.45

Tested by

no test coverage detected