X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/53a2db124c633f80bdb16336084262037d879a2c..9c8116f8f70399b08b4af7d41861278c1c2665ab:/include/wx/utils.h diff --git a/include/wx/utils.h b/include/wx/utils.h index 5f1883fef3..0458210efd 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -222,20 +222,21 @@ public: m_metaDown(false) {} - wxCoord GetX() { return m_x; } - wxCoord GetY() { return m_y; } - - bool LeftDown() { return m_leftDown; } - bool MiddleDown() { return m_middleDown; } - bool RightDown() { return m_rightDown; } - bool Aux1Down() { return m_aux1Down; } - bool Aux2Down() { return m_aux2Down; } - - bool ControlDown() { return m_controlDown; } - bool ShiftDown() { return m_shiftDown; } - bool AltDown() { return m_altDown; } - bool MetaDown() { return m_metaDown; } - bool CmdDown() + wxCoord GetX() const { return m_x; } + wxCoord GetY() const { return m_y; } + wxPoint GetPosition() const { return wxPoint(m_x, m_y); } + + bool LeftDown() const { return m_leftDown; } + bool MiddleDown() const { return m_middleDown; } + bool RightDown() const { return m_rightDown; } + bool Aux1Down() const { return m_aux1Down; } + bool Aux2Down() const { return m_aux2Down; } + + bool ControlDown() const { return m_controlDown; } + bool ShiftDown() const { return m_shiftDown; } + bool AltDown() const { return m_altDown; } + bool MetaDown() const { return m_metaDown; } + bool CmdDown() const { #if defined(__WXMAC__) || defined(__WXCOCOA__) return MetaDown(); @@ -244,34 +245,34 @@ public: #endif } - void SetX(wxCoord x) { m_x = x; } - void SetY(wxCoord y) { m_y = y; } + void SetX(wxCoord x) { m_x = x; } + void SetY(wxCoord y) { m_y = y; } - void SetLeftDown(bool down) { m_leftDown = down; } - void SetMiddleDown(bool down) { m_middleDown = down; } - void SetRightDown(bool down) { m_rightDown = down; } - void SetAux1Down(bool down) { m_aux1Down = down; } - void SetAux2Down(bool down) { m_aux2Down = down; } + void SetLeftDown(bool down) { m_leftDown = down; } + void SetMiddleDown(bool down) { m_middleDown = down; } + void SetRightDown(bool down) { m_rightDown = down; } + void SetAux1Down(bool down) { m_aux1Down = down; } + void SetAux2Down(bool down) { m_aux2Down = down; } - void SetControlDown(bool down) { m_controlDown = down; } - void SetShiftDown(bool down) { m_shiftDown = down; } - void SetAltDown(bool down) { m_altDown = down; } - void SetMetaDown(bool down) { m_metaDown = down; } + void SetControlDown(bool down) { m_controlDown = down; } + void SetShiftDown(bool down) { m_shiftDown = down; } + void SetAltDown(bool down) { m_altDown = down; } + void SetMetaDown(bool down) { m_metaDown = down; } private: - wxCoord m_x; - wxCoord m_y; - - bool m_leftDown : 1; - bool m_middleDown : 1; - bool m_rightDown : 1; - bool m_aux1Down : 1; - bool m_aux2Down : 1; - - bool m_controlDown : 1; - bool m_shiftDown : 1; - bool m_altDown : 1; - bool m_metaDown : 1; + wxCoord m_x, + m_y; + + bool m_leftDown : 1; + bool m_middleDown : 1; + bool m_rightDown : 1; + bool m_aux1Down : 1; + bool m_aux2Down : 1; + + bool m_controlDown : 1; + bool m_shiftDown : 1; + bool m_altDown : 1; + bool m_metaDown : 1; };