2014-09-10 14:49:33 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: include/wx/msw/taskbarbutton.h
|
|
|
|
// Purpose: Defines wxTaskBarButtonImpl class.
|
|
|
|
// Author: Chaobin Zhang <zhchbin@gmail.com>
|
|
|
|
// Created: 2014-06-01
|
|
|
|
// Copyright: (c) 2014 wxWidgets development team
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_MSW_TASKBARBUTTON_H_
|
|
|
|
#define _WX_MSW_TASKBARBUTTON_H_
|
|
|
|
|
2014-09-10 14:57:20 +00:00
|
|
|
#include "wx/defs.h"
|
|
|
|
|
2014-09-10 14:49:33 +00:00
|
|
|
#if wxUSE_TASKBARBUTTON
|
|
|
|
|
2014-09-10 14:50:08 +00:00
|
|
|
#include "wx/vector.h"
|
2014-09-10 14:54:20 +00:00
|
|
|
#include "wx/taskbarbutton.h"
|
2014-09-10 14:49:33 +00:00
|
|
|
|
2014-09-10 14:57:30 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxITaskbarList3;
|
2014-09-10 14:49:33 +00:00
|
|
|
|
2014-09-10 14:57:06 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxTaskBarButtonImpl : public wxTaskBarButton
|
|
|
|
{
|
2014-09-10 14:49:33 +00:00
|
|
|
public:
|
|
|
|
virtual ~wxTaskBarButtonImpl();
|
|
|
|
|
2014-09-10 14:51:09 +00:00
|
|
|
virtual void SetProgressRange(int range) wxOVERRIDE;
|
2014-09-10 14:49:33 +00:00
|
|
|
virtual void SetProgressValue(int value) wxOVERRIDE;
|
2014-09-10 14:51:09 +00:00
|
|
|
virtual void PulseProgress() wxOVERRIDE;
|
2014-09-10 14:50:58 +00:00
|
|
|
virtual void Show(bool show = true) wxOVERRIDE;
|
2014-09-10 14:49:55 +00:00
|
|
|
virtual void Hide() wxOVERRIDE;
|
|
|
|
virtual void SetThumbnailTooltip(const wxString& tooltip) wxOVERRIDE;
|
|
|
|
virtual void SetProgressState(wxTaskBarButtonState state) wxOVERRIDE;
|
2014-09-10 14:50:38 +00:00
|
|
|
virtual void SetOverlayIcon(const wxIcon& icon,
|
|
|
|
const wxString& description = wxString()) wxOVERRIDE;
|
2014-09-10 14:49:55 +00:00
|
|
|
virtual void SetThumbnailClip(const wxRect& rect) wxOVERRIDE;
|
2014-09-10 14:51:18 +00:00
|
|
|
virtual void SetThumbnailContents(const wxWindow *child) wxOVERRIDE;
|
2014-09-10 14:51:29 +00:00
|
|
|
virtual bool InsertThumbBarButton(size_t pos,
|
|
|
|
wxThumbBarButton *button) wxOVERRIDE;
|
|
|
|
virtual bool AppendThumbBarButton(wxThumbBarButton *button) wxOVERRIDE;
|
2014-09-10 14:52:55 +00:00
|
|
|
virtual bool AppendSeparatorInThumbBar() wxOVERRIDE;
|
2014-09-10 14:52:11 +00:00
|
|
|
virtual wxThumbBarButton* RemoveThumbBarButton(
|
|
|
|
wxThumbBarButton *button) wxOVERRIDE;
|
|
|
|
virtual wxThumbBarButton* RemoveThumbBarButton(int id) wxOVERRIDE;
|
2014-09-10 14:49:33 +00:00
|
|
|
|
|
|
|
private:
|
2014-09-10 14:50:20 +00:00
|
|
|
friend class wxFrame;
|
2014-09-10 14:52:33 +00:00
|
|
|
friend class wxThumbBarButton;
|
2014-09-10 14:53:17 +00:00
|
|
|
friend class wxAppProgressIndicator;
|
2014-09-10 14:52:33 +00:00
|
|
|
|
2014-09-10 14:49:33 +00:00
|
|
|
wxTaskBarButtonImpl(WXWidget parent);
|
|
|
|
|
2014-09-10 14:51:29 +00:00
|
|
|
bool InitOrUpdateThumbBarButtons();
|
2014-09-10 14:52:23 +00:00
|
|
|
wxThumbBarButton* GetThumbBarButtonByIndex(size_t index);
|
2014-09-10 14:51:29 +00:00
|
|
|
|
2014-09-10 14:49:33 +00:00
|
|
|
WXWidget m_hwnd;
|
2014-09-10 14:57:30 +00:00
|
|
|
wxITaskbarList3 *m_taskbarList;
|
2014-09-10 14:50:08 +00:00
|
|
|
|
|
|
|
typedef wxVector<wxThumbBarButton*> wxThumbBarButtons;
|
|
|
|
wxThumbBarButtons m_thumbBarButtons;
|
|
|
|
|
2014-09-10 14:51:09 +00:00
|
|
|
int m_progressRange;
|
2014-09-10 14:51:29 +00:00
|
|
|
bool m_hasInitThumbnailToolbar;
|
2014-09-10 14:57:20 +00:00
|
|
|
|
|
|
|
wxDECLARE_NO_COPY_CLASS(wxTaskBarButtonImpl);
|
2014-09-10 14:49:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // wxUSE_TASKBARBUTTON
|
|
|
|
|
|
|
|
#endif // _WX_MSW_TASKBARBUTTON_H_
|