discard column colors if item is selected (optional)
[ncmpcpp.git] / src / playlist_editor.h
blob83e68ff455226c4bc494cf3c01dc629e0c5c484c
1 /***************************************************************************
2 * Copyright (C) 2008-2009 by Andrzej Rybczak *
3 * electricityispower@gmail.com *
4 * *
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. *
9 * *
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. *
14 * *
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 _PLAYLIST_EDITOR_H
22 #define _PLAYLIST_EDITOR_H
24 #include "ncmpcpp.h"
26 class PlaylistEditor : public Screen<Window>
28 public:
29 virtual void SwitchTo();
30 virtual void Resize();
32 virtual std::basic_string<my_char_t> Title();
34 virtual void Refresh();
35 virtual void Update();
37 virtual void EnterPressed() { AddToPlaylist(1); }
38 virtual void SpacePressed();
39 virtual void MouseButtonPressed(MEVENT);
40 virtual bool isTabbable() { return true; }
42 virtual MPD::Song *CurrentSong();
44 virtual bool allowsSelection() { return w == Content; }
45 virtual void ReverseSelection() { Content->ReverseSelection(); }
46 virtual void GetSelectedSongs(MPD::SongList &);
48 virtual void ApplyFilter(const std::string &);
50 virtual List *GetList();
52 void NextColumn();
53 void PrevColumn();
55 Menu<std::string> *Playlists;
56 Menu<MPD::Song> *Content;
58 protected:
59 virtual void Init();
61 private:
62 void AddToPlaylist(bool);
64 static size_t LeftColumnWidth;
65 static size_t RightColumnStartX;
66 static size_t RightColumnWidth;
69 extern PlaylistEditor *myPlaylistEditor;
71 #endif