corrected EVT_TASKBAR_XXX macros to use wxTaskBarIconEvent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e1633ef9ac
commit
6466d41e94
@ -66,13 +66,13 @@ protected:
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
// non-virtual default event handlers to forward events to the virtuals
|
||||
void _OnMouseMove(wxEvent&);
|
||||
void _OnLButtonDown(wxEvent&);
|
||||
void _OnLButtonUp(wxEvent&);
|
||||
void _OnRButtonDown(wxEvent&);
|
||||
void _OnRButtonUp(wxEvent&);
|
||||
void _OnLButtonDClick(wxEvent&);
|
||||
void _OnRButtonDClick(wxEvent&);
|
||||
void _OnMouseMove(wxTaskBarIconEvent&);
|
||||
void _OnLButtonDown(wxTaskBarIconEvent&);
|
||||
void _OnLButtonUp(wxTaskBarIconEvent&);
|
||||
void _OnRButtonDown(wxTaskBarIconEvent&);
|
||||
void _OnRButtonUp(wxTaskBarIconEvent&);
|
||||
void _OnLButtonDClick(wxTaskBarIconEvent&);
|
||||
void _OnRButtonDClick(wxTaskBarIconEvent&);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
#endif
|
||||
|
@ -30,7 +30,7 @@ protected:
|
||||
|
||||
private:
|
||||
// default events handling, calls CreatePopupMenu:
|
||||
void OnRightButtonDown(wxEvent& event);
|
||||
void OnRightButtonDown(wxTaskBarIconEvent& event);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_NO_COPY_CLASS(wxTaskBarIconBase)
|
||||
@ -68,6 +68,8 @@ private:
|
||||
DECLARE_NO_ASSIGN_CLASS(wxTaskBarIconEvent)
|
||||
};
|
||||
|
||||
typedef void (wxEvtHandler::*wxTaskBarIconEventFunction)(wxTaskBarIconEvent&);
|
||||
|
||||
BEGIN_DECLARE_EVENT_TYPES()
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV,wxEVT_TASKBAR_MOVE,1550)
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV,wxEVT_TASKBAR_LEFT_DOWN,1551)
|
||||
@ -78,13 +80,13 @@ BEGIN_DECLARE_EVENT_TYPES()
|
||||
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV,wxEVT_TASKBAR_RIGHT_DCLICK,1556)
|
||||
END_DECLARE_EVENT_TYPES()
|
||||
|
||||
#define EVT_TASKBAR_MOVE(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_MOVE, -1, -1, (wxObjectEventFunction) wxStaticCastEvent( wxEventFunction, &fn ), NULL),
|
||||
#define EVT_TASKBAR_LEFT_DOWN(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_DOWN, -1, -1, (wxObjectEventFunction) wxStaticCastEvent( wxEventFunction, &fn ), NULL),
|
||||
#define EVT_TASKBAR_LEFT_UP(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_UP, -1, -1, (wxObjectEventFunction) wxStaticCastEvent( wxEventFunction, &fn ), NULL),
|
||||
#define EVT_TASKBAR_RIGHT_DOWN(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) wxStaticCastEvent( wxEventFunction, &fn ), NULL),
|
||||
#define EVT_TASKBAR_RIGHT_UP(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_UP, -1, -1, (wxObjectEventFunction) wxStaticCastEvent( wxEventFunction, &fn ), NULL),
|
||||
#define EVT_TASKBAR_LEFT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) wxStaticCastEvent( wxEventFunction, &fn ), NULL),
|
||||
#define EVT_TASKBAR_RIGHT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) wxStaticCastEvent( wxEventFunction, &fn ), NULL),
|
||||
#define EVT_TASKBAR_MOVE(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_MOVE, -1, -1, (wxObjectEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
|
||||
#define EVT_TASKBAR_LEFT_DOWN(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_DOWN, -1, -1, (wxObjectEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
|
||||
#define EVT_TASKBAR_LEFT_UP(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_UP, -1, -1, (wxObjectEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
|
||||
#define EVT_TASKBAR_RIGHT_DOWN(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
|
||||
#define EVT_TASKBAR_RIGHT_UP(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_UP, -1, -1, (wxObjectEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
|
||||
#define EVT_TASKBAR_LEFT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
|
||||
#define EVT_TASKBAR_RIGHT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
|
||||
|
||||
#endif
|
||||
// wxHAS_TASK_BAR_ICON
|
||||
|
@ -148,7 +148,7 @@ wxMenu *MyTaskBarIcon::CreatePopupMenu()
|
||||
return menu;
|
||||
}
|
||||
|
||||
void MyTaskBarIcon::OnLButtonDClick(wxEvent&)
|
||||
void MyTaskBarIcon::OnLButtonDClick(wxTaskBarIconEvent&)
|
||||
{
|
||||
dialog->Show(true);
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ class MyTaskBarIcon: public wxTaskBarIcon
|
||||
public:
|
||||
MyTaskBarIcon() {};
|
||||
|
||||
void OnLButtonDClick(wxEvent&);
|
||||
void OnLButtonDClick(wxTaskBarIconEvent&);
|
||||
void OnMenuRestore(wxCommandEvent&);
|
||||
void OnMenuExit(wxCommandEvent&);
|
||||
void OnMenuSetNewIcon(wxCommandEvent&);
|
||||
|
@ -25,6 +25,7 @@
|
||||
WX_CHECK_BUILD_OPTIONS("wxAdvanced")
|
||||
|
||||
|
||||
#include "wx/menu.h"
|
||||
#include "wx/taskbar.h"
|
||||
|
||||
DEFINE_EVENT_TYPE( wxEVT_TASKBAR_MOVE )
|
||||
@ -40,7 +41,7 @@ BEGIN_EVENT_TABLE(wxTaskBarIconBase, wxEvtHandler)
|
||||
EVT_TASKBAR_RIGHT_DOWN(wxTaskBarIconBase::OnRightButtonDown)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
void wxTaskBarIconBase::OnRightButtonDown(wxEvent& WXUNUSED(event))
|
||||
void wxTaskBarIconBase::OnRightButtonDown(wxTaskBarIconEvent& WXUNUSED(event))
|
||||
{
|
||||
wxMenu *menu = CreatePopupMenu();
|
||||
if (menu)
|
||||
|
@ -239,13 +239,20 @@ void wxTaskBarIcon::OnRButtonUp(wxEvent&) {}
|
||||
void wxTaskBarIcon::OnLButtonDClick(wxEvent&) {}
|
||||
void wxTaskBarIcon::OnRButtonDClick(wxEvent&) {}
|
||||
|
||||
void wxTaskBarIcon::_OnMouseMove(wxEvent& e) { OnMouseMove(e); }
|
||||
void wxTaskBarIcon::_OnLButtonDown(wxEvent& e) { OnLButtonDown(e); }
|
||||
void wxTaskBarIcon::_OnLButtonUp(wxEvent& e) { OnLButtonUp(e); }
|
||||
void wxTaskBarIcon::_OnRButtonDown(wxEvent& e) { OnRButtonDown(e); }
|
||||
void wxTaskBarIcon::_OnRButtonUp(wxEvent& e) { OnRButtonUp(e); }
|
||||
void wxTaskBarIcon::_OnLButtonDClick(wxEvent& e) { OnLButtonDClick(e); }
|
||||
void wxTaskBarIcon::_OnRButtonDClick(wxEvent& e) { OnRButtonDClick(e); }
|
||||
void wxTaskBarIcon::_OnMouseMove(wxTaskBarIconEvent& e)
|
||||
{ OnMouseMove(e); }
|
||||
void wxTaskBarIcon::_OnLButtonDown(wxTaskBarIconEvent& e)
|
||||
{ OnLButtonDown(e); }
|
||||
void wxTaskBarIcon::_OnLButtonUp(wxTaskBarIconEvent& e)
|
||||
{ OnLButtonUp(e); }
|
||||
void wxTaskBarIcon::_OnRButtonDown(wxTaskBarIconEvent& e)
|
||||
{ OnRButtonDown(e); }
|
||||
void wxTaskBarIcon::_OnRButtonUp(wxTaskBarIconEvent& e)
|
||||
{ OnRButtonUp(e); }
|
||||
void wxTaskBarIcon::_OnLButtonDClick(wxTaskBarIconEvent& e)
|
||||
{ OnLButtonDClick(e); }
|
||||
void wxTaskBarIcon::_OnRButtonDClick(wxTaskBarIconEvent& e)
|
||||
{ OnRButtonDClick(e); }
|
||||
#endif
|
||||
|
||||
void wxTaskBarIcon::RegisterWindowMessages()
|
||||
|
Loading…
Reference in New Issue
Block a user