xbmc
GUIWindowMusicNav.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "GUIWindowMusicBase.h"
12 #include "utils/Stopwatch.h"
13 
14 class CFileItemList;
15 
17 {
18 public:
19 
20  CGUIWindowMusicNav(void);
21  ~CGUIWindowMusicNav(void) override;
22 
23  bool OnMessage(CGUIMessage& message) override;
24  bool OnAction(const CAction& action) override;
25  void FrameMove() override;
26 
27 protected:
28  void OnItemLoaded(CFileItem* pItem) override {};
29  // override base class methods
30  bool Update(const std::string &strDirectory, bool updateFilterPath = true) override;
31  bool GetDirectory(const std::string &strDirectory, CFileItemList &items) override;
32  void UpdateButtons() override;
33  void PlayItem(int iItem) override;
34  void OnWindowLoaded() override;
35  void GetContextButtons(int itemNumber, CContextButtons &buttons) override;
36  bool OnContextButton(int itemNumber, CONTEXT_BUTTON button) override;
37  bool OnClick(int iItem, const std::string &player = "") override;
38  std::string GetStartFolder(const std::string &url) override;
39 
40  bool GetSongsFromPlayList(const std::string& strPlayList, CFileItemList &items);
41  bool ManageInfoProvider(const CFileItemPtr& item);
42 
43  VECSOURCES m_shares;
44 
45  // searching
46  void OnSearchUpdate();
47  void AddSearchFolder();
50 };
Definition: Stopwatch.h:14
Definition: GUIWindowMusicNav.h:16
void FrameMove() override
Main update function, called every frame prior to rendering Any window that requires updating on a fr...
Definition: GUIWindowMusicNav.cpp:859
Represents a list of files.
Definition: FileItem.h:713
void GetContextButtons(int itemNumber, CContextButtons &buttons) override
Will be called when an popup context menu has been asked for.
Definition: GUIWindowMusicNav.cpp:538
The base class for music windows.
Definition: GUIWindowMusicBase.h:37
void UpdateButtons() override
Overwrite to update your gui buttons (visible, enable,...)
Definition: GUIWindowMusicNav.cpp:460
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
std::string GetStartFolder(const std::string &url) override
Translate the folder to start in from the given quick path.
Definition: GUIWindowMusicNav.cpp:911
bool Update(const std::string &strDirectory, bool updateFilterPath=true) override
Retrieves the items from the given path and updates the list.
Definition: GUIWindowMusicNav.cpp:361
bool m_searchWithEdit
Whether the skin supports the new edit control searching.
Definition: GUIWindowMusicNav.h:49
Definition: GUIMessage.h:365
bool OnMessage(CGUIMessage &message) override
Handle messages on window.
Definition: GUIWindowMusicNav.cpp:79
CStopWatch m_searchTimer
Timer to delay a search while more characters are entered.
Definition: GUIWindowMusicNav.h:48
Definition: GUIDialogContextMenu.h:95
bool OnClick(int iItem, const std::string &player="") override
On click.
Definition: GUIWindowMusicNav.cpp:332
bool GetDirectory(const std::string &strDirectory, CFileItemList &items) override
Overwrite to fill fileitems from a source.
Definition: GUIWindowMusicNav.cpp:375
Represents a file on a share.
Definition: FileItem.h:102