X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/94799627ee0ad217b2fc41df5bd5bccf59494e00..00a693ed2fb7e0a8abf386a8ecee279f6301601b:/src/generic/treelay.cpp?ds=sidebyside diff --git a/src/generic/treelay.cpp b/src/generic/treelay.cpp index f75f813744..947d53e6ac 100644 --- a/src/generic/treelay.cpp +++ b/src/generic/treelay.cpp @@ -21,7 +21,7 @@ #endif #ifndef WX_PRECOMP -#include +#include "wx/wx.h" #endif #if wxUSE_TREELAYOUT @@ -99,12 +99,12 @@ void wxTreeLayout::DrawBranches(wxDC& dc) 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, ""); + wxSprintf(buf, wxT("")); long x = 80; long y = 20; @@ -127,7 +127,7 @@ void wxTreeLayout::Initialize(void) 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 { @@ -283,7 +283,7 @@ long wxTreeLayoutStored::AddChild(const wxString& name, const wxString& parent) if (m_num < (m_maxNodes -1 )) { long i = -1; - if (parent != "") + if (parent != wxT("")) i = NameToId(parent); else m_parentNode = m_num; @@ -427,8 +427,6 @@ wxString wxTreeLayoutStored::HitTest(wxMouseEvent& event, wxDC& dc) 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);