1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
2001-11-21 18:39:26 -05:00
|
|
|
// File: wx/msw/taskbar.h
|
|
|
|
// Purpose: Defines wxTaskBarIcon class for manipulating icons on the
|
1998-05-20 10:12:05 -04:00
|
|
|
// Windows task bar.
|
|
|
|
// Author: Julian Smart
|
2004-03-23 18:20:16 -05:00
|
|
|
// Modified by: Vaclav Slavik
|
1998-05-20 10:12:05 -04:00
|
|
|
// Created: 24/3/98
|
|
|
|
// RCS-ID: $Id$
|
2001-11-21 18:39:26 -05:00
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _TASKBAR_H_
|
|
|
|
#define _TASKBAR_H_
|
|
|
|
|
2003-01-25 07:28:51 -05:00
|
|
|
#include "wx/icon.h"
|
|
|
|
|
2004-03-23 18:20:16 -05:00
|
|
|
// private helper class:
|
|
|
|
class WXDLLIMPEXP_ADV wxTaskBarIconWindow;
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2003-08-02 09:52:31 -04:00
|
|
|
class WXDLLIMPEXP_ADV wxTaskBarIcon: public wxTaskBarIconBase
|
2003-04-04 17:33:47 -05:00
|
|
|
{
|
2003-07-21 20:24:07 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon)
|
1998-05-20 10:12:05 -04:00
|
|
|
public:
|
2004-03-23 18:20:16 -05:00
|
|
|
wxTaskBarIcon();
|
|
|
|
virtual ~wxTaskBarIcon();
|
1998-05-20 10:12:05 -04:00
|
|
|
|
|
|
|
// Accessors
|
2004-03-23 18:20:16 -05:00
|
|
|
inline bool IsOk() const { return true; }
|
1998-05-20 10:12:05 -04:00
|
|
|
inline bool IsIconInstalled() const { return m_iconAdded; }
|
|
|
|
|
|
|
|
// Operations
|
2002-12-04 09:11:26 -05:00
|
|
|
bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxEmptyString);
|
1998-05-20 10:12:05 -04:00
|
|
|
bool RemoveIcon(void);
|
1998-12-11 00:56:40 -05:00
|
|
|
bool PopupMenu(wxMenu *menu); //, int x, int y);
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2003-04-04 17:33:47 -05:00
|
|
|
#if WXWIN_COMPATIBILITY_2_4
|
|
|
|
wxDEPRECATED( bool IsOK() const );
|
|
|
|
|
1998-05-20 10:12:05 -04:00
|
|
|
// Overridables
|
1998-11-21 23:20:32 -05:00
|
|
|
virtual void OnMouseMove(wxEvent&);
|
|
|
|
virtual void OnLButtonDown(wxEvent&);
|
|
|
|
virtual void OnLButtonUp(wxEvent&);
|
|
|
|
virtual void OnRButtonDown(wxEvent&);
|
|
|
|
virtual void OnRButtonUp(wxEvent&);
|
|
|
|
virtual void OnLButtonDClick(wxEvent&);
|
|
|
|
virtual void OnRButtonDClick(wxEvent&);
|
2003-04-04 17:33:47 -05:00
|
|
|
#endif
|
1998-05-20 10:12:05 -04:00
|
|
|
|
|
|
|
// Implementation
|
2004-03-23 18:20:16 -05:00
|
|
|
protected:
|
|
|
|
friend class wxTaskBarIconWindow;
|
2004-03-24 15:12:14 -05:00
|
|
|
long WindowProc(unsigned int msg, unsigned int wParam, long lParam);
|
2004-03-23 18:20:16 -05:00
|
|
|
void RegisterWindowMessages();
|
1998-05-20 10:12:05 -04:00
|
|
|
|
|
|
|
// Data members
|
|
|
|
protected:
|
2004-03-23 18:20:16 -05:00
|
|
|
wxTaskBarIconWindow *m_win;
|
|
|
|
bool m_iconAdded;
|
|
|
|
wxIcon m_icon;
|
|
|
|
wxString m_strTooltip;
|
1998-11-21 23:20:32 -05:00
|
|
|
|
2003-04-04 17:33:47 -05:00
|
|
|
#if WXWIN_COMPATIBILITY_2_4
|
1998-12-11 00:56:40 -05:00
|
|
|
// non-virtual default event handlers to forward events to the virtuals
|
2004-06-05 10:19:35 -04:00
|
|
|
void _OnMouseMove(wxTaskBarIconEvent&);
|
|
|
|
void _OnLButtonDown(wxTaskBarIconEvent&);
|
|
|
|
void _OnLButtonUp(wxTaskBarIconEvent&);
|
|
|
|
void _OnRButtonDown(wxTaskBarIconEvent&);
|
|
|
|
void _OnRButtonUp(wxTaskBarIconEvent&);
|
|
|
|
void _OnLButtonDClick(wxTaskBarIconEvent&);
|
|
|
|
void _OnRButtonDClick(wxTaskBarIconEvent&);
|
1998-12-11 00:56:40 -05:00
|
|
|
|
1998-11-25 07:01:23 -05:00
|
|
|
DECLARE_EVENT_TABLE()
|
2003-04-04 17:33:47 -05:00
|
|
|
#endif
|
1998-05-20 10:12:05 -04:00
|
|
|
};
|
|
|
|
|
2004-09-07 02:01:01 -04:00
|
|
|
#if WXWIN_COMPATIBILITY_2_4
|
2003-04-04 17:33:47 -05:00
|
|
|
inline bool wxTaskBarIcon::IsOK() const { return IsOk(); }
|
|
|
|
#endif
|
1998-12-11 00:56:40 -05:00
|
|
|
|
1998-05-20 10:12:05 -04:00
|
|
|
#endif
|
|
|
|
// _TASKBAR_H_
|