X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/193bf013642b9742909ab430d3b422840a478e47..4d91c1d1aebe7872e50c2e35b0a436cac9cee53c:/include/wx/event.h diff --git a/include/wx/event.h b/include/wx/event.h index c74f328aae..2ac0ea2fe0 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -346,8 +346,8 @@ public: int GetSelection() const { return m_commandInt; } // Set/Get listbox/choice selection string - void SetString(char* s) { m_commandString = s; } - char *GetString() const { return m_commandString; } + void SetString(const wxString& s) { m_commandString = s; } + const wxString& GetString() const { return m_commandString; } // Get checkbox value bool Checked() const { return (m_commandInt != 0); } @@ -362,7 +362,7 @@ public: long GetInt() const { return m_commandInt ; } public: - char* m_commandString; // String event argument + wxString m_commandString; // String event argument int m_commandInt; long m_extraLong; // Additional information (e.g. select/deselect) void* m_clientData; // Arbitrary client data @@ -517,6 +517,7 @@ public: bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); } // Find the position of the event + void GetPosition(long *xpos, long *ypos) const { *xpos = m_x; *ypos = m_y; } void Position(long *xpos, long *ypos) const { *xpos = m_x; *ypos = m_y; } // Find the position of the event @@ -575,18 +576,18 @@ public: bool ShiftDown() const { return m_shiftDown; } long KeyCode() const { return m_keyCode; } -#if WXWIN_COMPATIBILITY // Find the position of the event - void Position(float *xpos, float *ypos) const - { *xpos = (float)m_x; *ypos = (float)m_y; } + void GetPosition(long *xpos, long *ypos) const + { *xpos = m_x; *ypos = m_y; } + + wxPoint GetPosition() const + { return wxPoint(m_x, m_y); } // Get X position - float GetX() const { return (float)m_x; } + long GetX() const { return m_x; } // Get Y position - float GetY() const { return (float)m_y; } - -#endif // WXWIN_COMPATIBILITY + long GetY() const { return m_y; } public: long m_x;