X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d96cdd4a885886d1c76c6f4cb1a7eefba34b3d10..b63269cabe710bf0024bce483fa6ebf1331bc034:/contrib/samples/mmedia/mmboard.cpp diff --git a/contrib/samples/mmedia/mmboard.cpp b/contrib/samples/mmedia/mmboard.cpp index 6d71ad5239..3015dd5308 100644 --- a/contrib/samples/mmedia/mmboard.cpp +++ b/contrib/samples/mmedia/mmboard.cpp @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- #ifdef __GNUG__ - #pragma implementation "mmboard.cpp" + #pragma implementation "mmboard.h" #endif // For compilers that support precompilation, includes "wx/wx.h". @@ -198,7 +198,15 @@ wxUint8 MMBoardApp::TestMultimediaCaps() caps = 0; -#ifdef __UNIX__ +#ifdef __WIN32__ + // We test the Windows sound support. + + dev = new wxSoundStreamWin(); + if (dev->GetError() == wxSOUND_NOERROR) + caps |= MM_SOUND_WIN; + delete dev; + +#elif defined __UNIX__ // We now test the ESD support dev = new wxSoundStreamESD(); @@ -221,15 +229,6 @@ wxUint8 MMBoardApp::TestMultimediaCaps() } #endif -#endif - -#ifdef __WIN32__ - // We test the Windows sound support. - - dev = new wxSoundStreamWin(); - if (dev->GetError() == wxSOUND_NOERROR) - caps |= MM_SOUND_WIN; - delete dev; #endif return caps; @@ -284,7 +283,7 @@ MMBoardFrame::MMBoardFrame(const wxString& title, const wxPoint& pos, const wxSi // Initialize main slider m_positionSlider = new wxSlider( m_panel, MMBoard_PositionSlider, 0, 0, 60, - wxDefaultPosition, wxSize(300, wxDefaultSize.y), + wxDefaultPosition, wxSize(300, wxDefaultCoord), wxSL_HORIZONTAL | wxSL_AUTOTICKS); m_positionSlider->SetPageSize(60); // 60 secs m_positionSlider->Disable(); @@ -297,13 +296,17 @@ MMBoardFrame::MMBoardFrame(const wxString& title, const wxPoint& pos, const wxSi wxBoxSizer *infoSizer = new wxBoxSizer(wxVERTICAL); m_fileType = new wxStaticText(infoPanel, wxID_ANY, wxEmptyString); +#if wxUSE_STATLINE wxStaticLine *line = new wxStaticLine(infoPanel, wxID_ANY); +#endif // wxUSE_STATLINE m_infoText = new wxStaticText(infoPanel, wxID_ANY, wxEmptyString); UpdateInfoText(); infoSizer->Add(m_fileType, 0, wxGROW | wxALL, 1); +#if wxUSE_STATLINE infoSizer->Add(line, 0, wxGROW | wxCENTRE, 20); +#endif // wxUSE_STATLINE infoSizer->Add(m_infoText, 0, wxGROW | wxALL, 1); infoPanel->SetSizer(infoSizer); @@ -332,11 +335,17 @@ MMBoardFrame::MMBoardFrame(const wxString& title, const wxPoint& pos, const wxSi // Top sizer m_sizer = new wxBoxSizer(wxVERTICAL); +#if wxUSE_STATLINE m_sizer->Add(new wxStaticLine(m_panel, wxID_ANY), 0, wxGROW | wxCENTRE, 0); +#endif // wxUSE_STATLINE m_sizer->Add(m_positionSlider, 0, wxCENTRE | wxGROW | wxALL, 2); +#if wxUSE_STATLINE m_sizer->Add(new wxStaticLine(m_panel, wxID_ANY), 0, wxGROW | wxCENTRE, 0); +#endif // wxUSE_STATLINE m_sizer->Add(buttonSizer, 0, wxALL, 0); +#if wxUSE_STATLINE m_sizer->Add(new wxStaticLine(m_panel, wxID_ANY), 0, wxGROW | wxCENTRE, 0); +#endif // wxUSE_STATLINE m_sizer->Add(infoPanel, 1, wxCENTRE | wxGROW, 0); m_panel->SetSizer(m_sizer);