adjust indentation of remaining classes in headers

This commit is contained in:
Andrzej Rybczak
2012-09-13 22:09:39 +02:00
parent bb5d72d558
commit 58a26b1e18
23 changed files with 951 additions and 967 deletions

View File

@@ -25,9 +25,8 @@
#include "mpdpp.h" #include "mpdpp.h"
#include "screen.h" #include "screen.h"
class Browser : public Screen< NC::Menu<MPD::Item> >, public Filterable, public HasSongs, public Searchable struct Browser : public Screen< NC::Menu<MPD::Item> >, public Filterable, public HasSongs, public Searchable
{ {
public:
Browser() : itsBrowseLocally(0), itsScrollBeginning(0), itsBrowsedDir("/") { } Browser() : itsBrowseLocally(0), itsScrollBeginning(0), itsBrowsedDir("/") { }
// Screen< NC::Menu<MPD::Item> > implementation // Screen< NC::Menu<MPD::Item> > implementation
@@ -80,11 +79,11 @@ class Browser : public Screen< NC::Menu<MPD::Item> >, public Filterable, public
return item.type == MPD::itDirectory && item.name == ".."; return item.type == MPD::itDirectory && item.name == "..";
} }
protected: protected:
virtual void init() OVERRIDE; virtual void init() OVERRIDE;
virtual bool isLockable() OVERRIDE { return true; } virtual bool isLockable() OVERRIDE { return true; }
private: private:
bool itsBrowseLocally; bool itsBrowseLocally;
size_t itsScrollBeginning; size_t itsScrollBeginning;
std::string itsBrowsedDir; std::string itsBrowsedDir;

View File

@@ -28,9 +28,8 @@
#include "window.h" #include "window.h"
#include "screen.h" #include "screen.h"
class Clock : public Screen<NC::Window> struct Clock : public Screen<NC::Window>
{ {
public:
virtual void resize() OVERRIDE; virtual void resize() OVERRIDE;
virtual void switchTo() OVERRIDE; virtual void switchTo() OVERRIDE;
@@ -46,11 +45,11 @@ class Clock : public Screen<NC::Window>
virtual bool isTabbable() OVERRIDE { return true; } virtual bool isTabbable() OVERRIDE { return true; }
virtual bool isMergable() OVERRIDE { return true; } virtual bool isMergable() OVERRIDE { return true; }
protected: protected:
virtual void init() OVERRIDE; virtual void init() OVERRIDE;
virtual bool isLockable() OVERRIDE { return false; } virtual bool isLockable() OVERRIDE { return false; }
private: private:
NC::Window *itsPane; NC::Window *itsPane;
static void Prepare(); static void Prepare();

View File

@@ -26,31 +26,28 @@
#include "mutable_song.h" #include "mutable_song.h"
#include "search_engine.h" #include "search_engine.h"
namespace Display namespace Display {//
{
std::string Columns(size_t);
template <typename T> void Default(NC::Menu<T> &menu) std::string Columns(size_t);
{
menu << menu.drawn()->value();
}
template <typename A, typename B> void Pair(NC::Menu< std::pair<A, B> > &menu) template <typename ItemT>
{ void Default(NC::Menu<ItemT> &menu) { menu << menu.drawn()->value(); }
menu << menu.drawn()->value().first;
}
void SongsInColumns(NC::Menu<MPD::Song> &menu, HasSongs *screen); template <typename A, typename B>
void Pair(NC::Menu< std::pair<A, B> > &menu) { menu << menu.drawn()->value().first; }
void Songs(NC::Menu<MPD::Song> &menu, HasSongs *screen, const std::string &format); void SongsInColumns(NC::Menu<MPD::Song> &menu, HasSongs *screen);
void Tags(NC::Menu<MPD::MutableSong> &menu); void Songs(NC::Menu<MPD::Song> &menu, HasSongs *screen, const std::string &format);
void Outputs(NC::Menu<MPD::Output> &menu); void Tags(NC::Menu<MPD::MutableSong> &menu);
void SearchEngine(NC::Menu<SEItem> &menu); void Outputs(NC::Menu<MPD::Output> &menu);
void SearchEngine(NC::Menu<SEItem> &menu);
void Items(NC::Menu<MPD::Item> &menu);
void Items(NC::Menu<MPD::Item> &menu);
} }
#endif #endif

View File

@@ -20,20 +20,24 @@
#include "global.h" #include "global.h"
BasicScreen *Global::myScreen; namespace Global {//
BasicScreen *Global::myOldScreen;
BasicScreen *Global::myPrevScreen;
BasicScreen *Global::myLockedScreen;
BasicScreen *Global::myInactiveScreen;
NC::Window *Global::wHeader; BasicScreen *myScreen;
NC::Window *Global::wFooter; BasicScreen *myOldScreen;
BasicScreen *myPrevScreen;
BasicScreen *myLockedScreen;
BasicScreen *myInactiveScreen;
size_t Global::MainStartY; NC::Window *wHeader;
size_t Global::MainHeight; NC::Window *wFooter;
bool Global::ShowMessages = false; size_t MainStartY;
bool Global::SeekingInProgress = false; size_t MainHeight;
std::string Global::VolumeState; bool ShowMessages = false;
timeval Global::Timer; bool SeekingInProgress = false;
std::string VolumeState;
timeval Timer;
}

View File

@@ -26,47 +26,48 @@
#include "mpdpp.h" #include "mpdpp.h"
#include "screen.h" #include "screen.h"
namespace Global namespace Global {//
{
// currently active screen (displayed in main window)
extern BasicScreen *myScreen;
// for info, lyrics, popups to remember which screen return to // currently active screen (displayed in main window)
extern BasicScreen *myOldScreen; extern BasicScreen *myScreen;
// "real" screen switching (browser, search, etc.) // for info, lyrics, popups to remember which screen return to
extern BasicScreen *myPrevScreen; extern BasicScreen *myOldScreen;
// points at the screen that was locked (or is null if no screen is locked) // "real" screen switching (browser, search, etc.)
extern BasicScreen *myLockedScreen; extern BasicScreen *myPrevScreen;
// points at inactive screen, if locking was enabled and two screens are displayed // points at the screen that was locked (or is null if no screen is locked)
extern BasicScreen *myInactiveScreen; extern BasicScreen *myLockedScreen;
// header window (above main window) // points at inactive screen, if locking was enabled and two screens are displayed
extern NC::Window *wHeader; extern BasicScreen *myInactiveScreen;
// footer window (below main window) // header window (above main window)
extern NC::Window *wFooter; extern NC::Window *wHeader;
// Y coordinate of top of main window // footer window (below main window)
extern size_t MainStartY; extern NC::Window *wFooter;
// height of main window // Y coordinate of top of main window
extern size_t MainHeight; extern size_t MainStartY;
// indicates whether messages from Statusbar::msg function should be shown // height of main window
extern bool ShowMessages; extern size_t MainHeight;
// indicates whether seeking action in currently in progress // indicates whether messages from Statusbar::msg function should be shown
extern bool SeekingInProgress; extern bool ShowMessages;
// string that represents volume in right top corner. being global // indicates whether seeking action in currently in progress
// to be used for calculating width offsets in various files. extern bool SeekingInProgress;
extern std::string VolumeState;
// string that represents volume in right top corner. being global
// to be used for calculating width offsets in various files.
extern std::string VolumeState;
// global timer
extern timeval Timer;
// global timer
extern timeval Timer;
} }
#endif #endif

View File

@@ -24,9 +24,8 @@
#include "actions.h" #include "actions.h"
#include "screen.h" #include "screen.h"
class Help : public Screen<NC::Scrollpad> struct Help : public Screen<NC::Scrollpad>
{ {
public:
virtual void resize() OVERRIDE; virtual void resize() OVERRIDE;
virtual void switchTo() OVERRIDE; virtual void switchTo() OVERRIDE;
@@ -40,11 +39,11 @@ class Help : public Screen<NC::Scrollpad>
virtual bool isTabbable() OVERRIDE { return true; } virtual bool isTabbable() OVERRIDE { return true; }
virtual bool isMergable() OVERRIDE { return true; } virtual bool isMergable() OVERRIDE { return true; }
protected: protected:
virtual void init() OVERRIDE; virtual void init() OVERRIDE;
virtual bool isLockable() OVERRIDE { return true; } virtual bool isLockable() OVERRIDE { return true; }
private: private:
void KeysSection(const char *title) { Section("Keys", title); } void KeysSection(const char *title) { Section("Keys", title); }
void MouseSection(const char *title) { Section("Mouse", title); } void MouseSection(const char *title) { Section("Mouse", title); }
void Section(const char *type, const char *title); void Section(const char *type, const char *title);

View File

@@ -31,9 +31,8 @@
#include "lastfm_service.h" #include "lastfm_service.h"
#include "screen.h" #include "screen.h"
class Lastfm : public Screen<NC::Scrollpad> struct Lastfm : public Screen<NC::Scrollpad>
{ {
public:
Lastfm() : isReadyToTake(0), isDownloadInProgress(0) { } Lastfm() : isReadyToTake(0), isDownloadInProgress(0) { }
// Screen<NC::Scrollpad> // Screen<NC::Scrollpad>
@@ -56,11 +55,11 @@ class Lastfm : public Screen<NC::Scrollpad>
bool isDownloading() { return isDownloadInProgress && !isReadyToTake; } bool isDownloading() { return isDownloadInProgress && !isReadyToTake; }
bool SetArtistInfoArgs(const std::string &artist, const std::string &lang = ""); bool SetArtistInfoArgs(const std::string &artist, const std::string &lang = "");
protected: protected:
virtual void init() OVERRIDE; virtual void init() OVERRIDE;
virtual bool isLockable() OVERRIDE { return false; } virtual bool isLockable() OVERRIDE { return false; }
private: private:
std::wstring itsTitle; std::wstring itsTitle;
std::string itsArtist; std::string itsArtist;

View File

@@ -41,7 +41,7 @@ struct LastfmService
virtual bool checkArgs(const Args &args) = 0; virtual bool checkArgs(const Args &args) = 0;
virtual void colorizeOutput(NC::Scrollpad &w) = 0; virtual void colorizeOutput(NC::Scrollpad &w) = 0;
protected: protected:
virtual bool actionFailed(const std::string &data); virtual bool actionFailed(const std::string &data);
virtual bool parse(std::string &data) = 0; virtual bool parse(std::string &data) = 0;
@@ -60,7 +60,7 @@ struct ArtistInfo : public LastfmService
virtual bool checkArgs(const Args &args); virtual bool checkArgs(const Args &args);
virtual void colorizeOutput(NC::Scrollpad &w); virtual void colorizeOutput(NC::Scrollpad &w);
protected: protected:
virtual bool parse(std::string &data); virtual bool parse(std::string &data);
virtual const char *methodName() { return "artist.getinfo"; } virtual const char *methodName() { return "artist.getinfo"; }

View File

@@ -28,9 +28,8 @@
#include "screen.h" #include "screen.h"
#include "lyrics_fetcher.h" #include "lyrics_fetcher.h"
class Lyrics : public Screen<NC::Scrollpad> struct Lyrics : public Screen<NC::Scrollpad>
{ {
public:
Lyrics() : ReloadNP(0), Lyrics() : ReloadNP(0),
# ifdef HAVE_CURL_CURL_H # ifdef HAVE_CURL_CURL_H
isReadyToTake(0), isDownloadInProgress(0), isReadyToTake(0), isDownloadInProgress(0),
@@ -63,11 +62,11 @@ class Lyrics : public Screen<NC::Scrollpad>
bool ReloadNP; bool ReloadNP;
protected: protected:
virtual void init() OVERRIDE; virtual void init() OVERRIDE;
virtual bool isLockable() OVERRIDE { return false; } virtual bool isLockable() OVERRIDE { return false; }
private: private:
void Load(); void Load();
# ifdef HAVE_CURL_CURL_H # ifdef HAVE_CURL_CURL_H

View File

@@ -34,7 +34,7 @@ struct LyricsFetcher
virtual const char *name() = 0; virtual const char *name() = 0;
virtual Result fetch(const std::string &artist, const std::string &title); virtual Result fetch(const std::string &artist, const std::string &title);
protected: protected:
virtual const char *getURL() = 0; virtual const char *getURL() = 0;
virtual const char *getOpenTag() = 0; virtual const char *getOpenTag() = 0;
virtual const char *getCloseTag() = 0; virtual const char *getCloseTag() = 0;
@@ -51,7 +51,7 @@ struct LyrcComArFetcher : public LyricsFetcher
{ {
virtual const char *name() { return "lyrc.com.ar"; } virtual const char *name() { return "lyrc.com.ar"; }
protected: protected:
virtual const char *getURL() { return "http://lyrc.com.ar/tema1es.php?artist=%artist%&songname=%title%"; } virtual const char *getURL() { return "http://lyrc.com.ar/tema1es.php?artist=%artist%&songname=%title%"; }
virtual const char *getOpenTag() { return "</table>"; } virtual const char *getOpenTag() { return "</table>"; }
virtual const char *getCloseTag() { return "<p>"; } virtual const char *getCloseTag() { return "<p>"; }
@@ -62,7 +62,7 @@ struct LyricwikiFetcher : public LyricsFetcher
virtual const char *name() { return "lyricwiki.com"; } virtual const char *name() { return "lyricwiki.com"; }
virtual Result fetch(const std::string &artist, const std::string &title); virtual Result fetch(const std::string &artist, const std::string &title);
protected: protected:
virtual const char *getURL() { return "http://lyrics.wikia.com/api.php?action=lyrics&fmt=xml&func=getSong&artist=%artist%&song=%title%"; } virtual const char *getURL() { return "http://lyrics.wikia.com/api.php?action=lyrics&fmt=xml&func=getSong&artist=%artist%&song=%title%"; }
virtual const char *getOpenTag() { return "<url>"; } virtual const char *getOpenTag() { return "<url>"; }
virtual const char *getCloseTag() { return "</url>"; } virtual const char *getCloseTag() { return "</url>"; }
@@ -76,13 +76,13 @@ struct GoogleLyricsFetcher : public LyricsFetcher
{ {
virtual Result fetch(const std::string &artist, const std::string &title); virtual Result fetch(const std::string &artist, const std::string &title);
protected: protected:
virtual const char *getSiteKeyword() = 0; virtual const char *getSiteKeyword() = 0;
virtual const char *getURL() { return URL; } virtual const char *getURL() { return URL; }
virtual bool isURLOk(const std::string &url); virtual bool isURLOk(const std::string &url);
private: private:
const char *URL; const char *URL;
}; };
@@ -90,7 +90,7 @@ struct LyricstimeFetcher : public GoogleLyricsFetcher
{ {
virtual const char *name() { return "lyricstime.com"; } virtual const char *name() { return "lyricstime.com"; }
protected: protected:
virtual const char *getSiteKeyword() { return "lyricstime"; } virtual const char *getSiteKeyword() { return "lyricstime"; }
virtual const char *getOpenTag() { return "<div id=\"songlyrics\" >"; } virtual const char *getOpenTag() { return "<div id=\"songlyrics\" >"; }
virtual const char *getCloseTag() { return "</div>"; } virtual const char *getCloseTag() { return "</div>"; }
@@ -104,7 +104,7 @@ struct MetrolyricsFetcher : public GoogleLyricsFetcher
{ {
virtual const char *name() { return "metrolyrics.com"; } virtual const char *name() { return "metrolyrics.com"; }
protected: protected:
virtual const char *getSiteKeyword() { return "metrolyrics"; } virtual const char *getSiteKeyword() { return "metrolyrics"; }
virtual const char *getOpenTag() { return "<div id=\"lyrics\">"; } virtual const char *getOpenTag() { return "<div id=\"lyrics\">"; }
virtual const char *getCloseTag() { return "</div>"; } virtual const char *getCloseTag() { return "</div>"; }
@@ -118,7 +118,7 @@ struct LyricsmaniaFetcher : public GoogleLyricsFetcher
{ {
virtual const char *name() { return "lyricsmania.com"; } virtual const char *name() { return "lyricsmania.com"; }
protected: protected:
virtual const char *getSiteKeyword() { return "lyricsmania"; } virtual const char *getSiteKeyword() { return "lyricsmania"; }
virtual const char *getOpenTag() { return "</strong> :<br />"; } virtual const char *getOpenTag() { return "</strong> :<br />"; }
virtual const char *getCloseTag() { return "&#91; <a"; } virtual const char *getCloseTag() { return "&#91; <a"; }
@@ -130,7 +130,7 @@ struct SonglyricsFetcher : public GoogleLyricsFetcher
{ {
virtual const char *name() { return "songlyrics.com"; } virtual const char *name() { return "songlyrics.com"; }
protected: protected:
virtual const char *getSiteKeyword() { return "songlyrics"; } virtual const char *getSiteKeyword() { return "songlyrics"; }
virtual const char *getOpenTag() { return "-6000px;\">"; } virtual const char *getOpenTag() { return "-6000px;\">"; }
virtual const char *getCloseTag() { return "</p>"; } virtual const char *getCloseTag() { return "</p>"; }
@@ -142,7 +142,7 @@ struct LyriczzFetcher : public GoogleLyricsFetcher
{ {
virtual const char *name() { return "lyriczz.com"; } virtual const char *name() { return "lyriczz.com"; }
protected: protected:
virtual const char *getSiteKeyword() { return "lyriczz"; } virtual const char *getSiteKeyword() { return "lyriczz"; }
virtual const char *getOpenTag() { return "border=0 /></a>"; } virtual const char *getOpenTag() { return "border=0 /></a>"; }
virtual const char *getCloseTag() { return "<a href"; } virtual const char *getCloseTag() { return "<a href"; }
@@ -152,7 +152,7 @@ struct Sing365Fetcher : public GoogleLyricsFetcher
{ {
virtual const char *name() { return "sing365.com"; } virtual const char *name() { return "sing365.com"; }
protected: protected:
virtual const char *getSiteKeyword() { return "sing365"; } virtual const char *getSiteKeyword() { return "sing365"; }
virtual const char *getOpenTag() { return "<br><br></div>"; } virtual const char *getOpenTag() { return "<br><br></div>"; }
virtual const char *getCloseTag() { return "<div align"; } virtual const char *getCloseTag() { return "<div align"; }
@@ -162,7 +162,7 @@ struct LyricsvipFetcher : public GoogleLyricsFetcher
{ {
virtual const char *name() { return "lyricsvip.com"; } virtual const char *name() { return "lyricsvip.com"; }
protected: protected:
virtual const char *getSiteKeyword() { return "lyricsvip"; } virtual const char *getSiteKeyword() { return "lyricsvip"; }
virtual const char *getOpenTag() { return "</h2>"; } virtual const char *getOpenTag() { return "</h2>"; }
virtual const char *getCloseTag() { return "</td>"; } virtual const char *getCloseTag() { return "</td>"; }
@@ -174,7 +174,7 @@ struct JustSomeLyricsFetcher : public GoogleLyricsFetcher
{ {
virtual const char *name() { return "justsomelyrics.com"; } virtual const char *name() { return "justsomelyrics.com"; }
protected: protected:
virtual const char *getSiteKeyword() { return "justsomelyrics"; } virtual const char *getSiteKeyword() { return "justsomelyrics"; }
virtual const char *getOpenTag() { return "alt=\"phone\" />\n</div>"; } virtual const char *getOpenTag() { return "alt=\"phone\" />\n</div>"; }
virtual const char *getCloseTag() { return "<div class=\"adsdiv\">"; } virtual const char *getCloseTag() { return "<div class=\"adsdiv\">"; }
@@ -184,7 +184,7 @@ struct LoloLyricsFetcher : public GoogleLyricsFetcher
{ {
virtual const char *name() { return "lololyrics.com"; } virtual const char *name() { return "lololyrics.com"; }
protected: protected:
virtual const char *getSiteKeyword() { return "lololyrics"; } virtual const char *getSiteKeyword() { return "lololyrics"; }
virtual const char *getOpenTag() { return "<div class=\"lyrics_txt\" id=\"lyrics_txt\" style=\"font-size:12px; letter-spacing:0.2px; line-height:20px;\">"; } virtual const char *getOpenTag() { return "<div class=\"lyrics_txt\" id=\"lyrics_txt\" style=\"font-size:12px; letter-spacing:0.2px; line-height:20px;\">"; }
virtual const char *getCloseTag() { return "</div>"; } virtual const char *getCloseTag() { return "</div>"; }
@@ -195,14 +195,14 @@ struct InternetLyricsFetcher : public GoogleLyricsFetcher
virtual const char *name() { return "the Internet"; } virtual const char *name() { return "the Internet"; }
virtual Result fetch(const std::string &artist, const std::string &title); virtual Result fetch(const std::string &artist, const std::string &title);
protected: protected:
virtual const char *getSiteKeyword() { return "lyrics"; } virtual const char *getSiteKeyword() { return "lyrics"; }
virtual const char *getOpenTag() { return ""; } virtual const char *getOpenTag() { return ""; }
virtual const char *getCloseTag() { return ""; } virtual const char *getCloseTag() { return ""; }
virtual bool isURLOk(const std::string &url); virtual bool isURLOk(const std::string &url);
private: private:
std::string URL; std::string URL;
}; };

View File

@@ -24,9 +24,8 @@
#include "interfaces.h" #include "interfaces.h"
#include "screen.h" #include "screen.h"
class MediaLibrary : public Screen<NC::Window>, public Filterable, public HasColumns, public HasSongs, public Searchable struct MediaLibrary : public Screen<NC::Window>, public Filterable, public HasColumns, public HasSongs, public Searchable
{ {
public:
virtual void switchTo() OVERRIDE; virtual void switchTo() OVERRIDE;
virtual void resize() OVERRIDE; virtual void resize() OVERRIDE;
@@ -89,11 +88,11 @@ class MediaLibrary : public Screen<NC::Window>, public Filterable, public HasCol
NC::Menu<SearchConstraints> *Albums; NC::Menu<SearchConstraints> *Albums;
NC::Menu<MPD::Song> *Songs; NC::Menu<MPD::Song> *Songs;
protected: protected:
virtual void init(); virtual void init();
virtual bool isLockable() { return true; } virtual bool isLockable() { return true; }
private: private:
void AddToPlaylist(bool); void AddToPlaylist(bool);
}; };

View File

@@ -29,10 +29,8 @@
#include "mpdpp.h" #include "mpdpp.h"
#include "screen.h" #include "screen.h"
class Outputs : public Screen< NC::Menu<MPD::Output> > struct Outputs : public Screen< NC::Menu<MPD::Output> >
{ {
public:
// Screen< NC::Menu<MPD::Output> > implementation // Screen< NC::Menu<MPD::Output> > implementation
virtual void switchTo() OVERRIDE; virtual void switchTo() OVERRIDE;
virtual void resize() OVERRIDE; virtual void resize() OVERRIDE;
@@ -51,7 +49,7 @@ class Outputs : public Screen< NC::Menu<MPD::Output> >
// private members // private members
void FetchList(); void FetchList();
protected: protected:
virtual void init() OVERRIDE; virtual void init() OVERRIDE;
virtual bool isLockable() OVERRIDE { return true; } virtual bool isLockable() OVERRIDE { return true; }
}; };

View File

@@ -27,9 +27,8 @@
#include "screen.h" #include "screen.h"
#include "song.h" #include "song.h"
class Playlist : public Screen<NC::Menu<MPD::Song>>, public Filterable, public HasSongs, public Searchable struct Playlist : public Screen<NC::Menu<MPD::Song>>, public Filterable, public HasSongs, public Searchable
{ {
public:
Playlist() : itsTotalLength(0), itsRemainingTime(0), itsScrollBegin(0) { } Playlist() : itsTotalLength(0), itsRemainingTime(0), itsScrollBegin(0) { }
~Playlist() { } ~Playlist() { }
@@ -90,11 +89,11 @@ class Playlist : public Screen<NC::Menu<MPD::Song>>, public Filterable, public H
static bool ReloadTotalLength; static bool ReloadTotalLength;
static bool ReloadRemaining; static bool ReloadRemaining;
protected: protected:
virtual void init() OVERRIDE; virtual void init() OVERRIDE;
virtual bool isLockable() OVERRIDE { return true; } virtual bool isLockable() OVERRIDE { return true; }
private: private:
std::string TotalLength(); std::string TotalLength();
std::string itsBufferedStats; std::string itsBufferedStats;

View File

@@ -24,9 +24,8 @@
#include "interfaces.h" #include "interfaces.h"
#include "screen.h" #include "screen.h"
class PlaylistEditor : public Screen<NC::Window>, public Filterable, public HasColumns, public HasSongs, public Searchable struct PlaylistEditor : public Screen<NC::Window>, public Filterable, public HasColumns, public HasSongs, public Searchable
{ {
public:
virtual void switchTo() OVERRIDE; virtual void switchTo() OVERRIDE;
virtual void resize() OVERRIDE; virtual void resize() OVERRIDE;
@@ -78,11 +77,11 @@ class PlaylistEditor : public Screen<NC::Window>, public Filterable, public HasC
NC::Menu<std::string> *Playlists; NC::Menu<std::string> *Playlists;
NC::Menu<MPD::Song> *Content; NC::Menu<MPD::Song> *Content;
protected: protected:
virtual void init() OVERRIDE; virtual void init() OVERRIDE;
virtual bool isLockable() OVERRIDE { return true; } virtual bool isLockable() OVERRIDE { return true; }
private: private:
void AddToPlaylist(bool); void AddToPlaylist(bool);
bool playlistsUpdateRequested; bool playlistsUpdateRequested;

View File

@@ -73,9 +73,8 @@ struct SEItem
MPD::Song itsSong; MPD::Song itsSong;
}; };
class SearchEngine : public Screen< NC::Menu<SEItem> >, public Filterable, public HasSongs, public Searchable struct SearchEngine : public Screen< NC::Menu<SEItem> >, public Filterable, public HasSongs, public Searchable
{ {
public:
// Screen< NC::Menu<SEItem> > implementation // Screen< NC::Menu<SEItem> > implementation
virtual void resize() OVERRIDE; virtual void resize() OVERRIDE;
virtual void switchTo() OVERRIDE; virtual void switchTo() OVERRIDE;
@@ -115,11 +114,11 @@ class SearchEngine : public Screen< NC::Menu<SEItem> >, public Filterable, publi
static size_t SearchButton; static size_t SearchButton;
static size_t ResetButton; static size_t ResetButton;
protected: protected:
virtual void init() OVERRIDE; virtual void init() OVERRIDE;
virtual bool isLockable() OVERRIDE { return true; } virtual bool isLockable() OVERRIDE { return true; }
private: private:
void Prepare(); void Prepare();
void Search(); void Search();
void reset(); void reset();

View File

@@ -23,9 +23,8 @@
#include "screen.h" #include "screen.h"
class SelectedItemsAdder : public Screen< NC::Menu<std::string> > struct SelectedItemsAdder : public Screen< NC::Menu<std::string> >
{ {
public:
SelectedItemsAdder() : itsPSWidth(35), itsPSHeight(11) { } SelectedItemsAdder() : itsPSWidth(35), itsPSHeight(11) { }
// Screen< NC::Menu<std::string> > implementation // Screen< NC::Menu<std::string> > implementation
@@ -44,11 +43,11 @@ class SelectedItemsAdder : public Screen< NC::Menu<std::string> >
virtual bool isMergable() OVERRIDE { return false; } virtual bool isMergable() OVERRIDE { return false; }
virtual bool isTabbable() OVERRIDE { return false; } virtual bool isTabbable() OVERRIDE { return false; }
protected: protected:
virtual void init() OVERRIDE; virtual void init() OVERRIDE;
virtual bool isLockable() OVERRIDE { return false; } virtual bool isLockable() OVERRIDE { return false; }
private: private:
void SetDimensions(); void SetDimensions();
NC::Menu<std::string> *itsPlaylistSelector; NC::Menu<std::string> *itsPlaylistSelector;

View File

@@ -23,9 +23,8 @@
#include "screen.h" #include "screen.h"
class ServerInfo : public Screen<NC::Scrollpad> struct ServerInfo : public Screen<NC::Scrollpad>
{ {
public:
// Screen<NC::Scrollpad> implementation // Screen<NC::Scrollpad> implementation
virtual void switchTo() OVERRIDE; virtual void switchTo() OVERRIDE;
virtual void resize() OVERRIDE; virtual void resize() OVERRIDE;
@@ -40,11 +39,11 @@ class ServerInfo : public Screen<NC::Scrollpad>
virtual bool isMergable() OVERRIDE { return false; } virtual bool isMergable() OVERRIDE { return false; }
virtual bool isTabbable() OVERRIDE { return false; } virtual bool isTabbable() OVERRIDE { return false; }
protected: protected:
virtual void init() OVERRIDE; virtual void init() OVERRIDE;
virtual bool isLockable() OVERRIDE { return false; } virtual bool isLockable() OVERRIDE { return false; }
private: private:
void SetDimensions(); void SetDimensions();
MPD::StringList itsURLHandlers; MPD::StringList itsURLHandlers;

View File

@@ -192,7 +192,7 @@ struct Configuration
SortMode browser_sort_mode; SortMode browser_sort_mode;
private: private:
void MakeProperPath(std::string &dir); void MakeProperPath(std::string &dir);
std::string home_directory; std::string home_directory;

View File

@@ -79,7 +79,7 @@ struct Song
static const char FormatEscapeCharacter = 1; static const char FormatEscapeCharacter = 1;
private: private:
const char *getTag(mpd_tag_type type, unsigned idx) const; const char *getTag(mpd_tag_type type, unsigned idx) const;
std::string ParseFormat(std::string::const_iterator &it, const std::string &tags_separator, std::string ParseFormat(std::string::const_iterator &it, const std::string &tags_separator,
const std::string &escape_chars) const; const std::string &escape_chars) const;

View File

@@ -24,9 +24,8 @@
#include "screen.h" #include "screen.h"
#include "mutable_song.h" #include "mutable_song.h"
class SongInfo : public Screen<NC::Scrollpad> struct SongInfo : public Screen<NC::Scrollpad>
{ {
public:
struct Metadata struct Metadata
{ {
const char *Name; const char *Name;
@@ -49,14 +48,13 @@ class SongInfo : public Screen<NC::Scrollpad>
virtual bool isTabbable() OVERRIDE { return false; } virtual bool isTabbable() OVERRIDE { return false; }
// private members // private members
static const Metadata Tags[]; static const Metadata Tags[];
protected: protected:
virtual void init() OVERRIDE; virtual void init() OVERRIDE;
virtual bool isLockable() OVERRIDE { return false; } virtual bool isLockable() OVERRIDE { return false; }
private: private:
void PrepareSong(MPD::Song &); void PrepareSong(MPD::Song &);
}; };

View File

@@ -33,9 +33,8 @@
#include "regex_filter.h" #include "regex_filter.h"
#include "screen.h" #include "screen.h"
class TagEditor : public Screen<NC::Window>, public Filterable, public HasColumns, public HasSongs, public Searchable struct TagEditor : public Screen<NC::Window>, public Filterable, public HasColumns, public HasSongs, public Searchable
{ {
public:
TagEditor() : FParser(0), FParserHelper(0), FParserLegend(0), FParserPreview(0), itsBrowsedDir("/") { } TagEditor() : FParser(0), FParserHelper(0), FParserLegend(0), FParserPreview(0), itsBrowsedDir("/") { }
virtual void resize() OVERRIDE; virtual void resize() OVERRIDE;
@@ -87,11 +86,11 @@ class TagEditor : public Screen<NC::Window>, public Filterable, public HasColumn
NC::Menu<std::string> *TagTypes; NC::Menu<std::string> *TagTypes;
NC::Menu<MPD::MutableSong> *Tags; NC::Menu<MPD::MutableSong> *Tags;
protected: protected:
virtual void init(); virtual void init();
virtual bool isLockable() { return true; } virtual bool isLockable() { return true; }
private: private:
void SetDimensions(size_t, size_t); void SetDimensions(size_t, size_t);
std::vector<MPD::MutableSong *> EditedSongs; std::vector<MPD::MutableSong *> EditedSongs;

View File

@@ -28,9 +28,8 @@
#include "mutable_song.h" #include "mutable_song.h"
#include "screen.h" #include "screen.h"
class TinyTagEditor : public Screen< NC::Menu<NC::Buffer> > struct TinyTagEditor : public Screen< NC::Menu<NC::Buffer> >
{ {
public:
// Screen< NC::Menu<NC::Buffer> > implementation // Screen< NC::Menu<NC::Buffer> > implementation
virtual void resize() OVERRIDE; virtual void resize() OVERRIDE;
virtual void switchTo() OVERRIDE; virtual void switchTo() OVERRIDE;
@@ -49,11 +48,11 @@ class TinyTagEditor : public Screen< NC::Menu<NC::Buffer> >
// private members // private members
void SetEdited(const MPD::Song &); void SetEdited(const MPD::Song &);
protected: protected:
virtual void init() OVERRIDE; virtual void init() OVERRIDE;
virtual bool isLockable() OVERRIDE { return true; } virtual bool isLockable() OVERRIDE { return true; }
private: private:
bool getTags(); bool getTags();
MPD::MutableSong itsEdited; MPD::MutableSong itsEdited;
}; };

View File

@@ -32,9 +32,8 @@
# include <fftw3.h> # include <fftw3.h>
#endif #endif
class Visualizer : public Screen<NC::Window> struct Visualizer : public Screen<NC::Window>
{ {
public:
virtual void switchTo() OVERRIDE; virtual void switchTo() OVERRIDE;
virtual void resize() OVERRIDE; virtual void resize() OVERRIDE;
@@ -57,11 +56,11 @@ class Visualizer : public Screen<NC::Window>
static const int WindowTimeout; static const int WindowTimeout;
protected: protected:
virtual void init(); virtual void init();
virtual bool isLockable() { return true; } virtual bool isLockable() { return true; }
private: private:
void DrawSoundWave(int16_t *, ssize_t, size_t, size_t); void DrawSoundWave(int16_t *, ssize_t, size_t, size_t);
# ifdef HAVE_FFTW3_H # ifdef HAVE_FFTW3_H
void DrawFrequencySpectrum(int16_t *, ssize_t, size_t, size_t); void DrawFrequencySpectrum(int16_t *, ssize_t, size_t, size_t);