2004-03-23 12:35:05 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
// File: wx/mac/taskbarosx.h
|
|
|
|
// Purpose: Defines wxTaskBarIcon class for OSX
|
|
|
|
// Author: Ryan Norton
|
|
|
|
// Modified by:
|
|
|
|
// Created: 04/04/2003
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Ryan Norton, 2003
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2004-03-23 12:35:05 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _TASKBAR_H_
|
|
|
|
#define _TASKBAR_H_
|
|
|
|
|
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
|
|
|
#pragma interface "taskbarosx.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxIcon;
|
|
|
|
class WXDLLEXPORT wxMenu;
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxTaskBarIcon : public wxTaskBarIconBase
|
|
|
|
{
|
|
|
|
public:
|
2004-09-25 19:05:13 -04:00
|
|
|
//type of taskbar item to create
|
2004-09-25 09:36:07 -04:00
|
|
|
//TODO: currently only DOCK is implemented
|
2004-09-25 19:05:13 -04:00
|
|
|
enum wxTaskBarIconType
|
|
|
|
{
|
|
|
|
DOCK,
|
|
|
|
STATUSITEM,
|
|
|
|
MENUEXTRA
|
|
|
|
};
|
|
|
|
|
2004-03-23 12:35:05 -05:00
|
|
|
wxTaskBarIcon(const wxTaskBarIconType& nType = DOCK);
|
|
|
|
virtual ~wxTaskBarIcon();
|
|
|
|
|
2004-09-25 19:05:13 -04:00
|
|
|
inline bool IsOk() const { return true; }
|
|
|
|
inline bool IsIconInstalled() const { return m_iconAdded; }
|
|
|
|
|
2004-09-25 09:36:07 -04:00
|
|
|
//TODO: not tested extensively
|
2004-03-23 12:35:05 -05:00
|
|
|
bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString);
|
|
|
|
bool RemoveIcon();
|
2004-09-25 09:36:07 -04:00
|
|
|
//TODO: end not tested extensively
|
|
|
|
|
|
|
|
//pops up the menu
|
2004-03-23 12:35:05 -05:00
|
|
|
bool PopupMenu(wxMenu *menu);
|
|
|
|
|
2004-09-26 06:42:02 -04:00
|
|
|
//internal functions - don't call
|
2004-09-25 09:36:07 -04:00
|
|
|
wxMenu* GetCurrentMenu();
|
2004-09-26 06:42:02 -04:00
|
|
|
wxMenu* DoCreatePopupMenu();
|
2004-09-25 09:36:07 -04:00
|
|
|
|
2004-03-23 12:35:05 -05:00
|
|
|
protected:
|
2004-09-25 19:05:13 -04:00
|
|
|
wxTaskBarIconType m_nType;
|
2004-09-26 04:27:15 -04:00
|
|
|
void* m_pEventHandlerRef;
|
2004-09-25 09:36:07 -04:00
|
|
|
wxMenu* m_pMenu;
|
2004-09-30 09:51:00 -04:00
|
|
|
WXHMENU m_theLastMenu;
|
2004-09-25 19:05:13 -04:00
|
|
|
bool m_iconAdded;
|
2004-09-30 09:51:00 -04:00
|
|
|
|
2004-03-23 12:35:05 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxTaskBarIcon)
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
// _TASKBAR_H_
|