#endif
#ifndef WX_PRECOMP
-#include <wx/wx.h>
+#include "wx/wx.h"
#endif
#if wxUSE_TREELAYOUT
void wxTreeLayout::DrawNode(long id, wxDC& dc)
{
- char buf[80];
+ wxChar buf[80];
wxString name(GetNodeName(id));
- if (name != "")
- sprintf(buf, "%s", (const char*) name);
+ if (name != wxT(""))
+ wxSprintf(buf, wxT("%s"), (const wxChar*) name);
else
- sprintf(buf, "<unnamed>");
+ wxSprintf(buf, wxT("<unnamed>"));
long x = 80;
long y = 20;
void wxTreeLayout::GetNodeSize(long id, long *x, long *y, wxDC& dc)
{
wxString name(GetNodeName(id));
- if (name != "")
+ if (name != wxT(""))
dc.GetTextExtent(name, x, y);
else
{
if (m_num < (m_maxNodes -1 ))
{
long i = -1;
- if (parent != "")
+ if (parent != wxT(""))
i = NameToId(parent);
else m_parentNode = m_num;
int i;
for (i = 0; i < m_maxNodes; i++)
{
- wxStoredNode* item = &m_nodes[i];
-
long width, height;
dc.GetTextExtent(m_nodes[i].m_name, &width, &height);