tbtest.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: tbtest.h
  3. // Purpose: wxTaskBarIcon sample
  4. // Author: Julian Smart
  5. // Modified by:
  6. // Created: 01/02/97
  7. // Copyright: (c)
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. class MyTaskBarIcon : public wxTaskBarIcon
  11. {
  12. public:
  13. #if defined(__WXOSX__) && wxOSX_USE_COCOA
  14. MyTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE)
  15. : wxTaskBarIcon(iconType)
  16. #else
  17. MyTaskBarIcon()
  18. #endif
  19. {}
  20. void OnLeftButtonDClick(wxTaskBarIconEvent&);
  21. void OnMenuRestore(wxCommandEvent&);
  22. void OnMenuExit(wxCommandEvent&);
  23. void OnMenuSetNewIcon(wxCommandEvent&);
  24. void OnMenuCheckmark(wxCommandEvent&);
  25. void OnMenuUICheckmark(wxUpdateUIEvent&);
  26. void OnMenuSub(wxCommandEvent&);
  27. virtual wxMenu *CreatePopupMenu();
  28. wxDECLARE_EVENT_TABLE();
  29. };
  30. // Define a new application
  31. class MyApp : public wxApp
  32. {
  33. public:
  34. virtual bool OnInit();
  35. };
  36. class MyDialog: public wxDialog
  37. {
  38. public:
  39. MyDialog(const wxString& title);
  40. virtual ~MyDialog();
  41. protected:
  42. void OnAbout(wxCommandEvent& event);
  43. void OnOK(wxCommandEvent& event);
  44. void OnExit(wxCommandEvent& event);
  45. void OnCloseWindow(wxCloseEvent& event);
  46. MyTaskBarIcon *m_taskBarIcon;
  47. #if defined(__WXOSX__) && wxOSX_USE_COCOA
  48. MyTaskBarIcon *m_dockIcon;
  49. #endif
  50. wxDECLARE_EVENT_TABLE();
  51. };