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

Method Draw

ReClass/CNodeArray.cpp:53–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53NODESIZE CNodeArray::Draw( const PVIEWINFO View, int x, int y )
54{
55 NODESIZE DrawSize;
56 NODESIZE ChildDrawSize;
57
58 if (m_bHidden)
59 return DrawHidden( View, x, y );
60
61 DrawSize.x = 0;
62
63 AddSelection( View, 0, y, g_FontHeight );
64 AddDelete( View, x, y );
65 AddTypeDrop( View, x, y );
66
67 x = AddOpenClose( View, x, y );
68 x = AddIcon( View, x, y, ICON_ARRAY, -1, -1 );
69
70 int tx = x;
71 tx = AddAddressOffset( View, tx, y );
72
73 tx = AddText( View, tx, y, g_crType, HS_NONE, _T( "Array " ) );
74 tx = AddText( View, tx, y, g_crName, HS_NAME, _T( "%s" ), m_strName );
75 tx = AddText( View, tx, y, g_crIndex, HS_NONE, _T( "[" ) );
76 tx = AddText( View, tx, y, g_crIndex, HS_EDIT, _T( "%u" ), m_ulTotal );
77 tx = AddText( View, tx, y, g_crIndex, HS_NONE, _T( "]" ) );
78
79 tx = AddIcon( View, tx, y, ICON_LEFT, HS_SELECT, HS_CLICK );
80 tx = AddText( View, tx, y, g_crIndex, HS_NONE, _T( "(" ) );
81 tx = AddText( View, tx, y, g_crIndex, 1, _T( "%i" ), m_iCurrent );
82 tx = AddText( View, tx, y, g_crIndex, HS_NONE, _T( ")" ) );
83 tx = AddIcon( View, tx, y, ICON_RIGHT, HS_DROP, HS_CLICK );
84
85 tx = AddText( View, tx, y, g_crValue, HS_NONE, _T( "<%s Size=%u>" ), m_pNode->GetName( ), GetMemorySize( ) );
86 tx = AddIcon( View, tx, y, ICON_CHANGE, HS_CLICK, HS_CHANGE_X );
87
88 tx += g_FontWidth;
89 tx = AddComment( View, tx, y );
90
91 y += g_FontHeight;
92 if (m_LevelsOpen[View->Level])
93 {
94 VIEWINFO NewView;
95 memcpy( &NewView, View, sizeof( NewView ) );
96 NewView.Address = View->Address + m_Offset + m_pNode->GetMemorySize( ) * m_iCurrent;
97 NewView.Data = (UCHAR*)((uintptr_t)View->Data + m_Offset + m_pNode->GetMemorySize( ) * m_iCurrent);
98
99 ChildDrawSize = m_pNode->Draw( &NewView, x, y );
100
101 y = ChildDrawSize.y;
102 if (ChildDrawSize.x > DrawSize.x)
103 {
104 DrawSize.x = ChildDrawSize.x;
105 }
106 }
107
108 DrawSize.y = y;
109 return DrawSize;
110}

Callers

nothing calls this directly

Calls 1

GetMemorySizeMethod · 0.45

Tested by

no test coverage detected