+ //
+ // Create the playlist/listctrl
+ //
+ m_playlist = new wxMediaPlayerListCtrl();
+ m_playlist->Create(this, wxID_LISTCTRL, wxDefaultPosition,
+ wxDefaultSize,
+ wxLC_REPORT // wxLC_LIST
+ | wxSUNKEN_BORDER);
+
+ // Set the background of our listctrl to white
+ m_playlist->SetBackgroundColour(wxColour(255,255,255));
+
+ // The layout of the headers of the listctrl are like
+ // | | File | Length
+ //
+ // Where Column one is a character representing the state the file is in:
+ // * - not the current file
+ // E - Error has occured
+ // > - Currently Playing
+ // [] - Stopped
+ // || - Paused
+ // (( - Volume Down 5%
+ // )) - Volume Up 5%
+ //
+ // Column two is the name of the file
+ //
+ // Column three is the length in seconds of the file
+ m_playlist->InsertColumn(0,_(""), wxLIST_FORMAT_CENTER, 20);
+ m_playlist->InsertColumn(1,_("File"), wxLIST_FORMAT_LEFT, /*wxLIST_AUTOSIZE_USEHEADER*/305);
+ m_playlist->InsertColumn(2,_("Length"), wxLIST_FORMAT_CENTER, 75);
+
+#if wxUSE_DRAG_AND_DROP
+ m_playlist->SetDropTarget(new wxPlayListDropTarget(*m_playlist));
+#endif
+
+ sizer->Add(m_playlist, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5);
+
+ //
+ // Create the control buttons
+ // TODO/FIXME/HACK: This part about sizers is really a nice hack
+ // and probably isn't proper
+ //
+ wxBoxSizer* horsizer1 = new wxBoxSizer(wxHORIZONTAL);
+ wxBoxSizer* vertsizer = new wxBoxSizer(wxHORIZONTAL);
+
+ m_prevButton = new wxButton();
+ m_playButton = new wxButton();
+ m_stopButton = new wxButton();
+ m_nextButton = new wxButton();
+ m_vdButton = new wxButton();
+ m_vuButton = new wxButton();
+
+ m_prevButton->Create(this, wxID_BUTTONPREV, wxT("|<"));
+ m_prevButton->SetToolTip("Previous");
+ m_playButton->Create(this, wxID_BUTTONPLAY, wxT(">"));
+ m_playButton->SetToolTip("Play");
+ m_stopButton->Create(this, wxID_BUTTONSTOP, wxT("[]"));
+ m_stopButton->SetToolTip("Stop");
+ m_nextButton->Create(this, wxID_BUTTONNEXT, wxT(">|"));
+ m_nextButton->SetToolTip("Next");
+ m_vdButton->Create(this, wxID_BUTTONVD, wxT("(("));
+ m_vdButton->SetToolTip("Volume down");
+ m_vuButton->Create(this, wxID_BUTTONVU, wxT("))"));
+ m_vuButton->SetToolTip("Volume up");
+
+ vertsizer->Add(m_prevButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ vertsizer->Add(m_playButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ vertsizer->Add(m_stopButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ vertsizer->Add(m_nextButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ vertsizer->Add(m_vdButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ vertsizer->Add(m_vuButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ horsizer1->Add(vertsizer, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ sizer->Add(horsizer1, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
+
+