"; }
- virtual const char *getCloseTag() { return ""; }
-
- virtual void postProcess(std::string &data);
+protected:
+ virtual const char *getSiteKeyword() { return "lyricsvip"; }
+ virtual const char *getOpenTag() { return ""; }
+ virtual const char *getCloseTag() { return ""; }
+
+ virtual void postProcess(std::string &data);
};
struct JustSomeLyricsFetcher : public GoogleLyricsFetcher
{
virtual const char *name() { return "justsomelyrics.com"; }
- protected:
- virtual const char *getSiteKeyword() { return "justsomelyrics"; }
- virtual const char *getOpenTag() { return "alt=\"phone\" />\n
"; }
- virtual const char *getCloseTag() { return ""; }
+protected:
+ virtual const char *getSiteKeyword() { return "justsomelyrics"; }
+ virtual const char *getOpenTag() { return "alt=\"phone\" />\n
"; }
+ virtual const char *getCloseTag() { return ""; }
};
struct LoloLyricsFetcher : public GoogleLyricsFetcher
{
virtual const char *name() { return "lololyrics.com"; }
- protected:
- virtual const char *getSiteKeyword() { return "lololyrics"; }
- virtual const char *getOpenTag() { return "
"; }
- virtual const char *getCloseTag() { return "
"; }
+protected:
+ virtual const char *getSiteKeyword() { return "lololyrics"; }
+ virtual const char *getOpenTag() { return "
"; }
+ virtual const char *getCloseTag() { return "
"; }
};
struct InternetLyricsFetcher : public GoogleLyricsFetcher
@@ -195,15 +195,15 @@ struct InternetLyricsFetcher : public GoogleLyricsFetcher
virtual const char *name() { return "the Internet"; }
virtual Result fetch(const std::string &artist, const std::string &title);
- protected:
- virtual const char *getSiteKeyword() { return "lyrics"; }
- virtual const char *getOpenTag() { return ""; }
- virtual const char *getCloseTag() { return ""; }
-
- virtual bool isURLOk(const std::string &url);
-
- private:
- std::string URL;
+protected:
+ virtual const char *getSiteKeyword() { return "lyrics"; }
+ virtual const char *getOpenTag() { return ""; }
+ virtual const char *getCloseTag() { return ""; }
+
+ virtual bool isURLOk(const std::string &url);
+
+private:
+ std::string URL;
};
extern LyricsFetcher *lyricsPlugins[];
diff --git a/src/media_library.h b/src/media_library.h
index 6359da57..090f7ded 100644
--- a/src/media_library.h
+++ b/src/media_library.h
@@ -24,77 +24,76 @@
#include "interfaces.h"
#include "screen.h"
-class MediaLibrary : public Screen
, public Filterable, public HasColumns, public HasSongs, public Searchable
+struct MediaLibrary : public Screen, public Filterable, public HasColumns, public HasSongs, public Searchable
{
- public:
- virtual void switchTo() OVERRIDE;
- virtual void resize() OVERRIDE;
+ virtual void switchTo() OVERRIDE;
+ virtual void resize() OVERRIDE;
+
+ virtual std::wstring title() OVERRIDE;
+
+ virtual void refresh() OVERRIDE;
+ virtual void update() OVERRIDE;
+
+ virtual void enterPressed() OVERRIDE;
+ virtual void spacePressed() OVERRIDE;
+ virtual void mouseButtonPressed(MEVENT me) OVERRIDE;
+
+ virtual bool isTabbable() OVERRIDE { return true; }
+ virtual bool isMergable() OVERRIDE { return true; }
+
+ // Filterable implementation
+ virtual bool allowsFiltering() OVERRIDE;
+ virtual std::string currentFilter() OVERRIDE;
+ virtual void applyFilter(const std::string &filter) OVERRIDE;
+
+ // Searchable implementation
+ virtual bool allowsSearching() OVERRIDE;
+ virtual bool search(const std::string &constraint) OVERRIDE;
+ virtual void nextFound(bool wrap) OVERRIDE;
+ virtual void prevFound(bool wrap) OVERRIDE;
+
+ // HasSongs implementation
+ virtual std::shared_ptr getProxySongList() OVERRIDE;
+
+ virtual bool allowsSelection() OVERRIDE;
+ virtual void reverseSelection() OVERRIDE;
+ virtual MPD::SongList getSelectedSongs() OVERRIDE;
+
+ // HasColumns implementation
+ virtual bool previousColumnAvailable() OVERRIDE;
+ virtual void previousColumn() OVERRIDE;
+
+ virtual bool nextColumnAvailable() OVERRIDE;
+ virtual void nextColumn() OVERRIDE;
+
+ // private members
+ int Columns();
+ void LocateSong(const MPD::Song &);
+ std::shared_ptr songsProxyList();
+
+ struct SearchConstraints
+ {
+ SearchConstraints() { }
+ SearchConstraints(const std::string &tag, const std::string &album, const std::string &date)
+ : PrimaryTag(tag), Album(album), Date(date) { }
+ SearchConstraints(const std::string &album, const std::string &date)
+ : Album(album), Date(date) { }
- virtual std::wstring title() OVERRIDE;
-
- virtual void refresh() OVERRIDE;
- virtual void update() OVERRIDE;
-
- virtual void enterPressed() OVERRIDE;
- virtual void spacePressed() OVERRIDE;
- virtual void mouseButtonPressed(MEVENT me) OVERRIDE;
-
- virtual bool isTabbable() OVERRIDE { return true; }
- virtual bool isMergable() OVERRIDE { return true; }
-
- // Filterable implementation
- virtual bool allowsFiltering() OVERRIDE;
- virtual std::string currentFilter() OVERRIDE;
- virtual void applyFilter(const std::string &filter) OVERRIDE;
-
- // Searchable implementation
- virtual bool allowsSearching() OVERRIDE;
- virtual bool search(const std::string &constraint) OVERRIDE;
- virtual void nextFound(bool wrap) OVERRIDE;
- virtual void prevFound(bool wrap) OVERRIDE;
-
- // HasSongs implementation
- virtual std::shared_ptr getProxySongList() OVERRIDE;
-
- virtual bool allowsSelection() OVERRIDE;
- virtual void reverseSelection() OVERRIDE;
- virtual MPD::SongList getSelectedSongs() OVERRIDE;
-
- // HasColumns implementation
- virtual bool previousColumnAvailable() OVERRIDE;
- virtual void previousColumn() OVERRIDE;
-
- virtual bool nextColumnAvailable() OVERRIDE;
- virtual void nextColumn() OVERRIDE;
-
- // private members
- int Columns();
- void LocateSong(const MPD::Song &);
- std::shared_ptr songsProxyList();
-
- struct SearchConstraints
- {
- SearchConstraints() { }
- SearchConstraints(const std::string &tag, const std::string &album, const std::string &date)
- : PrimaryTag(tag), Album(album), Date(date) { }
- SearchConstraints(const std::string &album, const std::string &date)
- : Album(album), Date(date) { }
-
- std::string PrimaryTag;
- std::string Album;
- std::string Date;
- };
-
- NC::Menu *Tags;
- NC::Menu *Albums;
- NC::Menu *Songs;
-
- protected:
- virtual void init();
- virtual bool isLockable() { return true; }
-
- private:
- void AddToPlaylist(bool);
+ std::string PrimaryTag;
+ std::string Album;
+ std::string Date;
+ };
+
+ NC::Menu *Tags;
+ NC::Menu *Albums;
+ NC::Menu *Songs;
+
+protected:
+ virtual void init();
+ virtual bool isLockable() { return true; }
+
+private:
+ void AddToPlaylist(bool);
};
extern MediaLibrary *myLibrary;
diff --git a/src/outputs.h b/src/outputs.h
index 8954f6fa..1145a65e 100644
--- a/src/outputs.h
+++ b/src/outputs.h
@@ -29,31 +29,29 @@
#include "mpdpp.h"
#include "screen.h"
-class Outputs : public Screen< NC::Menu >
+struct Outputs : public Screen< NC::Menu >
{
- public:
-
- // Screen< NC::Menu > implementation
- virtual void switchTo() OVERRIDE;
- virtual void resize() OVERRIDE;
-
- virtual std::wstring title() OVERRIDE;
-
- virtual void update() OVERRIDE { }
-
- virtual void enterPressed() OVERRIDE;
- virtual void spacePressed() OVERRIDE { }
- virtual void mouseButtonPressed(MEVENT me) OVERRIDE;
-
- virtual bool isTabbable() OVERRIDE { return true; }
- virtual bool isMergable() OVERRIDE { return true; }
-
- // private members
- void FetchList();
-
- protected:
- virtual void init() OVERRIDE;
- virtual bool isLockable() OVERRIDE { return true; }
+ // Screen< NC::Menu > implementation
+ virtual void switchTo() OVERRIDE;
+ virtual void resize() OVERRIDE;
+
+ virtual std::wstring title() OVERRIDE;
+
+ virtual void update() OVERRIDE { }
+
+ virtual void enterPressed() OVERRIDE;
+ virtual void spacePressed() OVERRIDE { }
+ virtual void mouseButtonPressed(MEVENT me) OVERRIDE;
+
+ virtual bool isTabbable() OVERRIDE { return true; }
+ virtual bool isMergable() OVERRIDE { return true; }
+
+ // private members
+ void FetchList();
+
+protected:
+ virtual void init() OVERRIDE;
+ virtual bool isLockable() OVERRIDE { return true; }
};
extern Outputs *myOutputs;
diff --git a/src/playlist.h b/src/playlist.h
index f024e72e..4a02e408 100644
--- a/src/playlist.h
+++ b/src/playlist.h
@@ -27,84 +27,83 @@
#include "screen.h"
#include "song.h"
-class Playlist : public Screen>, public Filterable, public HasSongs, public Searchable
+struct Playlist : public Screen>, public Filterable, public HasSongs, public Searchable
{
- public:
- Playlist() : itsTotalLength(0), itsRemainingTime(0), itsScrollBegin(0) { }
- ~Playlist() { }
-
- // Screen> implementation
- virtual void switchTo() OVERRIDE;
- virtual void resize() OVERRIDE;
-
- virtual std::wstring title() OVERRIDE;
-
- virtual void update() OVERRIDE { }
-
- virtual void enterPressed() OVERRIDE;
- virtual void spacePressed() OVERRIDE;
- virtual void mouseButtonPressed(MEVENT me) OVERRIDE;
-
- virtual bool isTabbable() OVERRIDE { return true; }
- virtual bool isMergable() OVERRIDE { return true; }
-
- // Filterable implementation
- virtual bool allowsFiltering() OVERRIDE;
- virtual std::string currentFilter() OVERRIDE;
- virtual void applyFilter(const std::string &filter) OVERRIDE;
-
- // Searchable implementation
- virtual bool allowsSearching();
- virtual bool search(const std::string &constraint) OVERRIDE;
- virtual void nextFound(bool wrap) OVERRIDE;
- virtual void prevFound(bool wrap) OVERRIDE;
-
- // HasSongs implementation
- virtual std::shared_ptr getProxySongList() OVERRIDE;
-
- virtual bool allowsSelection() OVERRIDE;
- virtual void reverseSelection() OVERRIDE;
- virtual MPD::SongList getSelectedSongs() OVERRIDE;
-
- // private members
- MPD::Song nowPlayingSong();
-
- bool isFiltered();
- void Reverse();
-
- void EnableHighlighting();
- void UpdateTimer();
- timeval Timer() const { return itsTimer; }
-
- bool Add(const MPD::Song &s, bool play, int position = -1);
- bool Add(const MPD::SongList &l, bool play, int position = -1);
- void PlayNewlyAddedSongs();
-
- void SetSelectedItemsPriority(int prio);
-
- bool checkForSong(const MPD::Song &s);
-
- void registerHash(size_t hash);
- void unregisterHash(size_t hash);
-
- static bool ReloadTotalLength;
- static bool ReloadRemaining;
-
- protected:
- virtual void init() OVERRIDE;
- virtual bool isLockable() OVERRIDE { return true; }
-
- private:
- std::string TotalLength();
- std::string itsBufferedStats;
-
- std::map itsSongHashes;
-
- size_t itsTotalLength;
- size_t itsRemainingTime;
- size_t itsScrollBegin;
-
- timeval itsTimer;
+ Playlist() : itsTotalLength(0), itsRemainingTime(0), itsScrollBegin(0) { }
+ ~Playlist() { }
+
+ // Screen> implementation
+ virtual void switchTo() OVERRIDE;
+ virtual void resize() OVERRIDE;
+
+ virtual std::wstring title() OVERRIDE;
+
+ virtual void update() OVERRIDE { }
+
+ virtual void enterPressed() OVERRIDE;
+ virtual void spacePressed() OVERRIDE;
+ virtual void mouseButtonPressed(MEVENT me) OVERRIDE;
+
+ virtual bool isTabbable() OVERRIDE { return true; }
+ virtual bool isMergable() OVERRIDE { return true; }
+
+ // Filterable implementation
+ virtual bool allowsFiltering() OVERRIDE;
+ virtual std::string currentFilter() OVERRIDE;
+ virtual void applyFilter(const std::string &filter) OVERRIDE;
+
+ // Searchable implementation
+ virtual bool allowsSearching();
+ virtual bool search(const std::string &constraint) OVERRIDE;
+ virtual void nextFound(bool wrap) OVERRIDE;
+ virtual void prevFound(bool wrap) OVERRIDE;
+
+ // HasSongs implementation
+ virtual std::shared_ptr getProxySongList() OVERRIDE;
+
+ virtual bool allowsSelection() OVERRIDE;
+ virtual void reverseSelection() OVERRIDE;
+ virtual MPD::SongList getSelectedSongs() OVERRIDE;
+
+ // private members
+ MPD::Song nowPlayingSong();
+
+ bool isFiltered();
+ void Reverse();
+
+ void EnableHighlighting();
+ void UpdateTimer();
+ timeval Timer() const { return itsTimer; }
+
+ bool Add(const MPD::Song &s, bool play, int position = -1);
+ bool Add(const MPD::SongList &l, bool play, int position = -1);
+ void PlayNewlyAddedSongs();
+
+ void SetSelectedItemsPriority(int prio);
+
+ bool checkForSong(const MPD::Song &s);
+
+ void registerHash(size_t hash);
+ void unregisterHash(size_t hash);
+
+ static bool ReloadTotalLength;
+ static bool ReloadRemaining;
+
+protected:
+ virtual void init() OVERRIDE;
+ virtual bool isLockable() OVERRIDE { return true; }
+
+private:
+ std::string TotalLength();
+ std::string itsBufferedStats;
+
+ std::map itsSongHashes;
+
+ size_t itsTotalLength;
+ size_t itsRemainingTime;
+ size_t itsScrollBegin;
+
+ timeval itsTimer;
};
extern Playlist *myPlaylist;
diff --git a/src/playlist_editor.h b/src/playlist_editor.h
index 7e6d37fe..7ca9f7ce 100644
--- a/src/playlist_editor.h
+++ b/src/playlist_editor.h
@@ -24,69 +24,68 @@
#include "interfaces.h"
#include "screen.h"
-class PlaylistEditor : public Screen, public Filterable, public HasColumns, public HasSongs, public Searchable
+struct PlaylistEditor : public Screen, public Filterable, public HasColumns, public HasSongs, public Searchable
{
- public:
- virtual void switchTo() OVERRIDE;
- virtual void resize() OVERRIDE;
-
- virtual std::wstring title() OVERRIDE;
-
- virtual void refresh() OVERRIDE;
- virtual void update() OVERRIDE;
-
- virtual void enterPressed() OVERRIDE;
- virtual void spacePressed() OVERRIDE;
- virtual void mouseButtonPressed(MEVENT me) OVERRIDE;
-
- virtual bool isTabbable() OVERRIDE { return true; }
- virtual bool isMergable() OVERRIDE { return true; }
-
- // Filterable implementation
- virtual bool allowsFiltering() OVERRIDE;
- virtual std::string currentFilter() OVERRIDE;
- virtual void applyFilter(const std::string &filter) OVERRIDE;
-
- // Searchable implementation
- virtual bool allowsSearching() OVERRIDE;
- virtual bool search(const std::string &constraint) OVERRIDE;
- virtual void nextFound(bool wrap) OVERRIDE;
- virtual void prevFound(bool wrap) OVERRIDE;
-
- // HasSongs implementation
- virtual std::shared_ptr getProxySongList() OVERRIDE;
-
- virtual bool allowsSelection() OVERRIDE;
- virtual void reverseSelection() OVERRIDE;
- virtual MPD::SongList getSelectedSongs() OVERRIDE;
-
- // HasColumns implementation
- virtual bool previousColumnAvailable() OVERRIDE;
- virtual void previousColumn() OVERRIDE;
-
- virtual bool nextColumnAvailable() OVERRIDE;
- virtual void nextColumn() OVERRIDE;
-
- // private members
- void requestPlaylistsUpdate() { playlistsUpdateRequested = true; }
- void requestContentsUpdate() { contentUpdateRequested = true; }
-
- virtual void Locate(const std::string &);
- bool isContentFiltered();
- std::shared_ptr contentProxyList();
-
- NC::Menu *Playlists;
- NC::Menu *Content;
-
- protected:
- virtual void init() OVERRIDE;
- virtual bool isLockable() OVERRIDE { return true; }
-
- private:
- void AddToPlaylist(bool);
-
- bool playlistsUpdateRequested;
- bool contentUpdateRequested;
+ virtual void switchTo() OVERRIDE;
+ virtual void resize() OVERRIDE;
+
+ virtual std::wstring title() OVERRIDE;
+
+ virtual void refresh() OVERRIDE;
+ virtual void update() OVERRIDE;
+
+ virtual void enterPressed() OVERRIDE;
+ virtual void spacePressed() OVERRIDE;
+ virtual void mouseButtonPressed(MEVENT me) OVERRIDE;
+
+ virtual bool isTabbable() OVERRIDE { return true; }
+ virtual bool isMergable() OVERRIDE { return true; }
+
+ // Filterable implementation
+ virtual bool allowsFiltering() OVERRIDE;
+ virtual std::string currentFilter() OVERRIDE;
+ virtual void applyFilter(const std::string &filter) OVERRIDE;
+
+ // Searchable implementation
+ virtual bool allowsSearching() OVERRIDE;
+ virtual bool search(const std::string &constraint) OVERRIDE;
+ virtual void nextFound(bool wrap) OVERRIDE;
+ virtual void prevFound(bool wrap) OVERRIDE;
+
+ // HasSongs implementation
+ virtual std::shared_ptr getProxySongList() OVERRIDE;
+
+ virtual bool allowsSelection() OVERRIDE;
+ virtual void reverseSelection() OVERRIDE;
+ virtual MPD::SongList getSelectedSongs() OVERRIDE;
+
+ // HasColumns implementation
+ virtual bool previousColumnAvailable() OVERRIDE;
+ virtual void previousColumn() OVERRIDE;
+
+ virtual bool nextColumnAvailable() OVERRIDE;
+ virtual void nextColumn() OVERRIDE;
+
+ // private members
+ void requestPlaylistsUpdate() { playlistsUpdateRequested = true; }
+ void requestContentsUpdate() { contentUpdateRequested = true; }
+
+ virtual void Locate(const std::string &);
+ bool isContentFiltered();
+ std::shared_ptr contentProxyList();
+
+ NC::Menu *Playlists;
+ NC::Menu *Content;
+
+protected:
+ virtual void init() OVERRIDE;
+ virtual bool isLockable() OVERRIDE { return true; }
+
+private:
+ void AddToPlaylist(bool);
+
+ bool playlistsUpdateRequested;
+ bool contentUpdateRequested;
};
extern PlaylistEditor *myPlaylistEditor;
diff --git a/src/search_engine.h b/src/search_engine.h
index 058caaab..785fcf1c 100644
--- a/src/search_engine.h
+++ b/src/search_engine.h
@@ -73,66 +73,65 @@ struct SEItem
MPD::Song itsSong;
};
-class SearchEngine : public Screen< NC::Menu >, public Filterable, public HasSongs, public Searchable
+struct SearchEngine : public Screen< NC::Menu >, public Filterable, public HasSongs, public Searchable
{
- public:
- // Screen< NC::Menu > implementation
- virtual void resize() OVERRIDE;
- virtual void switchTo() OVERRIDE;
-
- virtual std::wstring title() OVERRIDE;
-
- virtual void update() OVERRIDE { }
-
- virtual void enterPressed() OVERRIDE;
- virtual void spacePressed() OVERRIDE;
- virtual void mouseButtonPressed(MEVENT me) OVERRIDE;
-
- virtual bool isTabbable() OVERRIDE { return true; }
- virtual bool isMergable() OVERRIDE { return true; }
-
- // Filterable implementation
- virtual bool allowsFiltering() OVERRIDE;
- virtual std::string currentFilter() OVERRIDE;
- virtual void applyFilter(const std::string &filter) OVERRIDE;
-
- // Searchable implementation
- virtual bool allowsSearching() OVERRIDE;
- virtual bool search(const std::string &constraint) OVERRIDE;
- virtual void nextFound(bool wrap) OVERRIDE;
- virtual void prevFound(bool wrap) OVERRIDE;
-
- // HasSongs implementation
- virtual std::shared_ptr getProxySongList() OVERRIDE;
-
- virtual bool allowsSelection() OVERRIDE;
- virtual void reverseSelection() OVERRIDE;
- virtual MPD::SongList getSelectedSongs() OVERRIDE;
-
- // private members
-
- static size_t StaticOptions;
- static size_t SearchButton;
- static size_t ResetButton;
-
- protected:
- virtual void init() OVERRIDE;
- virtual bool isLockable() OVERRIDE { return true; }
-
- private:
- void Prepare();
- void Search();
- void reset();
-
- const char **SearchMode;
-
- static const char *SearchModes[];
-
- static const size_t ConstraintsNumber = 11;
- static const char *ConstraintsNames[];
- std::string itsConstraints[ConstraintsNumber];
-
- static bool MatchToPattern;
+ // Screen< NC::Menu > implementation
+ virtual void resize() OVERRIDE;
+ virtual void switchTo() OVERRIDE;
+
+ virtual std::wstring title() OVERRIDE;
+
+ virtual void update() OVERRIDE { }
+
+ virtual void enterPressed() OVERRIDE;
+ virtual void spacePressed() OVERRIDE;
+ virtual void mouseButtonPressed(MEVENT me) OVERRIDE;
+
+ virtual bool isTabbable() OVERRIDE { return true; }
+ virtual bool isMergable() OVERRIDE { return true; }
+
+ // Filterable implementation
+ virtual bool allowsFiltering() OVERRIDE;
+ virtual std::string currentFilter() OVERRIDE;
+ virtual void applyFilter(const std::string &filter) OVERRIDE;
+
+ // Searchable implementation
+ virtual bool allowsSearching() OVERRIDE;
+ virtual bool search(const std::string &constraint) OVERRIDE;
+ virtual void nextFound(bool wrap) OVERRIDE;
+ virtual void prevFound(bool wrap) OVERRIDE;
+
+ // HasSongs implementation
+ virtual std::shared_ptr getProxySongList() OVERRIDE;
+
+ virtual bool allowsSelection() OVERRIDE;
+ virtual void reverseSelection() OVERRIDE;
+ virtual MPD::SongList getSelectedSongs() OVERRIDE;
+
+ // private members
+
+ static size_t StaticOptions;
+ static size_t SearchButton;
+ static size_t ResetButton;
+
+protected:
+ virtual void init() OVERRIDE;
+ virtual bool isLockable() OVERRIDE { return true; }
+
+private:
+ void Prepare();
+ void Search();
+ void reset();
+
+ const char **SearchMode;
+
+ static const char *SearchModes[];
+
+ static const size_t ConstraintsNumber = 11;
+ static const char *ConstraintsNames[];
+ std::string itsConstraints[ConstraintsNumber];
+
+ static bool MatchToPattern;
};
extern SearchEngine *mySearcher;
diff --git a/src/sel_items_adder.h b/src/sel_items_adder.h
index b83a48f3..fc620ece 100644
--- a/src/sel_items_adder.h
+++ b/src/sel_items_adder.h
@@ -23,42 +23,41 @@
#include "screen.h"
-class SelectedItemsAdder : public Screen< NC::Menu >
+struct SelectedItemsAdder : public Screen< NC::Menu >
{
- public:
- SelectedItemsAdder() : itsPSWidth(35), itsPSHeight(11) { }
-
- // Screen< NC::Menu > implementation
- virtual void switchTo() OVERRIDE;
- virtual void resize() OVERRIDE;
- virtual void refresh() OVERRIDE;
-
- virtual std::wstring title() OVERRIDE;
-
- virtual void update() OVERRIDE { }
-
- virtual void enterPressed() OVERRIDE;
- virtual void spacePressed() OVERRIDE { }
- virtual void mouseButtonPressed(MEVENT me) OVERRIDE;
-
- virtual bool isMergable() OVERRIDE { return false; }
- virtual bool isTabbable() OVERRIDE { return false; }
-
- protected:
- virtual void init() OVERRIDE;
- virtual bool isLockable() OVERRIDE { return false; }
-
- private:
- void SetDimensions();
-
- NC::Menu *itsPlaylistSelector;
- NC::Menu *itsPositionSelector;
-
- size_t itsPSWidth;
- size_t itsPSHeight;
-
- size_t itsWidth;
- size_t itsHeight;
+ SelectedItemsAdder() : itsPSWidth(35), itsPSHeight(11) { }
+
+ // Screen< NC::Menu > implementation
+ virtual void switchTo() OVERRIDE;
+ virtual void resize() OVERRIDE;
+ virtual void refresh() OVERRIDE;
+
+ virtual std::wstring title() OVERRIDE;
+
+ virtual void update() OVERRIDE { }
+
+ virtual void enterPressed() OVERRIDE;
+ virtual void spacePressed() OVERRIDE { }
+ virtual void mouseButtonPressed(MEVENT me) OVERRIDE;
+
+ virtual bool isMergable() OVERRIDE { return false; }
+ virtual bool isTabbable() OVERRIDE { return false; }
+
+protected:
+ virtual void init() OVERRIDE;
+ virtual bool isLockable() OVERRIDE { return false; }
+
+private:
+ void SetDimensions();
+
+ NC::Menu *itsPlaylistSelector;
+ NC::Menu *itsPositionSelector;
+
+ size_t itsPSWidth;
+ size_t itsPSHeight;
+
+ size_t itsWidth;
+ size_t itsHeight;
};
extern SelectedItemsAdder *mySelectedItemsAdder;
diff --git a/src/server_info.h b/src/server_info.h
index fbfa4c2c..f7a5eb3b 100644
--- a/src/server_info.h
+++ b/src/server_info.h
@@ -23,35 +23,34 @@
#include "screen.h"
-class ServerInfo : public Screen
+struct ServerInfo : public Screen
{
- public:
- // Screen implementation
- virtual void switchTo() OVERRIDE;
- virtual void resize() OVERRIDE;
-
- virtual std::wstring title() OVERRIDE;
-
- virtual void update() OVERRIDE;
-
- virtual void enterPressed() OVERRIDE { }
- virtual void spacePressed() OVERRIDE { }
-
- virtual bool isMergable() OVERRIDE { return false; }
- virtual bool isTabbable() OVERRIDE { return false; }
-
- protected:
- virtual void init() OVERRIDE;
- virtual bool isLockable() OVERRIDE { return false; }
-
- private:
- void SetDimensions();
-
- MPD::StringList itsURLHandlers;
- MPD::StringList itsTagTypes;
-
- size_t itsWidth;
- size_t itsHeight;
+ // Screen implementation
+ virtual void switchTo() OVERRIDE;
+ virtual void resize() OVERRIDE;
+
+ virtual std::wstring title() OVERRIDE;
+
+ virtual void update() OVERRIDE;
+
+ virtual void enterPressed() OVERRIDE { }
+ virtual void spacePressed() OVERRIDE { }
+
+ virtual bool isMergable() OVERRIDE { return false; }
+ virtual bool isTabbable() OVERRIDE { return false; }
+
+protected:
+ virtual void init() OVERRIDE;
+ virtual bool isLockable() OVERRIDE { return false; }
+
+private:
+ void SetDimensions();
+
+ MPD::StringList itsURLHandlers;
+ MPD::StringList itsTagTypes;
+
+ size_t itsWidth;
+ size_t itsHeight;
};
extern ServerInfo *myServerInfo;
diff --git a/src/settings.h b/src/settings.h
index 9e48a08b..6a86d207 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -192,11 +192,11 @@ struct Configuration
SortMode browser_sort_mode;
- private:
- void MakeProperPath(std::string &dir);
-
- std::string home_directory;
- std::string config_file_path;
+private:
+ void MakeProperPath(std::string &dir);
+
+ std::string home_directory;
+ std::string config_file_path;
};
extern Configuration Config;
diff --git a/src/song.h b/src/song.h
index 8338bf39..8d27f2a4 100644
--- a/src/song.h
+++ b/src/song.h
@@ -79,13 +79,13 @@ struct Song
static const char FormatEscapeCharacter = 1;
- private:
- const char *getTag(mpd_tag_type type, unsigned idx) const;
- std::string ParseFormat(std::string::const_iterator &it, const std::string &tags_separator,
- const std::string &escape_chars) const;
-
- std::shared_ptr m_song;
- size_t m_hash;
+private:
+ const char *getTag(mpd_tag_type type, unsigned idx) const;
+ std::string ParseFormat(std::string::const_iterator &it, const std::string &tags_separator,
+ const std::string &escape_chars) const;
+
+ std::shared_ptr m_song;
+ size_t m_hash;
};
typedef std::vector SongList;
diff --git a/src/song_info.h b/src/song_info.h
index 0de082bd..63e8cf52 100644
--- a/src/song_info.h
+++ b/src/song_info.h
@@ -24,40 +24,38 @@
#include "screen.h"
#include "mutable_song.h"
-class SongInfo : public Screen
+struct SongInfo : public Screen
{
- public:
- struct Metadata
- {
- const char *Name;
- MPD::Song::GetFunction Get;
- MPD::MutableSong::SetFunction Set;
- };
-
- // Screen implementation
- virtual void switchTo() OVERRIDE;
- virtual void resize() OVERRIDE;
-
- virtual std::wstring title() OVERRIDE;
-
- virtual void update() OVERRIDE { }
-
- virtual void enterPressed() OVERRIDE { }
- virtual void spacePressed() OVERRIDE { }
-
- virtual bool isMergable() OVERRIDE { return true; }
- virtual bool isTabbable() OVERRIDE { return false; }
-
- // private members
-
- static const Metadata Tags[];
-
- protected:
- virtual void init() OVERRIDE;
- virtual bool isLockable() OVERRIDE { return false; }
-
- private:
- void PrepareSong(MPD::Song &);
+ struct Metadata
+ {
+ const char *Name;
+ MPD::Song::GetFunction Get;
+ MPD::MutableSong::SetFunction Set;
+ };
+
+ // Screen implementation
+ virtual void switchTo() OVERRIDE;
+ virtual void resize() OVERRIDE;
+
+ virtual std::wstring title() OVERRIDE;
+
+ virtual void update() OVERRIDE { }
+
+ virtual void enterPressed() OVERRIDE { }
+ virtual void spacePressed() OVERRIDE { }
+
+ virtual bool isMergable() OVERRIDE { return true; }
+ virtual bool isTabbable() OVERRIDE { return false; }
+
+ // private members
+ static const Metadata Tags[];
+
+protected:
+ virtual void init() OVERRIDE;
+ virtual bool isLockable() OVERRIDE { return false; }
+
+private:
+ void PrepareSong(MPD::Song &);
};
extern SongInfo *mySongInfo;
diff --git a/src/tag_editor.h b/src/tag_editor.h
index d513aec8..3e89c8d9 100644
--- a/src/tag_editor.h
+++ b/src/tag_editor.h
@@ -33,77 +33,76 @@
#include "regex_filter.h"
#include "screen.h"
-class TagEditor : public Screen, public Filterable, public HasColumns, public HasSongs, public Searchable
+struct TagEditor : public Screen, public Filterable, public HasColumns, public HasSongs, public Searchable
{
- public:
- TagEditor() : FParser(0), FParserHelper(0), FParserLegend(0), FParserPreview(0), itsBrowsedDir("/") { }
-
- virtual void resize() OVERRIDE;
- virtual void switchTo() OVERRIDE;
-
- virtual std::wstring title() OVERRIDE;
-
- virtual void refresh() OVERRIDE;
- virtual void update() OVERRIDE;
-
- virtual void enterPressed() OVERRIDE;
- virtual void spacePressed() OVERRIDE;
- virtual void mouseButtonPressed(MEVENT) OVERRIDE;
-
- virtual bool isTabbable() OVERRIDE { return true; }
- virtual bool isMergable() OVERRIDE { return true; }
-
- // Filterable implementation
- virtual bool allowsFiltering() OVERRIDE;
- virtual std::string currentFilter() OVERRIDE;
- virtual void applyFilter(const std::string &filter) OVERRIDE;
-
- // Searchable implementation
- virtual bool allowsSearching() OVERRIDE;
- virtual bool search(const std::string &constraint) OVERRIDE;
- virtual void nextFound(bool wrap) OVERRIDE;
- virtual void prevFound(bool wrap) OVERRIDE;
-
- // HasSongs implementation
- virtual std::shared_ptr getProxySongList() OVERRIDE;
-
- virtual bool allowsSelection() OVERRIDE;
- virtual void reverseSelection() OVERRIDE;
- virtual MPD::SongList getSelectedSongs() OVERRIDE;
-
- // HasColumns implementation
- virtual bool previousColumnAvailable() OVERRIDE;
- virtual void previousColumn() OVERRIDE;
-
- virtual bool nextColumnAvailable() OVERRIDE;
- virtual void nextColumn() OVERRIDE;
-
- // private members
- bool ifAnyModifiedAskForDiscarding();
- void LocateSong(const MPD::Song &s);
- const std::string &CurrentDir() { return itsBrowsedDir; }
-
- NC::Menu< std::pair > *Dirs;
- NC::Menu *TagTypes;
- NC::Menu *Tags;
-
- protected:
- virtual void init();
- virtual bool isLockable() { return true; }
-
- private:
- void SetDimensions(size_t, size_t);
-
- std::vector EditedSongs;
- NC::Menu *FParserDialog;
- NC::Menu *FParser;
- NC::Scrollpad *FParserHelper;
- NC::Scrollpad *FParserLegend;
- NC::Scrollpad *FParserPreview;
- bool FParserUsePreview;
-
- std::string itsBrowsedDir;
- std::string itsHighlightedDir;
+ TagEditor() : FParser(0), FParserHelper(0), FParserLegend(0), FParserPreview(0), itsBrowsedDir("/") { }
+
+ virtual void resize() OVERRIDE;
+ virtual void switchTo() OVERRIDE;
+
+ virtual std::wstring title() OVERRIDE;
+
+ virtual void refresh() OVERRIDE;
+ virtual void update() OVERRIDE;
+
+ virtual void enterPressed() OVERRIDE;
+ virtual void spacePressed() OVERRIDE;
+ virtual void mouseButtonPressed(MEVENT) OVERRIDE;
+
+ virtual bool isTabbable() OVERRIDE { return true; }
+ virtual bool isMergable() OVERRIDE { return true; }
+
+ // Filterable implementation
+ virtual bool allowsFiltering() OVERRIDE;
+ virtual std::string currentFilter() OVERRIDE;
+ virtual void applyFilter(const std::string &filter) OVERRIDE;
+
+ // Searchable implementation
+ virtual bool allowsSearching() OVERRIDE;
+ virtual bool search(const std::string &constraint) OVERRIDE;
+ virtual void nextFound(bool wrap) OVERRIDE;
+ virtual void prevFound(bool wrap) OVERRIDE;
+
+ // HasSongs implementation
+ virtual std::shared_ptr getProxySongList() OVERRIDE;
+
+ virtual bool allowsSelection() OVERRIDE;
+ virtual void reverseSelection() OVERRIDE;
+ virtual MPD::SongList getSelectedSongs() OVERRIDE;
+
+ // HasColumns implementation
+ virtual bool previousColumnAvailable() OVERRIDE;
+ virtual void previousColumn() OVERRIDE;
+
+ virtual bool nextColumnAvailable() OVERRIDE;
+ virtual void nextColumn() OVERRIDE;
+
+ // private members
+ bool ifAnyModifiedAskForDiscarding();
+ void LocateSong(const MPD::Song &s);
+ const std::string &CurrentDir() { return itsBrowsedDir; }
+
+ NC::Menu< std::pair > *Dirs;
+ NC::Menu *TagTypes;
+ NC::Menu *Tags;
+
+protected:
+ virtual void init();
+ virtual bool isLockable() { return true; }
+
+private:
+ void SetDimensions(size_t, size_t);
+
+ std::vector EditedSongs;
+ NC::Menu *FParserDialog;
+ NC::Menu *FParser;
+ NC::Scrollpad *FParserHelper;
+ NC::Scrollpad *FParserLegend;
+ NC::Scrollpad *FParserPreview;
+ bool FParserUsePreview;
+
+ std::string itsBrowsedDir;
+ std::string itsHighlightedDir;
};
extern TagEditor *myTagEditor;
diff --git a/src/tiny_tag_editor.h b/src/tiny_tag_editor.h
index b77daffa..4d177801 100644
--- a/src/tiny_tag_editor.h
+++ b/src/tiny_tag_editor.h
@@ -28,34 +28,33 @@
#include "mutable_song.h"
#include "screen.h"
-class TinyTagEditor : public Screen< NC::Menu >
+struct TinyTagEditor : public Screen< NC::Menu >
{
- public:
- // Screen< NC::Menu > implementation
- virtual void resize() OVERRIDE;
- virtual void switchTo() OVERRIDE;
-
- virtual std::wstring title() OVERRIDE;
-
- virtual void update() OVERRIDE { }
-
- virtual void enterPressed() OVERRIDE;
- virtual void spacePressed() OVERRIDE { }
- virtual void mouseButtonPressed(MEVENT me) OVERRIDE;
-
- virtual bool isMergable() OVERRIDE { return true; }
- virtual bool isTabbable() OVERRIDE { return false; }
-
- // private members
- void SetEdited(const MPD::Song &);
-
- protected:
- virtual void init() OVERRIDE;
- virtual bool isLockable() OVERRIDE { return true; }
-
- private:
- bool getTags();
- MPD::MutableSong itsEdited;
+ // Screen< NC::Menu > implementation
+ virtual void resize() OVERRIDE;
+ virtual void switchTo() OVERRIDE;
+
+ virtual std::wstring title() OVERRIDE;
+
+ virtual void update() OVERRIDE { }
+
+ virtual void enterPressed() OVERRIDE;
+ virtual void spacePressed() OVERRIDE { }
+ virtual void mouseButtonPressed(MEVENT me) OVERRIDE;
+
+ virtual bool isMergable() OVERRIDE { return true; }
+ virtual bool isTabbable() OVERRIDE { return false; }
+
+ // private members
+ void SetEdited(const MPD::Song &);
+
+protected:
+ virtual void init() OVERRIDE;
+ virtual bool isLockable() OVERRIDE { return true; }
+
+private:
+ bool getTags();
+ MPD::MutableSong itsEdited;
};
extern TinyTagEditor *myTinyTagEditor;
diff --git a/src/visualizer.h b/src/visualizer.h
index 10466ee0..2791ebe9 100644
--- a/src/visualizer.h
+++ b/src/visualizer.h
@@ -32,53 +32,52 @@
# include
#endif
-class Visualizer : public Screen
+struct Visualizer : public Screen
{
- public:
- virtual void switchTo() OVERRIDE;
- virtual void resize() OVERRIDE;
-
- virtual std::wstring title() OVERRIDE;
-
- virtual void update() OVERRIDE;
- virtual void scroll(NC::Where) OVERRIDE { }
-
- virtual void enterPressed() OVERRIDE { }
- virtual void spacePressed() OVERRIDE;
- virtual void mouseButtonPressed(MEVENT) OVERRIDE { }
-
- virtual bool isTabbable() OVERRIDE { return true; }
- virtual bool isMergable() OVERRIDE { return true; }
-
- // private members
- void SetFD();
- void ResetFD();
- void FindOutputID();
-
- static const int WindowTimeout;
-
- protected:
- virtual void init();
- virtual bool isLockable() { return true; }
-
- private:
- void DrawSoundWave(int16_t *, ssize_t, size_t, size_t);
-# ifdef HAVE_FFTW3_H
- void DrawFrequencySpectrum(int16_t *, ssize_t, size_t, size_t);
-# endif // HAVE_FFTW3_H
-
- int itsOutputID;
- timeval itsTimer;
-
- int itsFifo;
- unsigned itsSamples;
-# ifdef HAVE_FFTW3_H
- unsigned itsFFTResults;
- unsigned *itsFreqsMagnitude;
- double *itsInput;
- fftw_complex *itsOutput;
- fftw_plan itsPlan;
-# endif // HAVE_FFTW3_H
+ virtual void switchTo() OVERRIDE;
+ virtual void resize() OVERRIDE;
+
+ virtual std::wstring title() OVERRIDE;
+
+ virtual void update() OVERRIDE;
+ virtual void scroll(NC::Where) OVERRIDE { }
+
+ virtual void enterPressed() OVERRIDE { }
+ virtual void spacePressed() OVERRIDE;
+ virtual void mouseButtonPressed(MEVENT) OVERRIDE { }
+
+ virtual bool isTabbable() OVERRIDE { return true; }
+ virtual bool isMergable() OVERRIDE { return true; }
+
+ // private members
+ void SetFD();
+ void ResetFD();
+ void FindOutputID();
+
+ static const int WindowTimeout;
+
+protected:
+ virtual void init();
+ virtual bool isLockable() { return true; }
+
+private:
+ void DrawSoundWave(int16_t *, ssize_t, size_t, size_t);
+# ifdef HAVE_FFTW3_H
+ void DrawFrequencySpectrum(int16_t *, ssize_t, size_t, size_t);
+# endif // HAVE_FFTW3_H
+
+ int itsOutputID;
+ timeval itsTimer;
+
+ int itsFifo;
+ unsigned itsSamples;
+# ifdef HAVE_FFTW3_H
+ unsigned itsFFTResults;
+ unsigned *itsFreqsMagnitude;
+ double *itsInput;
+ fftw_complex *itsOutput;
+ fftw_plan itsPlan;
+# endif // HAVE_FFTW3_H
};
extern Visualizer *myVisualizer;