Move implementation of jump list to class wxJumpListImpl.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2014-09-10 14:54:30 +00:00
parent 6795b5c1af
commit de7b819cdc
3 changed files with 175 additions and 53 deletions

View File

@@ -17,7 +17,10 @@
#include "wx/taskbarbutton.h"
namespace {
class ITaskbarList3;
class WXDLLIMPEXP_FWD_CORE ITaskbarList3;
class WXDLLIMPEXP_FWD_CORE IObjectArray;
class WXDLLIMPEXP_FWD_CORE ICustomDestinationList;
class WXDLLIMPEXP_FWD_CORE IApplicationDocumentLists;
}
class WXDLLIMPEXP_CORE wxTaskBarButtonImpl : public wxTaskBarButton {
@@ -63,6 +66,44 @@ private:
bool m_hasInitThumbnailToolbar;
};
class WXDLLIMPEXP_CORE wxJumpListImpl
{
public:
wxJumpListImpl();
virtual ~wxJumpListImpl();
void ShowRecentCategory(bool shown = true);
void HideRecentCategory();
void ShowFrequentCategory(bool shown = true);
void HideFrequentCategory();
wxJumpListCategory* GetTasks();
const wxJumpListCategory* GetFrequentCategory();
const wxJumpListCategory* GetRecentCategory();
const wxJumpListCategories& GetCustomCategories();
void AddCategory(wxJumpListCategory* category);
wxJumpListCategory* RemoveCategory(const wxString& title);
void DeleteCategory(const wxString& title);
void Update();
private:
bool BeginUpdate();
bool CommitUpdate();
void AddTasksToDestinationList();
void AddCustomCategoriesToDestionationList();
void LoadKnownCategory(const wxString& title);
ICustomDestinationList *m_destinationList;
IObjectArray *m_objectArray;
wxScopedPtr<wxJumpListCategory> m_tasks;
wxScopedPtr<wxJumpListCategory> m_frequent;
wxScopedPtr<wxJumpListCategory> m_recent;
wxJumpListCategories m_customCategories;
bool m_recent_visible;
bool m_frequent_visible;
};
#endif // wxUSE_TASKBARBUTTON
#endif // _WX_MSW_TASKBARBUTTON_H_