class WXDLLIMPEXP_ADV wxTaskBarIcon: public wxTaskBarIconBase
{
public:
- wxTaskBarIcon();
+ wxTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE);
~wxTaskBarIcon();
virtual bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxString());
virtual bool RemoveIcon();
class WXDLLIMPEXP_ADV wxTaskBarIcon : public wxTaskBarIconBase
{
public:
- wxTaskBarIcon();
+ wxTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE);
virtual ~wxTaskBarIcon();
// Accessors
{
DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon)
public:
- // type of taskbar item to create (currently only DOCK is implemented)
- enum wxTaskBarIconType
- {
- DOCK
-#if wxOSX_USE_COCOA
- , CUSTOM_STATUSITEM
-#endif
-#if wxOSX_USE_COCOA
- , DEFAULT_TYPE = CUSTOM_STATUSITEM
-#else
- , DEFAULT_TYPE = DOCK
-#endif
- };
-
- wxTaskBarIcon(wxTaskBarIconType iconType = DEFAULT_TYPE);
+ wxTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE);
virtual ~wxTaskBarIcon();
// returns true if the taskbaricon is in the global menubar
class WXDLLIMPEXP_FWD_ADV wxTaskBarIconEvent;
+// ----------------------------------------------------------------------------
+
+// type of taskbar item to create. Only applicable in wxOSX_COCOA
+enum wxTaskBarIconType
+{
+ wxTBI_DOCK,
+ wxTBI_CUSTOM_STATUSITEM,
+#if wxOSX_USE_COCOA
+ wxTBI_DEFAULT_TYPE = wxTBI_CUSTOM_STATUSITEM
+#else
+ wxTBI_DEFAULT_TYPE = wxTBI_DOCK
+#endif
+};
+
+
// ----------------------------------------------------------------------------
// wxTaskBarIconBase: define wxTaskBarIcon interface
// ----------------------------------------------------------------------------
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+/**
+ On OSX Cocoa the taskbar icon can be in the doc or in the status area.
+ This enumeration can be used to select which will be instantiated.
+*/
+enum wxTaskBarIconType
+{
+ wxTBI_DOCK,
+ wxTBI_CUSTOM_STATUSITEM,
+ wxTBI_DEFAULT_TYPE
+};
+
+
/**
@class wxTaskBarIconEvent
wxTaskBarIconEvent(wxEventType evtType, wxTaskBarIcon *tbIcon);
};
+
/**
@class wxTaskBarIcon
{
public:
/**
- Default constructor.
+ Default constructor. The iconType is only applicable on wxOSX_Cocoa.
*/
- wxTaskBarIcon();
+ wxTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE);
/**
Destroys the wxTaskBarIcon object, removing the icon if not already removed.
IMPLEMENT_DYNAMIC_CLASS(wxTaskBarIcon, wxEvtHandler)
-wxTaskBarIcon::wxTaskBarIcon()
+wxTaskBarIcon::wxTaskBarIcon(wxTaskBarIconType WXUNUSED(iconType))
{
m_priv = new Private(this);
}
// wxTaskBarIcon
// ----------------------------------------------------------------------------
-wxTaskBarIcon::wxTaskBarIcon()
+wxTaskBarIcon::wxTaskBarIcon(wxTaskBarIconType WXUNUSED(iconType))
{
m_win = NULL;
m_iconAdded = false;
wxTaskBarIcon::wxTaskBarIcon(wxTaskBarIconType WXUNUSED_UNLESS_DEBUG(nType))
{
wxASSERT_MSG(
- nType == DOCK,
- wxT("Only the DOCK implementation of wxTaskBarIcon on Mac-Carbon is currently supported!") );
+ nType == wxTBI_DOCK,
+ wxT("Only the wxTBI_DOCK implementation of wxTaskBarIcon on Mac-Carbon is currently supported!") );
m_impl = new wxDockTaskBarIcon(this);
}
wxTaskBarIcon::wxTaskBarIcon(wxTaskBarIconType iconType)
{
- if(iconType == DOCK)
+ if(iconType == wxTBI_DOCK)
m_impl = new wxTaskBarIconDockImpl(this);
- else if(iconType == CUSTOM_STATUSITEM)
+ else if(iconType == wxTBI_CUSTOM_STATUSITEM)
m_impl = new wxTaskBarIconCustomStatusItemImpl(this);
else
{ m_impl = NULL;