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

Method Draw

ReClass/CNodeUnicode.cpp:41–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41NODESIZE CNodeUnicode::Draw( const PVIEWINFO View, int x, int y )
42{
43 int tx;
44 NODESIZE DrawSize;
45 wchar_t *Data;
46
47 if (m_bHidden)
48 return DrawHidden( View, x, y );
49
50 Data = (wchar_t*)(View->Data + m_Offset);
51
52 AddSelection( View, 0, y, g_FontHeight );
53 AddDelete( View, x, y );
54 AddTypeDrop( View, x, y );
55 //AddAdd(View,x,y);
56
57 tx = x + TXOFFSET;
58 tx = AddIcon( View, tx, y, ICON_TEXT, HS_NONE, HS_NONE );
59 tx = AddAddressOffset( View, tx, y );
60 tx = AddText( View, tx, y, g_crType, HS_NONE, _T( "Unicode " ) );
61 tx = AddText( View, tx, y, g_crName, HS_NAME, _T( "%s" ), m_strName );
62 tx = AddText( View, tx, y, g_crIndex, HS_NONE, _T( "[" ) );
63 tx = AddText( View, tx, y, g_crIndex, HS_EDIT, _T( "%i" ), m_dwMemorySize / sizeof( wchar_t ) );
64 tx = AddText( View, tx, y, g_crIndex, HS_NONE, _T( "]" ) );
65
66 if (VALID( Data ))
67 {
68 CStringW MemoryString( GetStringFromMemoryW( Data, m_dwMemorySize / sizeof( wchar_t ) ) );
69 tx = AddText( View, tx, y, g_crChar, HS_NONE, _T( " = '" ) );
70 tx = AddText( View, tx, y, g_crChar, HS_OPENCLOSE, _T( "%.150ws" ), MemoryString.GetString( ) ); // ws cause its unicode
71 tx = AddText( View, tx, y, g_crChar, HS_NONE, _T( "' " ) ) + g_FontWidth;
72 }
73
74 tx = AddComment( View, tx, y );
75
76 DrawSize.x = tx;
77 DrawSize.y = y + g_FontHeight;
78 return DrawSize;
79}

Callers

nothing calls this directly

Calls 1

GetStringFromMemoryWFunction · 0.85

Tested by

no test coverage detected