X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fb6261e9ba8b162347135a9174afbc81244b10cc..555526fbff27722462383e12e72b7adc84423540:/include/wx/event.h?ds=sidebyside diff --git a/include/wx/event.h b/include/wx/event.h index 17aad6eace..e349b45b8d 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -1,11 +1,11 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: event.h +// Name: wx/event.h // Purpose: Event classes // Author: Julian Smart // Modified by: // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) +// Copyright: (c) wxWindows team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -283,7 +283,7 @@ enum wxEVT_PLOT_AREA_SEL_CREATED = wxEVT_FIRST + 1015, wxEVT_PLOT_AREA_SEL_CHANGING = wxEVT_FIRST + 1016, wxEVT_PLOT_AREA_SEL_CHANGED = wxEVT_FIRST + 1017, - wxEVT_PLOT_BEGIN_X_LABEL_EDIT = wxEVT_FIRST + 1020, + wxEVT_PLOT_BEGIN_X_LABEL_EDIT = wxEVT_FIRST + 1020, wxEVT_PLOT_END_X_LABEL_EDIT = wxEVT_FIRST + 1021, wxEVT_PLOT_BEGIN_Y_LABEL_EDIT = wxEVT_FIRST + 1022, wxEVT_PLOT_END_Y_LABEL_EDIT = wxEVT_FIRST + 1023, @@ -875,9 +875,9 @@ public: wxEVT_PAINT_ICON */ -#if defined(__WXDEBUG__) && defined(__WXMSW__) - // see comments in src/msw/dcclient.cpp where g_isPainting is defined - extern int g_isPainting; +#if defined(__WXDEBUG__) && (defined(__WXMSW__) || defined(__WXPM__)) + // see comments in src/msw|os2/dcclient.cpp where g_isPainting is defined + extern WXDLLEXPORT int g_isPainting; #endif // debug class WXDLLEXPORT wxPaintEvent : public wxEvent @@ -890,13 +890,13 @@ public: m_eventType = wxEVT_PAINT; m_id = Id; -#if defined(__WXDEBUG__) && defined(__WXMSW__) +#if defined(__WXDEBUG__) && (defined(__WXMSW__) || defined(__WXPM__)) // set the internal flag for the duration of processing of WM_PAINT g_isPainting++; #endif // debug } -#if defined(__WXDEBUG__) && defined(__WXMSW__) +#if defined(__WXDEBUG__) && (defined(__WXMSW__) || defined(__WXPM__)) ~wxPaintEvent() { g_isPainting--; @@ -1404,35 +1404,43 @@ public: wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); } }; +// A help event is sent when the user clicks on a window in context-help mode. /* - wxEVT_HELP, wxEVT_DETAILED_HELP - Sent when the user clicks on a window in context-help mode. - The cursor position is in screen coordinates. - */ + wxEVT_HELP + wxEVT_DETAILED_HELP +*/ class WXDLLEXPORT wxHelpEvent : public wxCommandEvent { - DECLARE_DYNAMIC_CLASS(wxHelpEvent) - public: - wxHelpEvent(wxEventType type = wxEVT_NULL, wxWindowID id = 0, const wxPoint& pt = wxPoint(0, 0)) - { m_eventType = type; m_id = id; m_pos = pt; } + wxHelpEvent(wxEventType type = wxEVT_NULL, + wxWindowID id = 0, + const wxPoint& pt = wxDefaultPosition) + { + m_eventType = type; + m_id = id; + m_pos = pt; + } - // Position of event - const wxPoint& GetPosition() const { return m_pos; } - void SetPosition(const wxPoint& pos) { m_pos = pos; } + // Position of event (in screen coordinates) + const wxPoint& GetPosition() const { return m_pos; } + void SetPosition(const wxPoint& pos) { m_pos = pos; } + + // Optional link to further help + const wxString& GetLink() const { return m_link; } + void SetLink(const wxString& link) { m_link = link; } - // Optional link to further help - const wxString& GetLink() const { return m_link; } - void SetLink(const wxString& link) { m_link = link; } + // Optional target to display help in. E.g. a window specification + const wxString& GetTarget() const { return m_target; } + void SetTarget(const wxString& target) { m_target = target; } - // Optional target to display help in. E.g. a window specification - const wxString& GetTarget() const { return m_target; } - void SetTarget(const wxString& target) { m_target = target; } +protected: + wxPoint m_pos; + wxString m_target; + wxString m_link; - wxPoint m_pos; - wxString m_target; - wxString m_link; +private: + DECLARE_DYNAMIC_CLASS(wxHelpEvent) }; #endif // wxUSE_GUI @@ -1545,7 +1553,7 @@ public: wxObjectEventFunction func = NULL, wxObject *userData = (wxObject *) NULL ) { return Disconnect(id, -1, eventType, func, userData); } - + // implementation from now on virtual bool SearchEventTable(wxEventTable& table, wxEvent& event); bool SearchDynamicEventTable( wxEvent& event );