actions: rename DeselectItems to RemoveSelection
[ncmpcpp.git] / src / actions.h
blobf04447921c612adfb2a4875d84ab653bdb283ebb
1 /***************************************************************************
2 * Copyright (C) 2008-2012 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 _ACTIONS_H
22 #define _ACTIONS_H
24 #include <map>
25 #include <string>
26 #include "window.h"
28 enum ActionType
30 aMacroUtility,
31 aDummy, aMouseEvent, aScrollUp, aScrollDown, aScrollUpArtist, aScrollUpAlbum, aScrollDownArtist,
32 aScrollDownAlbum, aPageUp, aPageDown, aMoveHome, aMoveEnd, aToggleInterface, aJumpToParentDir,
33 aPressEnter, aPressSpace, aPreviousColumn, aNextColumn, aMasterScreen, aSlaveScreen, aVolumeUp,
34 aVolumeDown, aDelete, aReplaySong, aPreviousSong, aNextSong, aPause, aStop, aSavePlaylist,
35 aMoveSortOrderUp, aMoveSortOrderDown, aMoveSelectedItemsUp, aMoveSelectedItemsDown,
36 aMoveSelectedItemsTo, aAdd, aSeekForward, aSeekBackward, aToggleDisplayMode, aToggleSeparatorsBetweenAlbums,
37 aToggleLyricsFetcher, aToggleFetchingLyricsInBackground, aToggleAutoCenter, aUpdateDatabase,
38 aJumpToPlayingSong, aToggleRepeat, aShuffle, aToggleRandom, aStartSearching, aSaveTagChanges,
39 aToggleSingle, aToggleConsume, aToggleCrossfade, aSetCrossfade, aEditSong, aEditLibraryTag,
40 aEditLibraryAlbum, aEditDirectoryName, aEditPlaylistName, aEditLyrics, aJumpToBrowser,
41 aJumpToMediaLibrary, aJumpToPlaylistEditor, aToggleScreenLock, aJumpToTagEditor,
42 aJumpToPositionInSong, aReverseSelection, aRemoveSelection, aSelectAlbum, aAddSelectedItems,
43 aCropMainPlaylist, aCropPlaylist, aClearMainPlaylist, aClearPlaylist, aSortPlaylist, aReversePlaylist,
44 aApplyFilter, aFind, aFindItemForward, aFindItemBackward, aNextFoundItem,
45 aPreviousFoundItem, aToggleFindMode, aToggleReplayGainMode, aToggleSpaceMode, aToggleAddMode,
46 aToggleMouse, aToggleBitrateVisibility, aAddRandomItems, aToggleBrowserSortMode, aToggleLibraryTagType,
47 aRefetchLyrics, aRefetchArtistInfo, aSetSelectedItemsPriority, aShowSongInfo, aShowArtistInfo,
48 aShowLyrics, aQuit, aNextScreen, aPreviousScreen, aShowHelp, aShowPlaylist, aShowBrowser,
49 aShowSearchEngine, aShowMediaLibrary, aShowPlaylistEditor, aShowTagEditor, aShowOutputs,
50 aShowVisualizer, aShowClock, aShowServerInfo
53 struct Action
55 enum FindDirection { fdForward, fdBackward };
57 Action(ActionType type, const char *name) : itsType(type), itsName(name) { }
59 const char *Name() const { return itsName; }
60 ActionType Type() const { return itsType; }
62 virtual bool canBeRun() const { return true; }
64 bool Execute()
66 if (canBeRun())
68 Run();
69 return true;
71 return false;
74 static void ValidateScreenSize();
75 static void SetResizeFlags();
76 static void ResizeScreen();
77 static void SetWindowsDimensions();
79 static bool ConnectToMPD();
80 static bool AskYesNoQuestion(const std::string &question, void (*callback)());
81 static bool isMPDMusicDirSet();
83 static Action *Get(ActionType at);
84 static Action *Get(const std::string &name);
86 static bool OriginalStatusbarVisibility;
87 static bool DesignChanged;
88 static bool OrderResize;
89 static bool ExitMainLoop;
91 static size_t HeaderHeight;
92 static size_t FooterHeight;
93 static size_t FooterStartY;
95 protected:
96 virtual void Run() = 0;
98 static void Seek();
99 static void FindItem(const FindDirection);
100 static void ListsChangeFinisher();
102 private:
103 ActionType itsType;
104 const char *itsName;
107 struct Dummy : public Action
109 Dummy() : Action(aDummy, "dummy") { }
111 protected:
112 virtual void Run() { }
115 struct MouseEvent : public Action
117 MouseEvent() : Action(aMouseEvent, "mouse_event") { }
119 protected:
120 virtual bool canBeRun() const;
121 virtual void Run();
123 private:
124 MEVENT itsMouseEvent;
125 MEVENT itsOldMouseEvent;
128 struct ScrollUp : public Action
130 ScrollUp() : Action(aScrollUp, "scroll_up") { }
132 protected:
133 virtual void Run();
136 struct ScrollDown : public Action
138 ScrollDown() : Action(aScrollDown, "scroll_down") { }
140 protected:
141 virtual void Run();
144 struct ScrollUpArtist : public Action
146 ScrollUpArtist() : Action(aScrollUpArtist, "scroll_up_artist") { }
148 protected:
149 virtual bool canBeRun() const;
150 virtual void Run();
153 struct ScrollUpAlbum : public Action
155 ScrollUpAlbum() : Action(aScrollUpAlbum, "scroll_up_album") { }
157 protected:
158 virtual bool canBeRun() const;
159 virtual void Run();
162 struct ScrollDownArtist : public Action
164 ScrollDownArtist() : Action(aScrollDownArtist, "scroll_down_artist") { }
166 protected:
167 virtual bool canBeRun() const;
168 virtual void Run();
171 struct ScrollDownAlbum : public Action
173 ScrollDownAlbum() : Action(aScrollDownAlbum, "scroll_down_album") { }
175 protected:
176 virtual bool canBeRun() const;
177 virtual void Run();
180 struct PageUp : public Action
182 PageUp() : Action(aPageUp, "page_up") { }
184 protected:
185 virtual void Run();
188 struct PageDown : public Action
190 PageDown() : Action(aPageDown, "page_down") { }
192 protected:
193 virtual void Run();
196 struct MoveHome : public Action
198 MoveHome() : Action(aMoveHome, "move_home") { }
200 protected:
201 virtual void Run();
204 struct MoveEnd : public Action
206 MoveEnd() : Action(aMoveEnd, "move_end") { }
208 protected:
209 virtual void Run();
212 struct ToggleInterface : public Action
214 ToggleInterface() : Action(aToggleInterface, "toggle_inferface") { }
216 protected:
217 virtual void Run();
220 struct JumpToParentDir : public Action
222 JumpToParentDir() : Action(aJumpToParentDir, "jump_to_parent_dir") { }
224 protected:
225 virtual bool canBeRun() const;
226 virtual void Run();
229 struct PressEnter : public Action
231 PressEnter() : Action(aPressEnter, "press_enter") { }
233 protected:
234 virtual void Run();
237 struct PressSpace : public Action
239 PressSpace() : Action(aPressSpace, "press_space") { }
241 protected:
242 virtual void Run();
245 struct PreviousColumn : public Action
247 PreviousColumn() : Action(aPreviousColumn, "previous_column") { }
249 protected:
250 virtual bool canBeRun() const;
251 virtual void Run();
254 struct NextColumn : public Action
256 NextColumn() : Action(aNextColumn, "next_column") { }
258 protected:
259 virtual bool canBeRun() const;
260 virtual void Run();
263 struct MasterScreen : public Action
265 MasterScreen() : Action(aMasterScreen, "master_screen") { }
267 protected:
268 virtual bool canBeRun() const;
269 virtual void Run();
272 struct SlaveScreen : public Action
274 SlaveScreen() : Action(aSlaveScreen, "slave_screen") { }
276 protected:
277 virtual bool canBeRun() const;
278 virtual void Run();
281 struct VolumeUp : public Action
283 VolumeUp() : Action(aVolumeUp, "volume_up") { }
285 protected:
286 virtual void Run();
289 struct VolumeDown : public Action
291 VolumeDown() : Action(aVolumeDown, "volume_down") { }
293 protected:
294 virtual void Run();
297 struct Delete : public Action
299 Delete() : Action(aDelete, "delete") { }
301 protected:
302 virtual void Run();
305 struct ReplaySong : public Action
307 ReplaySong() : Action(aReplaySong, "replay_song") { }
309 protected:
310 virtual void Run();
313 struct PreviousSong : public Action
315 PreviousSong() : Action(aPreviousSong, "previous") { }
317 protected:
318 virtual void Run();
321 struct NextSong : public Action
323 NextSong() : Action(aNextSong, "next") { }
325 protected:
326 virtual void Run();
329 struct Pause : public Action
331 Pause() : Action(aPause, "pause") { }
333 protected:
334 virtual void Run();
337 struct Stop : public Action
339 Stop() : Action(aStop, "stop") { }
341 protected:
342 virtual void Run();
345 struct SavePlaylist : public Action
347 SavePlaylist() : Action(aSavePlaylist, "save_playlist") { }
349 protected:
350 virtual void Run();
353 struct MoveSortOrderUp : public Action
355 MoveSortOrderUp() : Action(aMoveSortOrderUp, "move_sort_order_up") { }
357 protected:
358 virtual bool canBeRun() const;
359 virtual void Run();
362 struct MoveSortOrderDown : public Action
364 MoveSortOrderDown() : Action(aMoveSortOrderDown, "move_sort_order_down") { }
366 protected:
367 virtual bool canBeRun() const;
368 virtual void Run();
371 struct MoveSelectedItemsUp : public Action
373 MoveSelectedItemsUp() : Action(aMoveSelectedItemsUp, "move_selected_items_up") { }
375 protected:
376 virtual bool canBeRun() const;
377 virtual void Run();
380 struct MoveSelectedItemsDown : public Action
382 MoveSelectedItemsDown() : Action(aMoveSelectedItemsDown, "move_selected_items_down") { }
384 protected:
385 virtual bool canBeRun() const;
386 virtual void Run();
389 struct MoveSelectedItemsTo : public Action
391 MoveSelectedItemsTo() : Action(aMoveSelectedItemsTo, "move_selected_items_to") { }
393 protected:
394 virtual bool canBeRun() const;
395 virtual void Run();
398 struct Add : public Action
400 Add() : Action(aAdd, "add") { }
402 protected:
403 virtual bool canBeRun() const;
404 virtual void Run();
407 struct SeekForward : public Action
409 SeekForward() : Action(aSeekForward, "seek_forward") { }
411 protected:
412 virtual bool canBeRun() const;
413 virtual void Run();
416 struct SeekBackward : public Action
418 SeekBackward() : Action(aSeekBackward, "seek_backward") { }
420 protected:
421 virtual bool canBeRun() const;
422 virtual void Run();
425 struct ToggleDisplayMode : public Action
427 ToggleDisplayMode() : Action(aToggleDisplayMode, "toggle_display_mode") { }
429 protected:
430 virtual bool canBeRun() const;
431 virtual void Run();
434 struct ToggleSeparatorsBetweenAlbums : public Action
436 ToggleSeparatorsBetweenAlbums()
437 : Action(aToggleSeparatorsBetweenAlbums, "toggle_separators_between_albums") { }
439 protected:
440 virtual bool canBeRun() const;
441 virtual void Run();
444 struct ToggleLyricsFetcher : public Action
446 ToggleLyricsFetcher() : Action(aToggleLyricsFetcher, "toggle_lyrics_fetcher") { }
448 protected:
449 # ifndef HAVE_CURL_CURL_H
450 virtual bool canBeRun() const;
451 # endif // NOT HAVE_CURL_CURL_H
452 virtual void Run();
455 struct ToggleFetchingLyricsInBackground : public Action
457 ToggleFetchingLyricsInBackground()
458 : Action(aToggleFetchingLyricsInBackground, "toggle_fetching_lyrics_in_background") { }
460 protected:
461 # ifndef HAVE_CURL_CURL_H
462 virtual bool canBeRun() const;
463 # endif // NOT HAVE_CURL_CURL_H
464 virtual void Run();
467 struct ToggleAutoCenter : public Action
469 ToggleAutoCenter() : Action(aToggleAutoCenter, "toggle_autocentering") { }
471 protected:
472 virtual void Run();
475 struct UpdateDatabase : public Action
477 UpdateDatabase() : Action(aUpdateDatabase, "update_database") { }
479 protected:
480 virtual void Run();
483 struct JumpToPlayingSong : public Action
485 JumpToPlayingSong() : Action(aJumpToPlayingSong, "jump_to_playing_song") { }
487 protected:
488 virtual bool canBeRun() const;
489 virtual void Run();
492 struct ToggleRepeat : public Action
494 ToggleRepeat() : Action(aToggleRepeat, "toggle_repeat") { }
496 protected:
497 virtual void Run();
500 struct Shuffle : public Action
502 Shuffle() : Action(aShuffle, "shuffle") { }
504 protected:
505 virtual void Run();
508 struct ToggleRandom : public Action
510 ToggleRandom() : Action(aToggleRandom, "toggle_random") { }
512 protected:
513 virtual void Run();
516 struct StartSearching : public Action
518 StartSearching() : Action(aStartSearching, "start_searching") { }
520 protected:
521 virtual bool canBeRun() const;
522 virtual void Run();
525 struct SaveTagChanges : public Action
527 SaveTagChanges() : Action(aSaveTagChanges, "save_tag_changes") { }
529 protected:
530 virtual bool canBeRun() const;
531 virtual void Run();
534 struct ToggleSingle : public Action
536 ToggleSingle() : Action(aToggleSingle, "toggle_single") { }
538 protected:
539 virtual void Run();
542 struct ToggleConsume : public Action
544 ToggleConsume() : Action(aToggleConsume, "toggle_consume") { }
546 protected:
547 virtual void Run();
550 struct ToggleCrossfade : public Action
552 ToggleCrossfade() : Action(aToggleCrossfade, "toggle_crossfade") { }
554 protected:
555 virtual void Run();
558 struct SetCrossfade : public Action
560 SetCrossfade() : Action(aSetCrossfade, "set_crossfade") { }
562 protected:
563 virtual void Run();
566 struct EditSong : public Action
568 EditSong() : Action(aEditSong, "edit_song") { }
570 protected:
571 virtual bool canBeRun() const;
572 virtual void Run();
575 struct EditLibraryTag : public Action
577 EditLibraryTag() : Action(aEditLibraryTag, "edit_library_tag") { }
579 protected:
580 virtual bool canBeRun() const;
581 virtual void Run();
584 struct EditLibraryAlbum : public Action
586 EditLibraryAlbum() : Action(aEditLibraryAlbum, "edit_library_album") { }
588 protected:
589 virtual bool canBeRun() const;
590 virtual void Run();
593 struct EditDirectoryName : public Action
595 EditDirectoryName() : Action(aEditDirectoryName, "edit_directory_name") { }
597 protected:
598 virtual bool canBeRun() const;
599 virtual void Run();
602 struct EditPlaylistName : public Action
604 EditPlaylistName() : Action(aEditPlaylistName, "edit_playlist_name") { }
606 protected:
607 virtual bool canBeRun() const;
608 virtual void Run();
611 struct EditLyrics : public Action
613 EditLyrics() : Action(aEditLyrics, "edit_lyrics") { }
615 protected:
616 virtual bool canBeRun() const;
617 virtual void Run();
620 struct JumpToBrowser : public Action
622 JumpToBrowser() : Action(aJumpToBrowser, "jump_to_browser") { }
624 protected:
625 virtual bool canBeRun() const;
626 virtual void Run();
629 struct JumpToMediaLibrary : public Action
631 JumpToMediaLibrary() : Action(aJumpToMediaLibrary, "jump_to_media_library") { }
633 protected:
634 virtual bool canBeRun() const;
635 virtual void Run();
638 struct JumpToPlaylistEditor : public Action
640 JumpToPlaylistEditor() : Action(aJumpToPlaylistEditor, "jump_to_playlist_editor") { }
642 protected:
643 virtual bool canBeRun() const;
644 virtual void Run();
647 struct ToggleScreenLock : public Action
649 ToggleScreenLock() : Action(aToggleScreenLock, "toggle_screen_lock") { }
651 protected:
652 virtual void Run();
655 struct JumpToTagEditor : public Action
657 JumpToTagEditor() : Action(aJumpToTagEditor, "jump_to_tag_editor") { }
659 protected:
660 virtual bool canBeRun() const;
661 virtual void Run();
664 struct JumpToPositionInSong : public Action
666 JumpToPositionInSong() : Action(aJumpToPositionInSong, "jump_to_position_in_song") { }
668 protected:
669 virtual bool canBeRun() const;
670 virtual void Run();
673 struct ReverseSelection : public Action
675 ReverseSelection() : Action(aReverseSelection, "reverse_selection") { }
677 protected:
678 virtual bool canBeRun() const;
679 virtual void Run();
682 struct RemoveSelection : public Action
684 RemoveSelection() : Action(aRemoveSelection, "remove_selection") { }
686 protected:
687 virtual bool canBeRun() const;
688 virtual void Run();
691 struct SelectAlbum : public Action
693 SelectAlbum() : Action(aSelectAlbum, "select_album") { }
695 protected:
696 virtual bool canBeRun() const;
697 virtual void Run();
700 struct AddSelectedItems : public Action
702 AddSelectedItems() : Action(aAddSelectedItems, "add_selected_items") { }
704 protected:
705 virtual void Run();
708 struct CropMainPlaylist : public Action
710 CropMainPlaylist() : Action(aCropMainPlaylist, "crop_main_playlist") { }
712 protected:
713 virtual void Run();
716 struct CropPlaylist : public Action
718 CropPlaylist() : Action(aCropPlaylist, "crop_playlist") { }
720 protected:
721 virtual bool canBeRun() const;
722 virtual void Run();
725 struct ClearMainPlaylist : public Action
727 ClearMainPlaylist() : Action(aClearMainPlaylist, "clear_main_playlist") { }
729 protected:
730 virtual void Run();
733 struct ClearPlaylist : public Action
735 ClearPlaylist() : Action(aClearPlaylist, "clear_playlist") { }
737 protected:
738 virtual bool canBeRun() const;
739 virtual void Run();
742 struct SortPlaylist : public Action
744 SortPlaylist() : Action(aSortPlaylist, "sort_playlist") { }
746 protected:
747 virtual bool canBeRun() const;
748 virtual void Run();
751 struct ReversePlaylist : public Action
753 ReversePlaylist() : Action(aReversePlaylist, "reverse_playlist") { }
755 protected:
756 virtual bool canBeRun() const;
757 virtual void Run();
760 struct ApplyFilter : public Action
762 ApplyFilter() : Action(aApplyFilter, "apply_filter") { }
764 protected:
765 virtual bool canBeRun() const;
766 virtual void Run();
769 struct Find : public Action
771 Find() : Action(aFind, "find") { }
773 protected:
774 virtual bool canBeRun() const;
775 virtual void Run();
778 struct FindItemForward : public Action
780 FindItemForward() : Action(aFindItemForward, "find_item_forward") { }
782 protected:
783 virtual bool canBeRun() const;
784 virtual void Run();
787 struct FindItemBackward : public Action
789 FindItemBackward() : Action(aFindItemBackward, "find_item_backward") { }
791 protected:
792 virtual bool canBeRun() const;
793 virtual void Run();
796 struct NextFoundItem : public Action
798 NextFoundItem() : Action(aNextFoundItem, "next_found_item") { }
800 protected:
801 virtual bool canBeRun() const;
802 virtual void Run();
805 struct PreviousFoundItem : public Action
807 PreviousFoundItem() : Action(aPreviousFoundItem, "previous_found_item") { }
809 protected:
810 virtual bool canBeRun() const;
811 virtual void Run();
814 struct ToggleFindMode : public Action
816 ToggleFindMode() : Action(aToggleFindMode, "toggle_find_mode") { }
818 protected:
819 virtual void Run();
822 struct ToggleReplayGainMode : public Action
824 ToggleReplayGainMode() : Action(aToggleReplayGainMode, "toggle_replay_gain_mode") { }
826 protected:
827 virtual bool canBeRun() const;
828 virtual void Run();
831 struct ToggleSpaceMode : public Action
833 ToggleSpaceMode() : Action(aToggleSpaceMode, "toggle_space_mode") { }
835 protected:
836 virtual void Run();
839 struct ToggleAddMode : public Action
841 ToggleAddMode() : Action(aToggleAddMode, "toggle_add_mode") { }
843 protected:
844 virtual void Run();
847 struct ToggleMouse : public Action
849 ToggleMouse() : Action(aToggleMouse, "toggle_mouse") { }
851 protected:
852 virtual void Run();
855 struct ToggleBitrateVisibility : public Action
857 ToggleBitrateVisibility() : Action(aToggleBitrateVisibility, "toggle_bitrate_visibility") { }
859 protected:
860 virtual void Run();
863 struct AddRandomItems : public Action
865 AddRandomItems() : Action(aAddRandomItems, "add_random_items") { }
867 protected:
868 virtual void Run();
871 struct ToggleBrowserSortMode : public Action
873 ToggleBrowserSortMode() : Action(aToggleBrowserSortMode, "toggle_browser_sort_mode") { }
875 protected:
876 virtual bool canBeRun() const;
877 virtual void Run();
880 struct ToggleLibraryTagType : public Action
882 ToggleLibraryTagType() : Action(aToggleLibraryTagType, "toggle_library_tag_type") { }
884 protected:
885 virtual bool canBeRun() const;
886 virtual void Run();
889 struct RefetchLyrics : public Action
891 RefetchLyrics() : Action(aRefetchLyrics, "refetch_lyrics") { }
893 protected:
894 virtual bool canBeRun() const;
895 virtual void Run();
898 struct RefetchArtistInfo : public Action
900 RefetchArtistInfo() : Action(aRefetchArtistInfo, "refetch_artist_info") { }
902 protected:
903 virtual bool canBeRun() const;
904 virtual void Run();
907 struct SetSelectedItemsPriority : public Action
909 SetSelectedItemsPriority()
910 : Action(aSetSelectedItemsPriority, "set_selected_items_priority") { }
912 protected:
913 virtual bool canBeRun() const;
914 virtual void Run();
917 struct ShowSongInfo : public Action
919 ShowSongInfo() : Action(aShowSongInfo, "show_song_info") { }
921 protected:
922 virtual void Run();
925 struct ShowArtistInfo : public Action
927 ShowArtistInfo() : Action(aShowArtistInfo, "show_artist_info") { }
929 protected:
930 virtual bool canBeRun() const;
931 virtual void Run();
934 struct ShowLyrics : public Action
936 ShowLyrics() : Action(aShowLyrics, "show_lyrics") { }
938 protected:
939 virtual void Run();
942 struct Quit : public Action
944 Quit() : Action(aQuit, "quit") { }
946 protected:
947 virtual void Run();
950 struct NextScreen : public Action
952 NextScreen() : Action(aNextScreen, "next_screen") { }
954 protected:
955 virtual void Run();
958 struct PreviousScreen : public Action
960 PreviousScreen() : Action(aPreviousScreen, "previous_screen") { }
962 protected:
963 virtual void Run();
966 struct ShowHelp : public Action
968 ShowHelp() : Action(aShowHelp, "show_help") { }
970 protected:
971 # ifdef HAVE_TAGLIB_H
972 virtual bool canBeRun() const;
973 # endif // HAVE_TAGLIB_H
974 virtual void Run();
977 struct ShowPlaylist : public Action
979 ShowPlaylist() : Action(aShowPlaylist, "show_playlist") { }
981 protected:
982 # ifdef HAVE_TAGLIB_H
983 virtual bool canBeRun() const;
984 # endif // HAVE_TAGLIB_H
985 virtual void Run();
988 struct ShowBrowser : public Action
990 ShowBrowser() : Action(aShowBrowser, "show_browser") { }
992 protected:
993 # ifdef HAVE_TAGLIB_H
994 virtual bool canBeRun() const;
995 # endif // HAVE_TAGLIB_H
996 virtual void Run();
999 struct ShowSearchEngine : public Action
1001 ShowSearchEngine() : Action(aShowSearchEngine, "show_search_engine") { }
1003 protected:
1004 # ifdef HAVE_TAGLIB_H
1005 virtual bool canBeRun() const;
1006 # endif // HAVE_TAGLIB_H
1007 virtual void Run();
1010 struct ShowMediaLibrary : public Action
1012 ShowMediaLibrary() : Action(aShowMediaLibrary, "show_media_library") { }
1014 protected:
1015 # ifdef HAVE_TAGLIB_H
1016 virtual bool canBeRun() const;
1017 # endif // HAVE_TAGLIB_H
1018 virtual void Run();
1021 struct ShowPlaylistEditor : public Action
1023 ShowPlaylistEditor() : Action(aShowPlaylistEditor, "show_playlist_editor") { }
1025 protected:
1026 # ifdef HAVE_TAGLIB_H
1027 virtual bool canBeRun() const;
1028 # endif // HAVE_TAGLIB_H
1029 virtual void Run();
1032 struct ShowTagEditor : public Action
1034 ShowTagEditor() : Action(aShowTagEditor, "show_tag_editor") { }
1036 protected:
1037 virtual bool canBeRun() const;
1038 virtual void Run();
1041 struct ShowOutputs : public Action
1043 ShowOutputs() : Action(aShowOutputs, "show_outputs") { }
1045 protected:
1046 virtual bool canBeRun() const;
1047 virtual void Run();
1050 struct ShowVisualizer : public Action
1052 ShowVisualizer() : Action(aShowVisualizer, "show_visualizer") { }
1054 protected:
1055 virtual bool canBeRun() const;
1056 virtual void Run();
1059 struct ShowClock : public Action
1061 ShowClock() : Action(aShowClock, "show_clock") { }
1063 protected:
1064 virtual bool canBeRun() const;
1065 virtual void Run();
1068 struct ShowServerInfo : public Action
1070 ShowServerInfo() : Action(aShowServerInfo, "show_server_info") { }
1072 protected:
1073 # ifdef HAVE_TAGLIB_H
1074 virtual bool canBeRun() const;
1075 # endif // HAVE_TAGLIB_H
1076 virtual void Run();
1079 #endif // _ACTIONS_H