// Author: Harm van der Heijden and Robert Roebling
// Modified by:
// Created: 12/12/98
+// RCS-ID: $Id$
// Copyright: (c) Harm van der Heijden and Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
:
wxTreeCtrl( parent, id, pos, size, style, wxDefaultValidator, name )
{
- m_imageListNormal = new wxImageList(16, 16, TRUE);
+ #ifdef __WXMSW__
+ m_imageListNormal = new wxImageList(16, 16, TRUE);
m_imageListNormal->Add(wxICON(icon1));
m_imageListNormal->Add(wxICON(icon2));
SetImageList(m_imageListNormal);
+ #endif
m_showHidden = FALSE;
m_rootId = AddRoot( _("Sections") );
m_paths.Clear();
m_names.Clear();
+#ifdef __WXMSW__
+ // better than nothing
+ ADD_SECTION(_T("c:\\"), _("My Harddisk") )
+#else
ADD_SECTION(_T("/"), _("The Computer") )
wxGetHomeDir(&home);
ADD_SECTION(home, _("My Home") )
ADD_SECTION(_T("/var"), _("Variables") )
ADD_SECTION(_T("/etc"), _("Etcetera") )
ADD_SECTION(_T("/tmp"), _("Temporary") )
+#endif
}
#undef ADD_SECTION
for (unsigned int i=0; i<m_paths.Count(); i++)
{
- dir_item = new wxDirItemData(m_paths[i],m_names[i]);
- id = AppendItem( parent, m_names[i], 0, 1, dir_item);
+ dir_item = new wxDirItemData(m_paths[i],m_names[i]);
+#ifdef __WXMSW__
+ id = AppendItem( parent, m_names[i], -1, -1, dir_item);
+#else
+ id = AppendItem( parent, m_names[i], 0, 1, dir_item);
+#endif
if (dir_item->m_hasSubDirs) SetItemHasChildren(id);
}
}