// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
#pragma implementation
#pragma interface
#endif
#include "wx/wx.h"
#endif
+#ifdef __WXWINCE__
+#include "wx/msw/wince/time.h"
+#endif
+
#include "wx/colordlg.h"
#include "wx/filedlg.h"
#include "wx/dirdlg.h"
#define wxUSE_DIRDLGG 0
-#if !defined(__WXMSW__) || defined(wxUSE_DIRDLGG) && wxUSE_DIRDLGG
+#if !(defined(__WXMSW__) || defined(__WXMAC__)) || wxUSE_DIRDLGG
#include "wx/generic/dirdlgg.h"
#endif
wxColourData retData = dialog.GetColourData();
col = retData.GetColour();
myCanvas->SetBackgroundColour(col);
- myCanvas->Clear();
+ myCanvas->ClearBackground();
myCanvas->Refresh();
}
}
wxColour col = retData.GetColour();
// wxBrush *brush = wxTheBrushList->FindOrCreateBrush(&col, wxSOLID);
myCanvas->SetBackgroundColour(col);
- myCanvas->Clear();
+ myCanvas->ClearBackground();
myCanvas->Refresh();
}
dialog->Destroy();
}
#endif // wxTEST_GENERIC_DIALOGS_IN_MSW
-void MyFrame::LogDialog(wxCommandEvent& event)
+void MyFrame::LogDialog(wxCommandEvent& WXUNUSED(event))
{
// calling wxYield() (as ~wxBusyCursor does) shouldn't result in messages
// being flushed -- test it
if ( count )
{
wxString msg;
- msg.Printf(wxT("You selected %u items:\n"), count);
+ msg.Printf(wxT("You selected %u items:\n"), (unsigned)count);
for ( size_t n = 0; n < count; n++ )
{
- msg += wxString::Format(wxT("\t%u: %u (%s)\n"), n, selections[n],
+ msg += wxString::Format(wxT("\t%u: %u (%s)\n"),
+ (unsigned)n, (unsigned)selections[n],
choices[selections[n]].c_str());
}
wxLogMessage(msg);
void MyFrame::FilesOpen(wxCommandEvent& WXUNUSED(event) )
{
+ wxString wildcards =
+#ifdef __WXMOTIF__
+ _T("C++ files (*.cpp)|*.cpp");
+#else
+ _T("All files (*.*)|*.*|C++ files (*.h;*.cpp)|*.h;*.cpp");
+#endif
wxFileDialog dialog(this, _T("Testing open multiple file dialog"),
- _T(""), _T(""), wxFileSelectorDefaultWildcardStr,
+ _T(""), _T(""), wildcards,
wxMULTIPLE);
if (dialog.ShowModal() == wxID_OK)
for ( size_t n = 0; n < count; n++ )
{
s.Printf(_T("File %d: %s (%s)\n"),
- n, paths[n].c_str(), filenames[n].c_str());
+ (int)n, paths[n].c_str(), filenames[n].c_str());
msg += s;
}
+ s.Printf(_T("Filter index: %d"), dialog.GetFilterIndex());
+ msg += s;
wxMessageDialog dialog2(this, msg, _T("Selected files"));
dialog2.ShowModal();
void MyFrame::DirChooseNew(wxCommandEvent& WXUNUSED(event) )
{
- DoDirChoose(wxDD_NEW_DIR_BUTTON);
+ DoDirChoose(wxDD_DEFAULT_STYLE | wxDD_NEW_DIR_BUTTON);
}
#if defined(__WXMSW__) || defined(__WXMAC__)
void MyFrame::GenericDirChoose(wxCommandEvent& WXUNUSED(event) )
{
-#if !defined(__WXMSW__) || defined(wxUSE_DIRDLGG) && wxUSE_DIRDLGG
+#if !(defined(__WXMSW__) || defined(__WXMAC__)) || wxUSE_DIRDLGG
// pass some initial dir to wxDirDialog
wxString dirHome;
wxGetHomeDir(&dirHome);
}
}
-void MyFrame::ShowTip(wxCommandEvent& event)
+void MyFrame::ShowTip(wxCommandEvent& WXUNUSED(event))
{
#if wxUSE_STARTUP_TIPS
static size_t s_index = (size_t)-1;