:
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);
}
}
wxButton *btnNext = new wxButton(this, wxID_NEXT_TIP, _("&Next"));
wxStaticText *text = new wxStaticText(this, -1, _("Did you know..."), wxDefaultPosition, wxSize(-1,25) );
+#if defined(__WXMSW__)
+ text->SetFont(wxFont(16, wxSWISS, wxNORMAL, wxBOLD));
+#else
text->SetFont(wxFont(18, wxSWISS, wxNORMAL, wxBOLD));
+#endif
//
// text->SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE));
SetSize(pos.x, pos.y, size.x, size.y);
+ // bad hack added by Robert to make buttons at least
+ // 80 pixels wide. There are probably better ways...
+ // TODO. FIXME.
+ wxSize nsize( GetSize() );
+ if ((nsize.x < 80) || (nsize.y < 23))
+ {
+ if ((size.x == -1) && (nsize.x < 80)) nsize.x = 80;
+ if ((size.y == -1) && (nsize.y < 23)) nsize.y = 23;
+ SetSize( nsize );
+ }
+
return TRUE;
}