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:52:23 +00:00
|
|
|
wxThumbBarButton* GetThumbBarButtonByIndex(size_t index);
|
2014-09-10 14:57:38 +00:00
|
|
|
bool InitOrUpdateThumbBarButtons();
|
2014-10-19 12:56:47 +00:00
|
|
|
virtual void Realize() wxOVERRIDE;
|
2014-09-10 14:51:29 +00:00
|
|
|
|
2014-09-10 14:57:38 +00:00
|
|
|
private:
|
2014-09-14 23:58:22 +00:00
|
|
|
// This ctor is only used by wxTaskBarButton::New()
|
|
|
|
wxTaskBarButtonImpl(wxITaskbarList3* taskbarList, wxWindow* parent);
|
|
|
|
|
2014-10-19 12:56:47 +00:00
|
|
|
wxWindow* m_parent;
|
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-10-19 12:56:47 +00:00
|
|
|
int m_progressValue;
|
|
|
|
wxTaskBarButtonState m_progressState;
|
|
|
|
wxString m_thumbnailTooltip;
|
|
|
|
wxIcon m_overlayIcon;
|
|
|
|
wxString m_overlayIconDescription;
|
|
|
|
wxRect m_thumbnailClipRect;
|
2014-09-10 14:51:29 +00:00
|
|
|
bool m_hasInitThumbnailToolbar;
|
2014-09-10 14:57:20 +00:00
|
|
|
|
2014-09-14 23:58:22 +00:00
|
|
|
friend wxTaskBarButton* wxTaskBarButton::New(wxWindow*);
|
|
|
|
|
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_
|