+
+void Interface::OnSlowStream( wxCommandEvent& WXUNUSED(event) )
+{
+ input_thread_t *p_input =
+ (input_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_INPUT,
+ FIND_ANYWHERE );
+ if( p_input )
+ {
+ input_SetStatus( p_input, INPUT_STATUS_SLOWER );
+ vlc_object_release( p_input );
+ }
+}
+
+void Interface::OnFastStream( wxCommandEvent& WXUNUSED(event) )
+{
+ input_thread_t *p_input =
+ (input_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_INPUT,
+ FIND_ANYWHERE );
+ if( p_input )
+ {
+ input_SetStatus( p_input, INPUT_STATUS_FASTER );
+ vlc_object_release( p_input );
+ }
+}
+
+void Interface::TogglePlayButton( int i_playing_status )
+{
+ if( i_playing_status == i_old_playing_status )
+ return;
+
+ GetToolBar()->DeleteTool( PlayStream_Event );
+
+ if( i_playing_status == PLAYING_S )
+ {
+ GetToolBar()->InsertTool( 5, PlayStream_Event, wxU(_("Pause")),
+ wxBitmap( pause_xpm ), wxNullBitmap,
+ wxITEM_NORMAL, wxU(_(HELP_PAUSE)) );
+ }
+ else
+ {
+ GetToolBar()->InsertTool( 5, PlayStream_Event, wxU(_("Play")),
+ wxBitmap( play_xpm ), wxNullBitmap,
+ wxITEM_NORMAL, wxU(_(HELP_PLAY)) );
+ }
+
+ GetToolBar()->Realize();
+
+ i_old_playing_status = i_playing_status;
+}
+
+#if !defined(__WXX11__)
+/*****************************************************************************
+ * Definition of DragAndDrop class.
+ *****************************************************************************/
+DragAndDrop::DragAndDrop( intf_thread_t *_p_intf )
+{
+ p_intf = _p_intf;
+}
+
+bool DragAndDrop::OnDropFiles( wxCoord, wxCoord,
+ const wxArrayString& filenames )
+{
+ /* Add dropped files to the playlist */
+
+ playlist_t *p_playlist =
+ (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+ if( p_playlist == NULL )
+ {
+ return FALSE;
+ }
+
+ for( size_t i = 0; i < filenames.GetCount(); i++ )
+ playlist_Add( p_playlist, (const char *)filenames[i].mb_str(),
+ PLAYLIST_APPEND | (i ? 0 : PLAYLIST_GO), PLAYLIST_END );
+
+ vlc_object_release( p_playlist );
+
+ return TRUE;
+}
+#endif
+
+/*****************************************************************************
+ * Definition of wxVolCtrl class.
+ *****************************************************************************/
+wxVolCtrl::wxVolCtrl( intf_thread_t *_p_intf, wxWindow* parent, wxWindowID id )
+ : wxGauge( parent, id, 200, wxDefaultPosition, wxDefaultSize,
+ wxGA_VERTICAL | wxGA_SMOOTH )
+{
+ p_intf = _p_intf;
+}
+
+void wxVolCtrl::OnChange( wxMouseEvent& event )
+{
+ int i_volume = (GetRect().height - event.GetY()) * 200 / GetRect().height;
+ Change( i_volume );
+}
+
+void wxVolCtrl::Change( int i_volume )
+{
+ aout_VolumeSet( p_intf, i_volume * AOUT_VOLUME_MAX / 200 );
+ SetValue( i_volume );
+ SetToolTip( wxString::Format((wxString)wxU(_("Volume")) + wxT(" %d"),
+ i_volume ) );
+}