]>
git.saurik.com Git - wxWidgets.git/blob - src/palmos/taskbar.cpp
   1 ///////////////////////////////////////////////////////////////////////// 
   2 // File:        src/palmos/taskbar.cpp 
   3 // Purpose:     Implements wxTaskBarIcon class for manipulating icons on 
   5 // Author:      Julian Smart 
   6 // Modified by: Vaclav Slavik 
  10 // Licence:     wxWindows licence 
  11 ///////////////////////////////////////////////////////////////////////// 
  13 // For compilers that support precompilation, includes "wx.h". 
  14 #include "wx/wxprec.h" 
  21     #include "wx/window.h" 
  27 #if defined(__WIN95__) 
  30 #include "wx/taskbar.h" 
  32 IMPLEMENT_DYNAMIC_CLASS(wxTaskBarIcon
, wxEvtHandler
) 
  34 // ============================================================================ 
  36 // ============================================================================ 
  38 // ---------------------------------------------------------------------------- 
  39 // wxTaskBarIconWindow: helper window 
  40 // ---------------------------------------------------------------------------- 
  42 // NB: this class serves two purposes: 
  43 //     1. win32 needs a HWND associated with taskbar icon, this provides it 
  44 //     2. we need wxTopLevelWindow so that the app doesn't exit when 
  45 //        last frame is closed but there still is a taskbar icon 
  46 class wxTaskBarIconWindow 
: public wxFrame
 
  49     wxTaskBarIconWindow(wxTaskBarIcon 
*icon
) 
  50         : wxFrame(NULL
, wxID_ANY
, wxEmptyString
, wxDefaultPosition
, wxDefaultSize
, 0), 
  55     WXLRESULT 
MSWWindowProc(WXUINT msg
, 
  56                             WXWPARAM wParam
, WXLPARAM lParam
) 
  62     wxTaskBarIcon 
*m_icon
; 
  65 // ---------------------------------------------------------------------------- 
  67 // ---------------------------------------------------------------------------- 
  69 wxTaskBarIcon::wxTaskBarIcon() 
  73 wxTaskBarIcon::~wxTaskBarIcon() 
  78 bool wxTaskBarIcon::SetIcon(const wxIcon
& icon
, const wxString
& tooltip
) 
  83 bool wxTaskBarIcon::RemoveIcon() 
  88 bool wxTaskBarIcon::PopupMenu(wxMenu 
*menu
) 
  93 void wxTaskBarIcon::RegisterWindowMessages() 
  97 // ---------------------------------------------------------------------------- 
  98 // wxTaskBarIcon window proc 
  99 // ---------------------------------------------------------------------------- 
 101 long wxTaskBarIcon::WindowProc(unsigned int msg
, 
 102                                unsigned int WXUNUSED(wParam
),