Use factory function for wxTaskBarButton creation.
This allows to encapsulate checking for errors, which should be handled when using this class as task bar buttons API is not available under Windows XP. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -106,7 +106,10 @@ private:
|
||||
class WXDLLIMPEXP_CORE wxTaskBarButton
|
||||
{
|
||||
public:
|
||||
wxTaskBarButton() { }
|
||||
// Factory function, may return NULL if task bar buttons are not supported
|
||||
// by the current system.
|
||||
static wxTaskBarButton* New(wxWindow* parent);
|
||||
|
||||
virtual ~wxTaskBarButton() { }
|
||||
|
||||
// Operations:
|
||||
@@ -127,6 +130,9 @@ public:
|
||||
virtual wxThumbBarButton* RemoveThumbBarButton(wxThumbBarButton *button) = 0;
|
||||
virtual wxThumbBarButton* RemoveThumbBarButton(int id) = 0;
|
||||
|
||||
protected:
|
||||
wxTaskBarButton() { }
|
||||
|
||||
private:
|
||||
wxDECLARE_NO_COPY_CLASS(wxTaskBarButton);
|
||||
};
|
||||
|
Reference in New Issue
Block a user