taskbar.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /////////////////////////////////////////////////////////////////////////
  2. // File: wx/cocoa/taskbar.h
  3. // Purpose: Defines wxTaskBarIcon class
  4. // Author: David Elliott
  5. // Modified by:
  6. // Created: 2004/01/24
  7. // Copyright: (c) 2004 David Elliott
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_COCOA_TASKBAR_H__
  11. #define _WX_COCOA_TASKBAR_H__
  12. #include "wx/icon.h"
  13. class WXDLLIMPEXP_FWD_CORE wxIcon;
  14. class WXDLLIMPEXP_FWD_CORE wxMenu;
  15. class wxTaskBarIconCocoaImpl;
  16. class WXDLLIMPEXP_ADV wxTaskBarIcon : public wxTaskBarIconBase
  17. {
  18. friend class wxTaskBarIconCocoaImpl;
  19. DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon)
  20. public:
  21. //type of taskbar item to create (currently only DOCK is implemented)
  22. enum wxTaskBarIconType
  23. { DOCK
  24. , CUSTOM_STATUSITEM
  25. // , STATUSITEM // TODO: Implement using NSStatusItem w/o custom NSView
  26. // , MENUEXTRA // Menu extras require undocumented hacks
  27. , DEFAULT_TYPE = CUSTOM_STATUSITEM
  28. };
  29. // Only one wxTaskBarIcon can be of the Dock type so by default
  30. // create NSStatusItem for maximum source compatibility.
  31. wxTaskBarIcon(wxTaskBarIconType iconType = DEFAULT_TYPE);
  32. virtual ~wxTaskBarIcon();
  33. bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString);
  34. bool RemoveIcon();
  35. bool PopupMenu(wxMenu *menu); //, int x, int y);
  36. protected:
  37. wxTaskBarIconCocoaImpl *m_impl;
  38. };
  39. #endif // _WX_COCOA_TASKBAR_H__