Redeclare the interfaces and support setting tasks of jump list roughly.

- Interfaces including: ITaskbarList3, IShellLink, ICustomDestinationList.
- New API for setting tasks of jump list: wxJumpList::SetTasks.

Author: Chaobin Zhang

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2014-09-10 14:53:05 +00:00
parent dd06fa3aa8
commit 615773842c
4 changed files with 451 additions and 5 deletions

View File

@@ -20,6 +20,12 @@
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_CORE wxTaskBarButton;
struct WXDLLIMPEXP_FWD_CORE IObjectArray;
namespace {
class WXDLLIMPEXP_FWD_CORE ICustomDestinationList;
}
/**
State of the task bar button.
@@ -124,6 +130,56 @@ private:
wxDECLARE_NO_COPY_CLASS(wxTaskBarButton);
};
class WXDLLIMPEXP_CORE wxJumpListItem
{
public:
wxJumpListItem(const wxString& title = wxEmptyString,
const wxString& filePath = wxEmptyString,
const wxString& arguments = wxEmptyString,
const wxString& tooltip = wxEmptyString,
const wxString& iconPath = wxEmptyString,
int iconIndex = 0);
const wxString& GetTitle() const;
void SetTitle(const wxString& title);
const wxString& GetFilePath() const;
void SetFilePath(const wxString& filePath);
const wxString& GetArguments() const;
void SetArguments(const wxString& arguments);
const wxString& GetTooltip() const;
void SetTooltip(const wxString& tooltip);
const wxString& GetIconPath() const;
void SetIconPath(const wxString& iconPath);
int GetIconIndex() const;
void SetIconIndex(int iconIndex);
private:
wxString m_title;
wxString m_filePath;
wxString m_arguments;
wxString m_tooltip;
wxString m_iconPath;
int m_iconIndex;
};
typedef wxVector<wxJumpListItem> wxJumpListItems;
class WXDLLIMPEXP_CORE wxJumpList
{
public:
wxJumpList();
virtual ~wxJumpList();
void SetTasks(const wxJumpListItems& tasks);
private:
bool BeginUpdate();
bool CommitUpdate();
void AddTasksToDestinationList();
ICustomDestinationList *m_destinationList;
IObjectArray *m_objectArray;
wxJumpListItems m_tasks;
};
#if defined(__WXMSW__)
#include "wx/msw/taskbarbutton.h"