X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d2eddff4af247681ac68d7dbe411ca2bc81742f..07df68c89aeba256e14a6da36fb5661826968824:/include/wx/event.h diff --git a/include/wx/event.h b/include/wx/event.h index c5d9a283b7..c9cbc33a0f 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -606,9 +606,6 @@ enum class WXDLLEXPORT wxMouseEvent : public wxEvent { -private: - wxMouseEvent& operator=(const wxMouseEvent& event); - public: wxMouseEvent(wxEventType mouseType = wxEVT_NULL); wxMouseEvent(const wxMouseEvent& event) : wxEvent(event) @@ -741,8 +738,13 @@ public: // wheel action. Defaults to one. int GetLinesPerAction() const { return m_linesPerAction; } + // Is the system set to do page scrolling? + bool IsPageScroll() const { return ((unsigned int)m_linesPerAction == UINT_MAX); } + virtual wxEvent *Clone() const { return new wxMouseEvent(*this); } + wxMouseEvent& operator=(const wxMouseEvent& event) { Assign(event); return *this; } + public: wxCoord m_x, m_y; @@ -819,9 +821,9 @@ public: { m_x = evt.m_x; m_y = evt.m_y; - + m_keyCode = evt.m_keyCode; - + m_controlDown = evt.m_controlDown; m_shiftDown = evt.m_shiftDown; m_altDown = evt.m_altDown; @@ -830,7 +832,7 @@ public: m_rawCode = evt.m_rawCode; m_rawFlags = evt.m_rawFlags; } - + // Find state of shift/control keys bool ControlDown() const { return m_controlDown; } @@ -939,7 +941,7 @@ public: : wxEvent(event), m_size(event.m_size) { } - + wxSize GetSize() const { return m_size; } virtual wxEvent *Clone() const { return new wxSizeEvent(*this); } @@ -971,7 +973,7 @@ public: : wxEvent(event), m_pos(event.m_pos) { } - + wxPoint GetPosition() const { return m_pos; } virtual wxEvent *Clone() const { return new wxMoveEvent(*this); } @@ -1128,7 +1130,7 @@ public: wxActivateEvent(const wxActivateEvent& event) : wxEvent(event) { m_active = event.m_active; } - + bool GetActive() const { return m_active; } virtual wxEvent *Clone() const { return new wxActivateEvent(*this); } @@ -1174,7 +1176,7 @@ public: wxMenuEvent(const wxMenuEvent & event) : wxEvent(event) { m_menuId = event.m_menuId; } - + // only for wxEVT_MENU_HIGHLIGHT int GetMenuId() const { return m_menuId; } @@ -1219,7 +1221,7 @@ public: m_force = event.m_force; #endif // WXWIN_COMPATIBILITY } - + void SetLoggingOff(bool logOff) { m_loggingOff = logOff; } bool GetLoggingOff() const { return m_loggingOff; } @@ -1272,7 +1274,7 @@ public: wxShowEvent(const wxShowEvent & event) : wxEvent(event) { m_show = event.m_show; } - + void SetShow(bool show) { m_show = show; } bool GetShow() const { return m_show; } @@ -1298,7 +1300,7 @@ public: wxIconizeEvent(const wxIconizeEvent & event) : wxEvent(event) { m_iconized = event.m_iconized; } - + // return true if the frame was iconized, false if restored bool Iconized() const { return m_iconized; } @@ -1381,7 +1383,7 @@ public: m_buttonState(event.m_buttonState), m_joyStick(event.m_joyStick) { } - + wxPoint GetPosition() const { return m_pos; } int GetZPosition() const { return m_zPosition; } int GetButtonState() const { return m_buttonState; } @@ -1492,7 +1494,7 @@ public: m_checked = m_enabled = m_setEnabled = - m_setText = + m_setText = m_setChecked = FALSE; } wxUpdateUIEvent(const wxUpdateUIEvent & event) @@ -1504,7 +1506,7 @@ public: m_setChecked(event.m_setChecked), m_text(event.m_text) { } - + bool GetChecked() const { return m_checked; } bool GetEnabled() const { return m_enabled; } wxString GetText() const { return m_text; } @@ -1643,7 +1645,7 @@ public: : wxEvent(event), m_paletteRealized(event.m_paletteRealized) { } - + // App sets this if it changes the palette. void SetPaletteRealized(bool realized) { m_paletteRealized = realized; } bool GetPaletteRealized() const { return m_paletteRealized; } @@ -1780,7 +1782,7 @@ public: m_target(event.m_target), m_link(event.m_link) { } - + // Position of event (in screen coordinates) const wxPoint& GetPosition() const { return m_pos; } void SetPosition(const wxPoint& pos) { m_pos = pos; } @@ -1825,7 +1827,7 @@ public: : wxCommandEvent(event), m_pos(event.m_pos) { } - + // Position of event (in screen coordinates) const wxPoint& GetPosition() const { return m_pos; } void SetPosition(const wxPoint& pos) { m_pos = pos; } @@ -1855,7 +1857,7 @@ public: : wxEvent(event), m_requestMore(event.m_requestMore) { } - + void RequestMore(bool needMore = TRUE) { m_requestMore = needMore; } bool MoreRequested() const { return m_requestMore; } @@ -2160,8 +2162,8 @@ typedef void (wxEvtHandler::*wxUpdateUIEventFunction)(wxUpdateUIEvent&); typedef void (wxEvtHandler::*wxIdleEventFunction)(wxIdleEvent&); typedef void (wxEvtHandler::*wxCloseEventFunction)(wxCloseEvent&); typedef void (wxEvtHandler::*wxShowEventFunction)(wxShowEvent&); -typedef void (wxEvtHandler::*wxIconizeEventFunction)(wxShowEvent&); -typedef void (wxEvtHandler::*wxMaximizeEventFunction)(wxShowEvent&); +typedef void (wxEvtHandler::*wxIconizeEventFunction)(wxIconizeEvent&); +typedef void (wxEvtHandler::*wxMaximizeEventFunction)(wxMazimizeEvent&); typedef void (wxEvtHandler::*wxNavigationKeyEventFunction)(wxNavigationKeyEvent&); typedef void (wxEvtHandler::*wxPaletteChangedEventFunction)(wxPaletteChangedEvent&); typedef void (wxEvtHandler::*wxQueryNewPaletteEventFunction)(wxQueryNewPaletteEvent&);