X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dea7e44a76e4e886f2bc60b0e82322a71b1f1f4f..f4430b188929c247408bf14ab70681a080b41675:/contrib/samples/mmedia/mmboard.cpp diff --git a/contrib/samples/mmedia/mmboard.cpp b/contrib/samples/mmedia/mmboard.cpp index bdb509f92a..4ba796c958 100644 --- a/contrib/samples/mmedia/mmboard.cpp +++ b/contrib/samples/mmedia/mmboard.cpp @@ -284,7 +284,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 +297,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 +336,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); @@ -431,7 +441,9 @@ void MMBoardFrame::OnOpen(wxCommandEvent& WXUNUSED(event)) // Update misc info UpdateMMedInfo(); +#if wxUSE_STATUSBAR SetStatusText(selected_file, 2); +#endif // wxUSE_STATUSBAR // Update info text UpdateInfoText(); @@ -469,7 +481,6 @@ void MMBoardFrame::UpdateInfoText() void MMBoardFrame::UpdateMMedInfo() { - wxString temp_string; MMBoardTime current, length; if (m_opened_file) { @@ -480,10 +491,15 @@ void MMBoardFrame::UpdateMMedInfo() length = current; } +#if wxUSE_STATUSBAR // We refresh the status bar + wxString temp_string; temp_string.Printf(wxT("%02d:%02d / %02d:%02d"), current.hours * 60 + current.minutes, current.seconds, length.hours * 60 + length.minutes, length.seconds); SetStatusText(temp_string, 1); +#else + wxUnusedVar(length); +#endif // wxUSE_STATUSBAR // We set the slider position m_positionSlider->SetValue(current.hours * 3600 + current.minutes * 60 + current.seconds);