summaryrefslogtreecommitdiff
path: root/src/playlist_editor.h
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2009-02-14 18:11:31 +0100
committerAndrzej Rybczak <electricityispower@gmail.com>2009-02-14 18:11:31 +0100
commit7148762b0cd05740d0003100d8b83c2572ed4f89 (patch)
tree1f9a47335e6506d3e022c0e0fe9b80c6a91deefb /src/playlist_editor.h
parent5a06f2a4fc702e96914f5e128f1de7f8018d5b08 (diff)
change namespace PlaylistEditor into class
Diffstat (limited to 'src/playlist_editor.h')
-rw-r--r--src/playlist_editor.h40
1 files changed, 27 insertions, 13 deletions
diff --git a/src/playlist_editor.h b/src/playlist_editor.h
index d493ab6d..ef489768 100644
--- a/src/playlist_editor.h
+++ b/src/playlist_editor.h
@@ -23,22 +23,36 @@
#include "ncmpcpp.h"
-namespace PlaylistEditor
+class PlaylistEditor : public Screen<Window>
{
- void Init();
- void Resize();
- void Refresh();
- void SwitchTo();
- void Update();
+ public:
+ virtual void Init();
+ virtual void SwitchTo();
+ virtual void Resize();
+
+ virtual std::string Title();
+
+ virtual void Refresh();
+ virtual void Update();
+
+ virtual void EnterPressed() { AddToPlaylist(1); }
+ virtual void SpacePressed() { AddToPlaylist(0); }
+
+ void NextColumn();
+ void PrevColumn();
+
+ Menu<std::string> *List;
+ Menu<MPD::Song> *Content;
- void EnterPressed(bool = 1);
- inline void SpacePressed();
-}
+ protected:
+ void AddToPlaylist(bool);
+
+ static size_t LeftColumnWidth;
+ static size_t RightColumnStartX;
+ static size_t RightColumnWidth;
+};
-void PlaylistEditor::SpacePressed()
-{
- EnterPressed(0);
-}
+extern PlaylistEditor *myPlaylistEditor;
#endif