1 /***************************************************************************
2 * Copyright (C) 2008-2014 by Andrzej Rybczak *
3 * electricityispower@gmail.com *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
21 #ifndef NCMPCPP_INTERFACES_H
22 #define NCMPCPP_INTERFACES_H
28 #include "proxy_song_list.h"
32 virtual bool allowsFiltering() = 0;
33 virtual std::string
currentFilter() = 0;
34 virtual void applyFilter(const std::string
&filter
) = 0;
39 virtual bool allowsSearching() = 0;
40 virtual bool search(const std::string
&constraint
) = 0;
41 virtual void nextFound(bool wrap
) = 0;
42 virtual void prevFound(bool wrap
) = 0;
47 virtual ProxySongList
proxySongList() = 0;
49 virtual bool allowsSelection() = 0;
50 virtual void reverseSelection() = 0;
51 virtual MPD::SongList
getSelectedSongs() = 0;
56 virtual bool previousColumnAvailable() = 0;
57 virtual void previousColumn() = 0;
59 virtual bool nextColumnAvailable() = 0;
60 virtual void nextColumn() = 0;
65 Tabbable() : m_previous_screen(0) { }
67 void switchToPreviousScreen() const {
68 if (m_previous_screen
)
69 m_previous_screen
->switchTo();
71 void setPreviousScreen(BaseScreen
*screen
) {
72 m_previous_screen
= screen
;
74 BaseScreen
*previousScreen() const {
75 return m_previous_screen
;
79 BaseScreen
*m_previous_screen
;
82 #endif // NCMPCPP_INTERFACES_H