1 /* 2 * Audacious - a cross-platform multimedia player 3 * Copyright (c) 2007 Tomasz Moń 4 * Copyright (c) 2011 John Lindgren 5 * 6 * Based on: 7 * BMP - Cross-platform multimedia player 8 * Copyright (C) 2003-2004 BMP development team. 9 * XMMS: 10 * Copyright (C) 1998-2003 XMMS development team. 11 * 12 * This program is free software; you can redistribute it and/or modify 13 * it under the terms of the GNU General Public License as published by 14 * the Free Software Foundation; under version 3 of the License. 15 * 16 * This program is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with this program. If not, see <http://www.gnu.org/licenses>. 23 * 24 * The Audacious team does not consider modular code linking to 25 * Audacious or using our public API to be a derived work. 26 */ 27 28 #ifndef SKINS_UI_SKINNED_PLAYLIST_SLIDER_H 29 #define SKINS_UI_SKINNED_PLAYLIST_SLIDER_H 30 31 #include "widget.h" 32 33 class PlaylistWidget; 34 35 class PlaylistSlider : public Widget 36 { 37 public: 38 PlaylistSlider (PlaylistWidget * list, int height); 39 void resize (int height); 40 void refresh (); 41 42 private: 43 void draw (cairo_t * cr); 44 bool button_press (GdkEventButton * event); 45 bool button_release (GdkEventButton * event); 46 bool motion (GdkEventMotion * event); 47 48 void set_pos (int y); 49 50 PlaylistWidget * m_list; 51 int m_height, m_length; 52 bool m_pressed = false; 53 }; 54 55 #endif 56