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_ACTIONS_H
22 #define NCMPCPP_ACTIONS_H
24 #include <boost/format.hpp>
34 Dummy
, MouseEvent
, ScrollUp
, ScrollDown
, ScrollUpArtist
, ScrollUpAlbum
,
35 ScrollDownArtist
, ScrollDownAlbum
, PageUp
, PageDown
, MoveHome
, MoveEnd
,
36 ToggleInterface
, JumpToParentDirectory
, PressEnter
, PressSpace
, PreviousColumn
,
37 NextColumn
, MasterScreen
, SlaveScreen
, VolumeUp
, VolumeDown
, DeletePlaylistItems
,
38 DeleteStoredPlaylist
, DeleteBrowserItems
, ReplaySong
, Previous
, Next
, Pause
,
39 Stop
, ExecuteCommand
, SavePlaylist
, MoveSortOrderUp
, MoveSortOrderDown
,
40 MoveSelectedItemsUp
, MoveSelectedItemsDown
, MoveSelectedItemsTo
, Add
,
41 SeekForward
, SeekBackward
, ToggleDisplayMode
, ToggleSeparatorsBetweenAlbums
,
42 ToggleLyricsFetcher
, ToggleFetchingLyricsInBackground
, TogglePlayingSongCentering
,
43 UpdateDatabase
, JumpToPlayingSong
, ToggleRepeat
, Shuffle
, ToggleRandom
,
44 StartSearching
, SaveTagChanges
, ToggleSingle
, ToggleConsume
, ToggleCrossfade
,
45 SetCrossfade
, SetVolume
, EditSong
, EditLibraryTag
, EditLibraryAlbum
, EditDirectoryName
,
46 EditPlaylistName
, EditLyrics
, JumpToBrowser
, JumpToMediaLibrary
,
47 JumpToPlaylistEditor
, ToggleScreenLock
, JumpToTagEditor
, JumpToPositionInSong
,
48 ReverseSelection
, RemoveSelection
, SelectAlbum
, AddSelectedItems
,
49 CropMainPlaylist
, CropPlaylist
, ClearMainPlaylist
, ClearPlaylist
, SortPlaylist
,
50 ReversePlaylist
, ApplyFilter
, Find
, FindItemForward
, FindItemBackward
,
51 NextFoundItem
, PreviousFoundItem
, ToggleFindMode
, ToggleReplayGainMode
,
52 ToggleSpaceMode
, ToggleAddMode
, ToggleMouse
, ToggleBitrateVisibility
,
53 AddRandomItems
, ToggleBrowserSortMode
, ToggleLibraryTagType
,
54 ToggleMediaLibrarySortMode
, RefetchLyrics
,
55 SetSelectedItemsPriority
, SetVisualizerSampleMultiplier
, FilterPlaylistOnPriorities
,
56 ShowSongInfo
, ShowArtistInfo
, ShowLyrics
, Quit
, NextScreen
, PreviousScreen
,
57 ShowHelp
, ShowPlaylist
, ShowBrowser
, ChangeBrowseMode
, ShowSearchEngine
,
58 ResetSearchEngine
, ShowMediaLibrary
, ToggleMediaLibraryColumnsMode
,
59 ShowPlaylistEditor
, ShowTagEditor
, ShowOutputs
, ShowVisualizer
,
60 ShowClock
, ShowServerInfo
,
61 _numberOfActions
// needed to dynamically calculate size of action array
64 void validateScreenSize();
65 void initializeScreens();
66 void setResizeFlags();
67 void resizeScreen(bool reload_main_window
);
68 void setWindowsDimensions();
70 bool askYesNoQuestion(const boost::format
&question
, void (*callback
)());
71 inline bool askYesNoQuestion(const std::string
&question
, void (*callback
)())
73 return askYesNoQuestion(boost::format(question
), callback
);
76 bool isMPDMusicDirSet();
78 extern bool OriginalStatusbarVisibility
;
79 extern bool ExitMainLoop
;
81 extern size_t HeaderHeight
;
82 extern size_t FooterHeight
;
83 extern size_t FooterStartY
;
87 BaseAction(Type type_
, const char *name_
) : m_type(type_
), m_name(name_
) { }
89 const char *name() const { return m_name
; }
90 Type
type() const { return m_type
; }
92 virtual bool canBeRun() const { return true; }
105 virtual void run() = 0;
112 BaseAction
&get(Type at
);
113 BaseAction
*get(const std::string
&name
);
115 struct Dummy
: public BaseAction
117 Dummy() : BaseAction(Type::Dummy
, "dummy") { }
120 virtual void run() { }
123 struct MouseEvent
: public BaseAction
125 MouseEvent() : BaseAction(Type::MouseEvent
, "mouse_event") { }
128 virtual bool canBeRun() const;
132 MEVENT m_mouse_event
;
133 MEVENT m_old_mouse_event
;
136 struct ScrollUp
: public BaseAction
138 ScrollUp() : BaseAction(Type::ScrollUp
, "scroll_up") { }
144 struct ScrollDown
: public BaseAction
146 ScrollDown() : BaseAction(Type::ScrollDown
, "scroll_down") { }
152 struct ScrollUpArtist
: public BaseAction
154 ScrollUpArtist() : BaseAction(Type::ScrollUpArtist
, "scroll_up_artist") { }
157 virtual bool canBeRun() const;
161 struct ScrollUpAlbum
: public BaseAction
163 ScrollUpAlbum() : BaseAction(Type::ScrollUpAlbum
, "scroll_up_album") { }
166 virtual bool canBeRun() const;
170 struct ScrollDownArtist
: public BaseAction
172 ScrollDownArtist() : BaseAction(Type::ScrollDownArtist
, "scroll_down_artist") { }
175 virtual bool canBeRun() const;
179 struct ScrollDownAlbum
: public BaseAction
181 ScrollDownAlbum() : BaseAction(Type::ScrollDownAlbum
, "scroll_down_album") { }
184 virtual bool canBeRun() const;
188 struct PageUp
: public BaseAction
190 PageUp() : BaseAction(Type::PageUp
, "page_up") { }
196 struct PageDown
: public BaseAction
198 PageDown() : BaseAction(Type::PageDown
, "page_down") { }
204 struct MoveHome
: public BaseAction
206 MoveHome() : BaseAction(Type::MoveHome
, "move_home") { }
212 struct MoveEnd
: public BaseAction
214 MoveEnd() : BaseAction(Type::MoveEnd
, "move_end") { }
220 struct ToggleInterface
: public BaseAction
222 ToggleInterface() : BaseAction(Type::ToggleInterface
, "toggle_interface") { }
228 struct JumpToParentDirectory
: public BaseAction
230 JumpToParentDirectory() : BaseAction(Type::JumpToParentDirectory
, "jump_to_parent_directory") { }
233 virtual bool canBeRun() const;
237 struct PressEnter
: public BaseAction
239 PressEnter() : BaseAction(Type::PressEnter
, "press_enter") { }
245 struct PressSpace
: public BaseAction
247 PressSpace() : BaseAction(Type::PressSpace
, "press_space") { }
253 struct PreviousColumn
: public BaseAction
255 PreviousColumn() : BaseAction(Type::PreviousColumn
, "previous_column") { }
258 virtual bool canBeRun() const;
262 struct NextColumn
: public BaseAction
264 NextColumn() : BaseAction(Type::NextColumn
, "next_column") { }
267 virtual bool canBeRun() const;
271 struct MasterScreen
: public BaseAction
273 MasterScreen() : BaseAction(Type::MasterScreen
, "master_screen") { }
276 virtual bool canBeRun() const;
280 struct SlaveScreen
: public BaseAction
282 SlaveScreen() : BaseAction(Type::SlaveScreen
, "slave_screen") { }
285 virtual bool canBeRun() const;
289 struct VolumeUp
: public BaseAction
291 VolumeUp() : BaseAction(Type::VolumeUp
, "volume_up") { }
297 struct VolumeDown
: public BaseAction
299 VolumeDown() : BaseAction(Type::VolumeDown
, "volume_down") { }
305 struct DeletePlaylistItems
: public BaseAction
307 DeletePlaylistItems() : BaseAction(Type::DeletePlaylistItems
, "delete_playlist_items") { }
310 virtual bool canBeRun() const;
314 struct DeleteStoredPlaylist
: public BaseAction
316 DeleteStoredPlaylist() : BaseAction(Type::DeleteStoredPlaylist
, "delete_stored_playlist") { }
319 virtual bool canBeRun() const;
323 struct DeleteBrowserItems
: public BaseAction
325 DeleteBrowserItems() : BaseAction(Type::DeleteBrowserItems
, "delete_browser_items") { }
328 virtual bool canBeRun() const;
332 struct ReplaySong
: public BaseAction
334 ReplaySong() : BaseAction(Type::ReplaySong
, "replay_song") { }
340 struct PreviousSong
: public BaseAction
342 PreviousSong() : BaseAction(Type::Previous
, "previous") { }
348 struct NextSong
: public BaseAction
350 NextSong() : BaseAction(Type::Next
, "next") { }
356 struct Pause
: public BaseAction
358 Pause() : BaseAction(Type::Pause
, "pause") { }
364 struct Stop
: public BaseAction
366 Stop() : BaseAction(Type::Stop
, "stop") { }
372 struct ExecuteCommand
: public BaseAction
374 ExecuteCommand() : BaseAction(Type::ExecuteCommand
, "execute_command") { }
380 struct SavePlaylist
: public BaseAction
382 SavePlaylist() : BaseAction(Type::SavePlaylist
, "save_playlist") { }
388 struct MoveSortOrderUp
: public BaseAction
390 MoveSortOrderUp() : BaseAction(Type::MoveSortOrderUp
, "move_sort_order_up") { }
393 virtual bool canBeRun() const;
397 struct MoveSortOrderDown
: public BaseAction
399 MoveSortOrderDown() : BaseAction(Type::MoveSortOrderDown
, "move_sort_order_down") { }
402 virtual bool canBeRun() const;
406 struct MoveSelectedItemsUp
: public BaseAction
408 MoveSelectedItemsUp() : BaseAction(Type::MoveSelectedItemsUp
, "move_selected_items_up") { }
411 virtual bool canBeRun() const;
415 struct MoveSelectedItemsDown
: public BaseAction
417 MoveSelectedItemsDown() : BaseAction(Type::MoveSelectedItemsDown
, "move_selected_items_down") { }
420 virtual bool canBeRun() const;
424 struct MoveSelectedItemsTo
: public BaseAction
426 MoveSelectedItemsTo() : BaseAction(Type::MoveSelectedItemsTo
, "move_selected_items_to") { }
429 virtual bool canBeRun() const;
433 struct Add
: public BaseAction
435 Add() : BaseAction(Type::Add
, "add") { }
438 virtual bool canBeRun() const;
442 struct SeekForward
: public BaseAction
444 SeekForward() : BaseAction(Type::SeekForward
, "seek_forward") { }
447 virtual bool canBeRun() const;
451 struct SeekBackward
: public BaseAction
453 SeekBackward() : BaseAction(Type::SeekBackward
, "seek_backward") { }
456 virtual bool canBeRun() const;
460 struct ToggleDisplayMode
: public BaseAction
462 ToggleDisplayMode() : BaseAction(Type::ToggleDisplayMode
, "toggle_display_mode") { }
465 virtual bool canBeRun() const;
469 struct ToggleSeparatorsBetweenAlbums
: public BaseAction
471 ToggleSeparatorsBetweenAlbums()
472 : BaseAction(Type::ToggleSeparatorsBetweenAlbums
, "toggle_separators_between_albums") { }
475 virtual bool canBeRun() const;
479 struct ToggleLyricsFetcher
: public BaseAction
481 ToggleLyricsFetcher() : BaseAction(Type::ToggleLyricsFetcher
, "toggle_lyrics_fetcher") { }
484 # ifndef HAVE_CURL_CURL_H
485 virtual bool canBeRun() const;
486 # endif // NOT HAVE_CURL_CURL_H
490 struct ToggleFetchingLyricsInBackground
: public BaseAction
492 ToggleFetchingLyricsInBackground()
493 : BaseAction(Type::ToggleFetchingLyricsInBackground
, "toggle_fetching_lyrics_in_background") { }
496 # ifndef HAVE_CURL_CURL_H
497 virtual bool canBeRun() const;
498 # endif // NOT HAVE_CURL_CURL_H
502 struct TogglePlayingSongCentering
: public BaseAction
504 TogglePlayingSongCentering()
505 : BaseAction(Type::TogglePlayingSongCentering
, "toggle_playing_song_centering") { }
511 struct UpdateDatabase
: public BaseAction
513 UpdateDatabase() : BaseAction(Type::UpdateDatabase
, "update_database") { }
519 struct JumpToPlayingSong
: public BaseAction
521 JumpToPlayingSong() : BaseAction(Type::JumpToPlayingSong
, "jump_to_playing_song") { }
524 virtual bool canBeRun() const;
528 struct ToggleRepeat
: public BaseAction
530 ToggleRepeat() : BaseAction(Type::ToggleRepeat
, "toggle_repeat") { }
536 struct Shuffle
: public BaseAction
538 Shuffle() : BaseAction(Type::Shuffle
, "shuffle") { }
544 struct ToggleRandom
: public BaseAction
546 ToggleRandom() : BaseAction(Type::ToggleRandom
, "toggle_random") { }
552 struct StartSearching
: public BaseAction
554 StartSearching() : BaseAction(Type::StartSearching
, "start_searching") { }
557 virtual bool canBeRun() const;
561 struct SaveTagChanges
: public BaseAction
563 SaveTagChanges() : BaseAction(Type::SaveTagChanges
, "save_tag_changes") { }
566 virtual bool canBeRun() const;
570 struct ToggleSingle
: public BaseAction
572 ToggleSingle() : BaseAction(Type::ToggleSingle
, "toggle_single") { }
578 struct ToggleConsume
: public BaseAction
580 ToggleConsume() : BaseAction(Type::ToggleConsume
, "toggle_consume") { }
586 struct ToggleCrossfade
: public BaseAction
588 ToggleCrossfade() : BaseAction(Type::ToggleCrossfade
, "toggle_crossfade") { }
594 struct SetCrossfade
: public BaseAction
596 SetCrossfade() : BaseAction(Type::SetCrossfade
, "set_crossfade") { }
602 struct SetVolume
: public BaseAction
604 SetVolume() : BaseAction(Type::SetVolume
, "set_volume") { }
610 struct EditSong
: public BaseAction
612 EditSong() : BaseAction(Type::EditSong
, "edit_song") { }
615 virtual bool canBeRun() const;
619 struct EditLibraryTag
: public BaseAction
621 EditLibraryTag() : BaseAction(Type::EditLibraryTag
, "edit_library_tag") { }
624 virtual bool canBeRun() const;
628 struct EditLibraryAlbum
: public BaseAction
630 EditLibraryAlbum() : BaseAction(Type::EditLibraryAlbum
, "edit_library_album") { }
633 virtual bool canBeRun() const;
637 struct EditDirectoryName
: public BaseAction
639 EditDirectoryName() : BaseAction(Type::EditDirectoryName
, "edit_directory_name") { }
642 virtual bool canBeRun() const;
646 struct EditPlaylistName
: public BaseAction
648 EditPlaylistName() : BaseAction(Type::EditPlaylistName
, "edit_playlist_name") { }
651 virtual bool canBeRun() const;
655 struct EditLyrics
: public BaseAction
657 EditLyrics() : BaseAction(Type::EditLyrics
, "edit_lyrics") { }
660 virtual bool canBeRun() const;
664 struct JumpToBrowser
: public BaseAction
666 JumpToBrowser() : BaseAction(Type::JumpToBrowser
, "jump_to_browser") { }
669 virtual bool canBeRun() const;
673 struct JumpToMediaLibrary
: public BaseAction
675 JumpToMediaLibrary() : BaseAction(Type::JumpToMediaLibrary
, "jump_to_media_library") { }
678 virtual bool canBeRun() const;
682 struct JumpToPlaylistEditor
: public BaseAction
684 JumpToPlaylistEditor() : BaseAction(Type::JumpToPlaylistEditor
, "jump_to_playlist_editor") { }
687 virtual bool canBeRun() const;
691 struct ToggleScreenLock
: public BaseAction
693 ToggleScreenLock() : BaseAction(Type::ToggleScreenLock
, "toggle_screen_lock") { }
699 struct JumpToTagEditor
: public BaseAction
701 JumpToTagEditor() : BaseAction(Type::JumpToTagEditor
, "jump_to_tag_editor") { }
704 virtual bool canBeRun() const;
708 struct JumpToPositionInSong
: public BaseAction
710 JumpToPositionInSong() : BaseAction(Type::JumpToPositionInSong
, "jump_to_position_in_song") { }
713 virtual bool canBeRun() const;
717 struct ReverseSelection
: public BaseAction
719 ReverseSelection() : BaseAction(Type::ReverseSelection
, "reverse_selection") { }
722 virtual bool canBeRun() const;
726 struct RemoveSelection
: public BaseAction
728 RemoveSelection() : BaseAction(Type::RemoveSelection
, "remove_selection") { }
731 virtual bool canBeRun() const;
735 struct SelectAlbum
: public BaseAction
737 SelectAlbum() : BaseAction(Type::SelectAlbum
, "select_album") { }
740 virtual bool canBeRun() const;
744 struct AddSelectedItems
: public BaseAction
746 AddSelectedItems() : BaseAction(Type::AddSelectedItems
, "add_selected_items") { }
749 virtual bool canBeRun() const;
753 struct CropMainPlaylist
: public BaseAction
755 CropMainPlaylist() : BaseAction(Type::CropMainPlaylist
, "crop_main_playlist") { }
761 struct CropPlaylist
: public BaseAction
763 CropPlaylist() : BaseAction(Type::CropPlaylist
, "crop_playlist") { }
766 virtual bool canBeRun() const;
770 struct ClearMainPlaylist
: public BaseAction
772 ClearMainPlaylist() : BaseAction(Type::ClearMainPlaylist
, "clear_main_playlist") { }
778 struct ClearPlaylist
: public BaseAction
780 ClearPlaylist() : BaseAction(Type::ClearPlaylist
, "clear_playlist") { }
783 virtual bool canBeRun() const;
787 struct SortPlaylist
: public BaseAction
789 SortPlaylist() : BaseAction(Type::SortPlaylist
, "sort_playlist") { }
792 virtual bool canBeRun() const;
796 struct ReversePlaylist
: public BaseAction
798 ReversePlaylist() : BaseAction(Type::ReversePlaylist
, "reverse_playlist") { }
801 virtual bool canBeRun() const;
805 struct ApplyFilter
: public BaseAction
807 ApplyFilter() : BaseAction(Type::ApplyFilter
, "apply_filter") { }
810 virtual bool canBeRun() const;
814 struct Find
: public BaseAction
816 Find() : BaseAction(Type::Find
, "find") { }
819 virtual bool canBeRun() const;
823 struct FindItemForward
: public BaseAction
825 FindItemForward() : BaseAction(Type::FindItemForward
, "find_item_forward") { }
828 virtual bool canBeRun() const;
832 struct FindItemBackward
: public BaseAction
834 FindItemBackward() : BaseAction(Type::FindItemBackward
, "find_item_backward") { }
837 virtual bool canBeRun() const;
841 struct NextFoundItem
: public BaseAction
843 NextFoundItem() : BaseAction(Type::NextFoundItem
, "next_found_item") { }
846 virtual bool canBeRun() const;
850 struct PreviousFoundItem
: public BaseAction
852 PreviousFoundItem() : BaseAction(Type::PreviousFoundItem
, "previous_found_item") { }
855 virtual bool canBeRun() const;
859 struct ToggleFindMode
: public BaseAction
861 ToggleFindMode() : BaseAction(Type::ToggleFindMode
, "toggle_find_mode") { }
867 struct ToggleReplayGainMode
: public BaseAction
869 ToggleReplayGainMode() : BaseAction(Type::ToggleReplayGainMode
, "toggle_replay_gain_mode") { }
875 struct ToggleSpaceMode
: public BaseAction
877 ToggleSpaceMode() : BaseAction(Type::ToggleSpaceMode
, "toggle_space_mode") { }
883 struct ToggleAddMode
: public BaseAction
885 ToggleAddMode() : BaseAction(Type::ToggleAddMode
, "toggle_add_mode") { }
891 struct ToggleMouse
: public BaseAction
893 ToggleMouse() : BaseAction(Type::ToggleMouse
, "toggle_mouse") { }
899 struct ToggleBitrateVisibility
: public BaseAction
901 ToggleBitrateVisibility() : BaseAction(Type::ToggleBitrateVisibility
, "toggle_bitrate_visibility") { }
907 struct AddRandomItems
: public BaseAction
909 AddRandomItems() : BaseAction(Type::AddRandomItems
, "add_random_items") { }
915 struct ToggleBrowserSortMode
: public BaseAction
917 ToggleBrowserSortMode() : BaseAction(Type::ToggleBrowserSortMode
, "toggle_browser_sort_mode") { }
920 virtual bool canBeRun() const;
924 struct ToggleLibraryTagType
: public BaseAction
926 ToggleLibraryTagType() : BaseAction(Type::ToggleLibraryTagType
, "toggle_library_tag_type") { }
929 virtual bool canBeRun() const;
933 struct ToggleMediaLibrarySortMode
: public BaseAction
935 ToggleMediaLibrarySortMode()
936 : BaseAction(Type::ToggleMediaLibrarySortMode
, "toggle_media_library_sort_mode") { }
939 virtual bool canBeRun() const;
943 struct RefetchLyrics
: public BaseAction
945 RefetchLyrics() : BaseAction(Type::RefetchLyrics
, "refetch_lyrics") { }
948 virtual bool canBeRun() const;
952 struct SetSelectedItemsPriority
: public BaseAction
954 SetSelectedItemsPriority()
955 : BaseAction(Type::SetSelectedItemsPriority
, "set_selected_items_priority") { }
958 virtual bool canBeRun() const;
962 struct SetVisualizerSampleMultiplier
: public BaseAction
964 SetVisualizerSampleMultiplier()
965 : BaseAction(Type::SetVisualizerSampleMultiplier
, "set_visualizer_sample_multiplier") { }
968 virtual bool canBeRun() const;
972 struct FilterPlaylistOnPriorities
: public BaseAction
974 FilterPlaylistOnPriorities()
975 : BaseAction(Type::FilterPlaylistOnPriorities
, "filter_playlist_on_priorities") { }
978 virtual bool canBeRun() const;
982 struct ShowSongInfo
: public BaseAction
984 ShowSongInfo() : BaseAction(Type::ShowSongInfo
, "show_song_info") { }
990 struct ShowArtistInfo
: public BaseAction
992 ShowArtistInfo() : BaseAction(Type::ShowArtistInfo
, "show_artist_info") { }
995 virtual bool canBeRun() const;
999 struct ShowLyrics
: public BaseAction
1001 ShowLyrics() : BaseAction(Type::ShowLyrics
, "show_lyrics") { }
1007 struct Quit
: public BaseAction
1009 Quit() : BaseAction(Type::Quit
, "quit") { }
1015 struct NextScreen
: public BaseAction
1017 NextScreen() : BaseAction(Type::NextScreen
, "next_screen") { }
1023 struct PreviousScreen
: public BaseAction
1025 PreviousScreen() : BaseAction(Type::PreviousScreen
, "previous_screen") { }
1031 struct ShowHelp
: public BaseAction
1033 ShowHelp() : BaseAction(Type::ShowHelp
, "show_help") { }
1036 virtual bool canBeRun() const;
1040 struct ShowPlaylist
: public BaseAction
1042 ShowPlaylist() : BaseAction(Type::ShowPlaylist
, "show_playlist") { }
1045 virtual bool canBeRun() const;
1049 struct ShowBrowser
: public BaseAction
1051 ShowBrowser() : BaseAction(Type::ShowBrowser
, "show_browser") { }
1054 virtual bool canBeRun() const;
1058 struct ChangeBrowseMode
: public BaseAction
1060 ChangeBrowseMode() : BaseAction(Type::ChangeBrowseMode
, "change_browse_mode") { }
1063 virtual bool canBeRun() const;
1067 struct ShowSearchEngine
: public BaseAction
1069 ShowSearchEngine() : BaseAction(Type::ShowSearchEngine
, "show_search_engine") { }
1072 virtual bool canBeRun() const;
1076 struct ResetSearchEngine
: public BaseAction
1078 ResetSearchEngine() : BaseAction(Type::ResetSearchEngine
, "reset_search_engine") { }
1081 virtual bool canBeRun() const;
1085 struct ShowMediaLibrary
: public BaseAction
1087 ShowMediaLibrary() : BaseAction(Type::ShowMediaLibrary
, "show_media_library") { }
1090 virtual bool canBeRun() const;
1094 struct ToggleMediaLibraryColumnsMode
: public BaseAction
1096 ToggleMediaLibraryColumnsMode()
1097 : BaseAction(Type::ToggleMediaLibraryColumnsMode
, "toggle_media_library_columns_mode") { }
1100 virtual bool canBeRun() const;
1104 struct ShowPlaylistEditor
: public BaseAction
1106 ShowPlaylistEditor() : BaseAction(Type::ShowPlaylistEditor
, "show_playlist_editor") { }
1109 virtual bool canBeRun() const;
1113 struct ShowTagEditor
: public BaseAction
1115 ShowTagEditor() : BaseAction(Type::ShowTagEditor
, "show_tag_editor") { }
1118 virtual bool canBeRun() const;
1122 struct ShowOutputs
: public BaseAction
1124 ShowOutputs() : BaseAction(Type::ShowOutputs
, "show_outputs") { }
1127 virtual bool canBeRun() const;
1131 struct ShowVisualizer
: public BaseAction
1133 ShowVisualizer() : BaseAction(Type::ShowVisualizer
, "show_visualizer") { }
1136 virtual bool canBeRun() const;
1140 struct ShowClock
: public BaseAction
1142 ShowClock() : BaseAction(Type::ShowClock
, "show_clock") { }
1145 virtual bool canBeRun() const;
1149 struct ShowServerInfo
: public BaseAction
1151 ShowServerInfo() : BaseAction(Type::ShowServerInfo
, "show_server_info") { }
1154 # ifdef HAVE_TAGLIB_H
1155 virtual bool canBeRun() const;
1156 # endif // HAVE_TAGLIB_H
1162 #endif // NCMPCPP_ACTIONS_H