From 7798a18ec81d3733082bc60a958fac1d4510faca Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 26 Jun 1998 20:18:30 +0000 Subject: [PATCH] New wxEventType for event type enum, and corresponding alterations. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/event.cpp | 10 +++--- src/generic/listctrl.cpp | 2 +- src/generic/treectrl.cpp | 2 +- src/gtk/filedlg.cpp | 4 +-- src/gtk/scrolbar.cpp | 2 +- src/gtk/slider.cpp | 2 +- src/gtk/window.cpp | 12 +++---- src/gtk1/filedlg.cpp | 4 +-- src/gtk1/scrolbar.cpp | 2 +- src/gtk1/slider.cpp | 2 +- src/gtk1/window.cpp | 12 +++---- src/msw/control.cpp | 4 +-- src/msw/listctrl.cpp | 6 ++-- src/msw/scrolbar.cpp | 4 +-- src/msw/slider.cpp | 4 +-- src/msw/spinbutt.cpp | 6 ++-- src/msw/tabctrl.cpp | 6 ++-- src/msw/textctrl.cpp | 2 +- src/msw/treectrl.cpp | 15 ++++---- src/msw/window.cpp | 76 ++++++++++++++++++++-------------------- src/ntwxwin.mak | 4 +-- 21 files changed, 92 insertions(+), 89 deletions(-) diff --git a/src/common/event.cpp b/src/common/event.cpp index c6f1a9023b..888605ba97 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -76,7 +76,7 @@ const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, NULL wxEvent::wxEvent(int theId) { - m_eventType = 0; + m_eventType = wxEVT_NULL; m_eventObject = NULL; m_eventHandle = NULL; m_timeStamp = 0; @@ -90,7 +90,7 @@ wxEvent::wxEvent(int theId) * */ -wxCommandEvent::wxCommandEvent(WXTYPE commandType, int theId) +wxCommandEvent::wxCommandEvent(wxEventType commandType, int theId) { m_eventType = commandType; m_clientData = NULL; @@ -104,7 +104,7 @@ wxCommandEvent::wxCommandEvent(WXTYPE commandType, int theId) * Scroll events */ -wxScrollEvent::wxScrollEvent(WXTYPE commandType, int id, int pos, int orient): +wxScrollEvent::wxScrollEvent(wxEventType commandType, int id, int pos, int orient): wxCommandEvent(commandType, id) { m_extraLong = orient; @@ -117,7 +117,7 @@ wxScrollEvent::wxScrollEvent(WXTYPE commandType, int id, int pos, int orient): * */ -wxMouseEvent::wxMouseEvent(WXTYPE commandType) +wxMouseEvent::wxMouseEvent(wxEventType commandType) { m_eventType = commandType; m_metaDown = FALSE; @@ -231,7 +231,7 @@ wxPoint wxMouseEvent::GetLogicalPosition(const wxDC& dc) const * */ -wxKeyEvent::wxKeyEvent(WXTYPE type) +wxKeyEvent::wxKeyEvent(wxEventType type) { m_eventType = type; m_shiftDown = FALSE; diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 383f729e33..42d424b258 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -940,7 +940,7 @@ void wxListMainWindow::ActivateLine( wxListLineData *line ) OnListNotify( le ); }; -void wxListMainWindow::SendNotify( wxListLineData *line, long command ) +void wxListMainWindow::SendNotify( wxListLineData *line, wxEventType command ) { if (!m_parent) return; wxListEvent le( command, m_parent->GetId() ); diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp index 84ae7efd04..d1b0650a95 100644 --- a/src/generic/treectrl.cpp +++ b/src/generic/treectrl.cpp @@ -39,7 +39,7 @@ wxTreeItem::wxTreeItem(void) IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent,wxCommandEvent) -wxTreeEvent::wxTreeEvent( WXTYPE commandType, int id ) : +wxTreeEvent::wxTreeEvent( wxEventType commandType, int id ) : wxCommandEvent( commandType, id ) { m_code = 0; diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index 1f16d2d1cd..74798f65f2 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -23,14 +23,14 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), gpointer data ) { wxFileDialog *dialog = (wxFileDialog*)data; - wxCommandEvent event(0); + wxCommandEvent event(wxEVT_NULL); dialog->OnOk( event ); }; void gtk_filedialog_cancel_callback( GtkWidget *WXUNUSED(widget), gpointer data ) { wxFileDialog *dialog = (wxFileDialog*)data; - wxCommandEvent event(0); + wxCommandEvent event(wxEVT_NULL); dialog->OnCancel( event ); }; diff --git a/src/gtk/scrolbar.cpp b/src/gtk/scrolbar.cpp index cb0d32c002..9a0098b3bd 100644 --- a/src/gtk/scrolbar.cpp +++ b/src/gtk/scrolbar.cpp @@ -34,7 +34,7 @@ void gtk_scrollbar_callback( GtkWidget *WXUNUSED(widget), wxScrollBar *win ) float diff = win->m_adjust->value - win->m_oldPos; if (fabs(diff) < 0.2) return; - int command = 0; + wxEventType command = wxEVT_NULL; float line_step = win->m_adjust->step_increment; float page_step = win->m_adjust->page_increment; diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index 891fcf61f9..4b2385afd1 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -34,7 +34,7 @@ void gtk_slider_callback( GtkWidget *WXUNUSED(widget), wxSlider *win ) float diff = win->m_adjust->value - win->m_oldPos; if (fabs(diff) < 0.2) return; - int command = 0; + wxEventType command = wxEVT_NULL; float line_step = win->m_adjust->step_increment; float page_step = win->m_adjust->page_increment; diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index c315357b58..4c9708ee27 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -285,7 +285,7 @@ gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton *gdk_ev printf( ".\n" ); */ - WXTYPE event_type = wxEVT_LEFT_DOWN; + wxEventType event_type = wxEVT_LEFT_DOWN; if (gdk_event->button == 1) { @@ -351,7 +351,7 @@ gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButton *gdk_ printf( ".\n" ); */ - WXTYPE event_type = 0; + wxEventType event_type = wxEVT_NULL; switch (gdk_event->button) { @@ -499,7 +499,7 @@ void gtk_window_vscroll_callback( GtkWidget *WXUNUSED(widget), wxWindow *win ) printf( "Sending new value: %d.\n", i ); */ - int command = 0; + wxEventType command = wxEVT_NULL; float line_step = win->m_vAdjust->step_increment; float page_step = win->m_vAdjust->page_increment; @@ -543,7 +543,7 @@ void gtk_window_hscroll_callback( GtkWidget *WXUNUSED(widget), wxWindow *win ) printf( "Sending new value: %d.\n", i ); */ - int command = 0; + wxEventType command = wxEVT_NULL; float line_step = win->m_hAdjust->step_increment; float page_step = win->m_hAdjust->page_increment; @@ -577,7 +577,7 @@ void gtk_window_vscroll_change_callback( GtkWidget *WXUNUSED(widget), wxWindow * if (!win->HasVMT()) return; - int command = wxEVT_SCROLL_THUMBTRACK; + wxEventType command = wxEVT_SCROLL_THUMBTRACK; int value = (int)(win->m_vAdjust->value+0.5); wxScrollEvent event( command, win->GetId(), value, wxVERTICAL ); @@ -601,7 +601,7 @@ void gtk_window_hscroll_change_callback( GtkWidget *WXUNUSED(widget), wxWindow * if (!win->HasVMT()) return; - int command = wxEVT_SCROLL_THUMBTRACK; + wxEventType command = wxEVT_SCROLL_THUMBTRACK; int value = (int)(win->m_hAdjust->value+0.5); wxScrollEvent event( command, win->GetId(), value, wxHORIZONTAL ); diff --git a/src/gtk1/filedlg.cpp b/src/gtk1/filedlg.cpp index 1f16d2d1cd..74798f65f2 100644 --- a/src/gtk1/filedlg.cpp +++ b/src/gtk1/filedlg.cpp @@ -23,14 +23,14 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), gpointer data ) { wxFileDialog *dialog = (wxFileDialog*)data; - wxCommandEvent event(0); + wxCommandEvent event(wxEVT_NULL); dialog->OnOk( event ); }; void gtk_filedialog_cancel_callback( GtkWidget *WXUNUSED(widget), gpointer data ) { wxFileDialog *dialog = (wxFileDialog*)data; - wxCommandEvent event(0); + wxCommandEvent event(wxEVT_NULL); dialog->OnCancel( event ); }; diff --git a/src/gtk1/scrolbar.cpp b/src/gtk1/scrolbar.cpp index cb0d32c002..9a0098b3bd 100644 --- a/src/gtk1/scrolbar.cpp +++ b/src/gtk1/scrolbar.cpp @@ -34,7 +34,7 @@ void gtk_scrollbar_callback( GtkWidget *WXUNUSED(widget), wxScrollBar *win ) float diff = win->m_adjust->value - win->m_oldPos; if (fabs(diff) < 0.2) return; - int command = 0; + wxEventType command = wxEVT_NULL; float line_step = win->m_adjust->step_increment; float page_step = win->m_adjust->page_increment; diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp index 891fcf61f9..4b2385afd1 100644 --- a/src/gtk1/slider.cpp +++ b/src/gtk1/slider.cpp @@ -34,7 +34,7 @@ void gtk_slider_callback( GtkWidget *WXUNUSED(widget), wxSlider *win ) float diff = win->m_adjust->value - win->m_oldPos; if (fabs(diff) < 0.2) return; - int command = 0; + wxEventType command = wxEVT_NULL; float line_step = win->m_adjust->step_increment; float page_step = win->m_adjust->page_increment; diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index c315357b58..4c9708ee27 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -285,7 +285,7 @@ gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton *gdk_ev printf( ".\n" ); */ - WXTYPE event_type = wxEVT_LEFT_DOWN; + wxEventType event_type = wxEVT_LEFT_DOWN; if (gdk_event->button == 1) { @@ -351,7 +351,7 @@ gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButton *gdk_ printf( ".\n" ); */ - WXTYPE event_type = 0; + wxEventType event_type = wxEVT_NULL; switch (gdk_event->button) { @@ -499,7 +499,7 @@ void gtk_window_vscroll_callback( GtkWidget *WXUNUSED(widget), wxWindow *win ) printf( "Sending new value: %d.\n", i ); */ - int command = 0; + wxEventType command = wxEVT_NULL; float line_step = win->m_vAdjust->step_increment; float page_step = win->m_vAdjust->page_increment; @@ -543,7 +543,7 @@ void gtk_window_hscroll_callback( GtkWidget *WXUNUSED(widget), wxWindow *win ) printf( "Sending new value: %d.\n", i ); */ - int command = 0; + wxEventType command = wxEVT_NULL; float line_step = win->m_hAdjust->step_increment; float page_step = win->m_hAdjust->page_increment; @@ -577,7 +577,7 @@ void gtk_window_vscroll_change_callback( GtkWidget *WXUNUSED(widget), wxWindow * if (!win->HasVMT()) return; - int command = wxEVT_SCROLL_THUMBTRACK; + wxEventType command = wxEVT_SCROLL_THUMBTRACK; int value = (int)(win->m_vAdjust->value+0.5); wxScrollEvent event( command, win->GetId(), value, wxVERTICAL ); @@ -601,7 +601,7 @@ void gtk_window_hscroll_change_callback( GtkWidget *WXUNUSED(widget), wxWindow * if (!win->HasVMT()) return; - int command = wxEVT_SCROLL_THUMBTRACK; + wxEventType command = wxEVT_SCROLL_THUMBTRACK; int value = (int)(win->m_hAdjust->value+0.5); wxScrollEvent event( command, win->GetId(), value, wxHORIZONTAL ); diff --git a/src/msw/control.cpp b/src/msw/control.cpp index 08ddcbc1aa..640aca75c7 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -183,8 +183,8 @@ long wxControl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) bool wxControl::MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam) { #if defined(__WIN95__) - wxCommandEvent event(0, m_windowId); - int eventType = 0; + wxCommandEvent event(wxEVT_NULL, m_windowId); + wxEventType eventType = wxEVT_NULL; NMHDR *hdr1 = (NMHDR*) lParam; switch ( hdr1->code ) { diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 48fe1f2c69..6d38a1c526 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1050,8 +1050,8 @@ bool wxListCtrl::MSWCommand(const WXUINT cmd, const WXWORD id) bool wxListCtrl::MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam) { - wxListEvent event(0, m_windowId); - int eventType = 0; + wxListEvent event(wxEVT_NULL, m_windowId); + wxEventType eventType = wxEVT_NULL; NMHDR *hdr1 = (NMHDR *) lParam; switch ( hdr1->code ) { @@ -1367,7 +1367,7 @@ static void wxConvertToMSWListItem(const wxListCtrl *ctrl, wxListItem& info, LV_ // List event IMPLEMENT_DYNAMIC_CLASS(wxListEvent, wxCommandEvent) -wxListEvent::wxListEvent(WXTYPE commandType, int id): +wxListEvent::wxListEvent(wxEventType commandType, int id): wxCommandEvent(commandType, id) { m_code = 0; diff --git a/src/msw/scrolbar.cpp b/src/msw/scrolbar.cpp index fc0bf789f7..3514ea2245 100644 --- a/src/msw/scrolbar.cpp +++ b/src/msw/scrolbar.cpp @@ -129,7 +129,7 @@ void wxScrollBar::MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHW maxPos -= (m_pageSize - 1); #endif - int scrollEvent = 0; + wxEventType scrollEvent = wxEVT_NULL; int nScrollInc; switch ( wParam ) @@ -339,7 +339,7 @@ void wxScrollBar::Command(wxCommandEvent& event) // Backward compatibility void wxScrollBar::OnScroll(wxScrollEvent& event) { - int oldEvent = event.GetEventType(); + wxEventType oldEvent = event.GetEventType(); event.SetEventType( wxEVT_COMMAND_SCROLLBAR_UPDATED ); if ( !GetEventHandler()->ProcessEvent(event) ) { diff --git a/src/msw/slider.cpp b/src/msw/slider.cpp index f09cdb8cb3..1114477aa2 100644 --- a/src/msw/slider.cpp +++ b/src/msw/slider.cpp @@ -273,7 +273,7 @@ void wxSlider::MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWND #endif int nScrollInc; - int scrollEvent = 0; + wxEventType scrollEvent = wxEVT_NULL; switch ( wParam ) { case SB_TOP: @@ -751,7 +751,7 @@ bool wxSlider::ContainsHWND(WXHWND hWnd) const // Backward compatibility void wxSlider::OnScroll(wxScrollEvent& event) { - int oldEvent = event.GetEventType(); + wxEventType oldEvent = event.GetEventType(); event.SetEventType( wxEVT_COMMAND_SLIDER_UPDATED ); if ( !GetEventHandler()->ProcessEvent(event) ) { diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index 931add7bc9..db8c8dc34b 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -133,7 +133,7 @@ void wxSpinButton::MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXH { if (control) { - wxSpinEvent event(0, m_windowId); + wxSpinEvent event(wxEVT_NULL, m_windowId); event.SetPosition(pos); event.SetOrientation(wxVERTICAL); event.SetEventObject( this ); @@ -182,7 +182,7 @@ void wxSpinButton::MSWOnHScroll( const WXWORD wParam, const WXWORD pos, const WX { if (control) { - wxSpinEvent event(0, m_windowId); + wxSpinEvent event(wxEVT_NULL, m_windowId); event.SetPosition(pos); event.SetOrientation(wxHORIZONTAL); event.SetEventObject( this ); @@ -261,7 +261,7 @@ bool wxSpinButton::MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam) // Spin event IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent) -wxSpinEvent::wxSpinEvent(WXTYPE commandType, int id): +wxSpinEvent::wxSpinEvent(wxEventType commandType, int id): wxScrollEvent(commandType, id) { } diff --git a/src/msw/tabctrl.cpp b/src/msw/tabctrl.cpp index df6dc39552..179c51311c 100644 --- a/src/msw/tabctrl.cpp +++ b/src/msw/tabctrl.cpp @@ -152,8 +152,8 @@ bool wxTabCtrl::MSWCommand(const WXUINT cmd, const WXWORD id) bool wxTabCtrl::MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam) { - wxTabEvent event(0, m_windowId); - int eventType = 0; + wxTabEvent event(wxEVT_NULL, m_windowId); + wxEventType eventType = wxEVT_NULL; NMHDR* hdr1 = (NMHDR*) lParam; switch ( hdr1->code ) { @@ -471,7 +471,7 @@ void wxMapBitmap(HBITMAP hBitmap, int width, int height) // Tab event IMPLEMENT_DYNAMIC_CLASS(wxTabEvent, wxCommandEvent) -wxTabEvent::wxTabEvent(WXTYPE commandType, int id): +wxTabEvent::wxTabEvent(wxEventType commandType, int id): wxCommandEvent(commandType, id) { } diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 2532bd4555..578081a281 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -1025,7 +1025,7 @@ bool wxTextCtrl::MSWCommand(const WXUINT param, const WXWORD WXUNUSED(id)) break; } */ - WXTYPE eventTyp = 0; + wxEventType eventTyp = wxEVT_NULL; switch (param) { case EN_SETFOCUS: diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 647180b317..6ad24a23dd 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -90,7 +90,7 @@ bool wxTreeCtrl::Create(wxWindow *parent, const wxWindowID id, const wxPoint& po m_windowId = (id == -1) ? NewControlId() : id; - DWORD wstyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP | TVS_HASLINES | TVS_LINESATROOT; + DWORD wstyle = WS_VISIBLE | WS_CHILD | WS_TABSTOP | TVS_HASLINES; bool want3D; WXDWORD exStyle = Determine3DEffects(WS_EX_CLIENTEDGE, &want3D) ; @@ -102,10 +102,13 @@ bool wxTreeCtrl::Create(wxWindow *parent, const wxWindowID id, const wxPoint& po wstyle |= WS_BORDER; if ( m_windowStyle & wxTR_HAS_BUTTONS ) - wstyle |= TVS_HASBUTTONS; + wstyle |= TVS_HASBUTTONS; if ( m_windowStyle & wxTR_EDIT_LABELS ) - wstyle |= TVS_EDITLABELS; + wstyle |= TVS_EDITLABELS; + + if ( m_windowStyle & wxTR_LINES_AT_ROOT ) + wstyle |= TVS_LINESATROOT; // Create the toolbar control. HWND hWndTreeControl = CreateWindowEx(exStyle, @@ -561,8 +564,8 @@ bool wxTreeCtrl::MSWCommand(const WXUINT cmd, const WXWORD id) bool wxTreeCtrl::MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam) { - wxTreeEvent event(0, m_windowId); - int eventType = 0; + wxTreeEvent event(wxEVT_NULL, m_windowId); + wxEventType eventType = wxEVT_NULL; NMHDR* hdr1 = (NMHDR*) lParam; switch ( hdr1->code ) { @@ -916,7 +919,7 @@ static void wxConvertToMSWTreeItem(wxTreeItem& info, TV_ITEM& tvItem) // Tree event IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxCommandEvent) -wxTreeEvent::wxTreeEvent(WXTYPE commandType, int id): +wxTreeEvent::wxTreeEvent(wxEventType commandType, int id): wxCommandEvent(commandType, id) { m_code = 0; diff --git a/src/msw/window.cpp b/src/msw/window.cpp index abdd632b0b..1b69d45927 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -2141,7 +2141,7 @@ void wxWindow::MSWOnLButtonDown(const int x, const int y, const WXUINT flags) } #endif - wxMouseEvent event(wxEVENT_TYPE_LEFT_DOWN); + wxMouseEvent event(wxEVT_LEFT_DOWN); event.m_x = x; event.m_y = y; event.m_shiftDown = ((flags & MK_SHIFT) != 0); @@ -2158,7 +2158,7 @@ void wxWindow::MSWOnLButtonDown(const int x, const int y, const WXUINT flags) void wxWindow::MSWOnLButtonUp(const int x, const int y, const WXUINT flags) { - wxMouseEvent event(wxEVENT_TYPE_LEFT_UP); + wxMouseEvent event(wxEVT_LEFT_UP); event.m_x = x; event.m_y = y; event.m_shiftDown = ((flags & MK_SHIFT) != 0); @@ -2169,14 +2169,14 @@ void wxWindow::MSWOnLButtonUp(const int x, const int y, const WXUINT flags) event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ event.m_eventObject = this; - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVENT_TYPE_LEFT_UP; + m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_LEFT_UP; GetEventHandler()->OldOnMouseEvent(event); } void wxWindow::MSWOnLButtonDClick(const int x, const int y, const WXUINT flags) { - wxMouseEvent event(wxEVENT_TYPE_LEFT_DCLICK); + wxMouseEvent event(wxEVT_LEFT_DCLICK); event.m_x = x; event.m_y = y; event.m_shiftDown = ((flags & MK_SHIFT) != 0); @@ -2187,7 +2187,7 @@ void wxWindow::MSWOnLButtonDClick(const int x, const int y, const WXUINT flags) event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ event.m_eventObject = this; - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVENT_TYPE_LEFT_DCLICK; + m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_LEFT_DCLICK; // if (m_doubleClickAllowed) GetEventHandler()->OldOnMouseEvent(event); @@ -2216,7 +2216,7 @@ void wxWindow::MSWOnMButtonDown(const int x, const int y, const WXUINT flags) } #endif - wxMouseEvent event(wxEVENT_TYPE_MIDDLE_DOWN); + wxMouseEvent event(wxEVT_MIDDLE_DOWN); event.m_x = x; event.m_y = y; event.m_shiftDown = ((flags & MK_SHIFT) != 0); @@ -2227,14 +2227,14 @@ void wxWindow::MSWOnMButtonDown(const int x, const int y, const WXUINT flags) event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ event.m_eventObject = this; - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVENT_TYPE_MIDDLE_DOWN; + m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_MIDDLE_DOWN; GetEventHandler()->OldOnMouseEvent(event); } void wxWindow::MSWOnMButtonUp(const int x, const int y, const WXUINT flags) { //wxDebugMsg("MButtonUp\n") ; - wxMouseEvent event(wxEVENT_TYPE_MIDDLE_UP); + wxMouseEvent event(wxEVT_MIDDLE_UP); event.m_x = x; event.m_y = y; event.m_shiftDown = ((flags & MK_SHIFT) != 0); @@ -2245,13 +2245,13 @@ void wxWindow::MSWOnMButtonUp(const int x, const int y, const WXUINT flags) event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ event.m_eventObject = this; - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVENT_TYPE_MIDDLE_UP; + m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_MIDDLE_UP; GetEventHandler()->OldOnMouseEvent(event); } void wxWindow::MSWOnMButtonDClick(const int x, const int y, const WXUINT flags) { - wxMouseEvent event(wxEVENT_TYPE_MIDDLE_DCLICK); + wxMouseEvent event(wxEVT_MIDDLE_DCLICK); event.m_x = x; event.m_y = y; event.m_shiftDown = ((flags & MK_SHIFT) != 0); @@ -2262,7 +2262,7 @@ void wxWindow::MSWOnMButtonDClick(const int x, const int y, const WXUINT flags) event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ event.m_eventObject = this; - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVENT_TYPE_MIDDLE_DCLICK; + m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_MIDDLE_DCLICK; // if (m_doubleClickAllowed) GetEventHandler()->OldOnMouseEvent(event); } @@ -2290,7 +2290,7 @@ void wxWindow::MSWOnRButtonDown(const int x, const int y, const WXUINT flags) } #endif - wxMouseEvent event(wxEVENT_TYPE_RIGHT_DOWN); + wxMouseEvent event(wxEVT_RIGHT_DOWN); event.m_x = x; event.m_y = y; event.m_shiftDown = ((flags & MK_SHIFT) != 0); @@ -2301,13 +2301,13 @@ void wxWindow::MSWOnRButtonDown(const int x, const int y, const WXUINT flags) event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ event.m_eventObject = this; - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVENT_TYPE_RIGHT_DOWN; + m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_RIGHT_DOWN; GetEventHandler()->OldOnMouseEvent(event); } void wxWindow::MSWOnRButtonUp(const int x, const int y, const WXUINT flags) { - wxMouseEvent event(wxEVENT_TYPE_RIGHT_UP); + wxMouseEvent event(wxEVT_RIGHT_UP); event.m_x = x; event.m_y = y; event.m_shiftDown = ((flags & MK_SHIFT) != 0); @@ -2318,13 +2318,13 @@ void wxWindow::MSWOnRButtonUp(const int x, const int y, const WXUINT flags) event.m_eventObject = this; event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVENT_TYPE_RIGHT_UP; + m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_RIGHT_UP; GetEventHandler()->OldOnMouseEvent(event); } void wxWindow::MSWOnRButtonDClick(const int x, const int y, const WXUINT flags) { - wxMouseEvent event(wxEVENT_TYPE_RIGHT_DCLICK); + wxMouseEvent event(wxEVT_RIGHT_DCLICK); event.m_x = x; event.m_y = y; event.m_shiftDown = ((flags & MK_SHIFT) != 0); @@ -2335,7 +2335,7 @@ void wxWindow::MSWOnRButtonDClick(const int x, const int y, const WXUINT flags) event.SetTimestamp(wxApp::sm_lastMessageTime); /* MATTHEW: timeStamp */ event.m_eventObject = this; - m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVENT_TYPE_RIGHT_DCLICK; + m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_RIGHT_DCLICK; // if (m_doubleClickAllowed) GetEventHandler()->OldOnMouseEvent(event); } @@ -2356,7 +2356,7 @@ void wxWindow::MSWOnMouseMove(const int x, const int y, const WXUINT flags) MSWOnMouseEnter(x, y, flags); } - wxMouseEvent event(wxEVENT_TYPE_MOTION); + wxMouseEvent event(wxEVT_MOTION); event.m_x = x; event.m_y = y; event.m_shiftDown = ((flags & MK_SHIFT) != 0); @@ -2370,16 +2370,16 @@ void wxWindow::MSWOnMouseMove(const int x, const int y, const WXUINT flags) // Window gets a click down message followed by a mouse move // message even if position isn't changed! We want to discard // the trailing move event if x and y are the same. - if ((m_lastEvent == wxEVENT_TYPE_RIGHT_DOWN || m_lastEvent == wxEVENT_TYPE_LEFT_DOWN || - m_lastEvent == wxEVENT_TYPE_MIDDLE_DOWN) && + if ((m_lastEvent == wxEVT_RIGHT_DOWN || m_lastEvent == wxEVT_LEFT_DOWN || + m_lastEvent == wxEVT_MIDDLE_DOWN) && (m_lastXPos == event.m_x && m_lastYPos == event.m_y)) { m_lastXPos = event.m_x; m_lastYPos = event.m_y; - m_lastEvent = wxEVENT_TYPE_MOTION; + m_lastEvent = wxEVT_MOTION; return; } - m_lastEvent = wxEVENT_TYPE_MOTION; + m_lastEvent = wxEVT_MOTION; m_lastXPos = event.m_x; m_lastYPos = event.m_y; GetEventHandler()->OldOnMouseEvent(event); } @@ -2609,32 +2609,32 @@ void wxWindow::MSWOnVScroll(const WXWORD wParam, const WXWORD pos, const WXHWND switch ( wParam ) { case SB_TOP: - event.m_eventType = wxEVENT_TYPE_SCROLL_TOP; + event.m_eventType = wxEVT_SCROLL_TOP; break; case SB_BOTTOM: - event.m_eventType = wxEVENT_TYPE_SCROLL_BOTTOM; + event.m_eventType = wxEVT_SCROLL_BOTTOM; break; case SB_LINEUP: - event.m_eventType = wxEVENT_TYPE_SCROLL_LINEUP; + event.m_eventType = wxEVT_SCROLL_LINEUP; break; case SB_LINEDOWN: - event.m_eventType = wxEVENT_TYPE_SCROLL_LINEDOWN; + event.m_eventType = wxEVT_SCROLL_LINEDOWN; break; case SB_PAGEUP: - event.m_eventType = wxEVENT_TYPE_SCROLL_PAGEUP; + event.m_eventType = wxEVT_SCROLL_PAGEUP; break; case SB_PAGEDOWN: - event.m_eventType = wxEVENT_TYPE_SCROLL_PAGEDOWN; + event.m_eventType = wxEVT_SCROLL_PAGEDOWN; break; case SB_THUMBTRACK: case SB_THUMBPOSITION: - event.m_eventType = wxEVENT_TYPE_SCROLL_THUMBTRACK; + event.m_eventType = wxEVT_SCROLL_THUMBTRACK; break; default: @@ -2668,32 +2668,32 @@ void wxWindow::MSWOnHScroll( const WXWORD wParam, const WXWORD pos, const WXHWND switch ( wParam ) { case SB_TOP: - event.m_eventType = wxEVENT_TYPE_SCROLL_TOP; + event.m_eventType = wxEVT_SCROLL_TOP; break; case SB_BOTTOM: - event.m_eventType = wxEVENT_TYPE_SCROLL_BOTTOM; + event.m_eventType = wxEVT_SCROLL_BOTTOM; break; case SB_LINEUP: - event.m_eventType = wxEVENT_TYPE_SCROLL_LINEUP; + event.m_eventType = wxEVT_SCROLL_LINEUP; break; case SB_LINEDOWN: - event.m_eventType = wxEVENT_TYPE_SCROLL_LINEDOWN; + event.m_eventType = wxEVT_SCROLL_LINEDOWN; break; case SB_PAGEUP: - event.m_eventType = wxEVENT_TYPE_SCROLL_PAGEUP; + event.m_eventType = wxEVT_SCROLL_PAGEUP; break; case SB_PAGEDOWN: - event.m_eventType = wxEVENT_TYPE_SCROLL_PAGEDOWN; + event.m_eventType = wxEVT_SCROLL_PAGEDOWN; break; case SB_THUMBTRACK: case SB_THUMBPOSITION: - event.m_eventType = wxEVENT_TYPE_SCROLL_THUMBTRACK; + event.m_eventType = wxEVT_SCROLL_THUMBTRACK; break; default: @@ -4368,7 +4368,7 @@ void wxWindow::OnDefaultAction(wxControl *initiatingItem) if (initiatingItem->IsKindOf(CLASSINFO(wxListBox)) && initiatingItem->GetCallback()) { wxListBox *lbox = (wxListBox *)initiatingItem; - wxCommandEvent event(wxEVENT_TYPE_LISTBOX_DCLICK_COMMAND); + wxCommandEvent event(wxEVT_COMMAND_LEFT_DCLICK); event.m_commandInt = -1; if ((lbox->GetWindowStyleFlag() & wxLB_MULTIPLE) == 0) { @@ -4388,7 +4388,7 @@ void wxWindow::OnDefaultAction(wxControl *initiatingItem) wxButton *but = GetDefaultItem(); if (but) { - wxCommandEvent event(wxEVENT_TYPE_BUTTON_COMMAND); + wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED); but->Command(event); } } diff --git a/src/ntwxwin.mak b/src/ntwxwin.mak index 1ef7f8d78e..8dcc6e4dc4 100644 --- a/src/ntwxwin.mak +++ b/src/ntwxwin.mak @@ -137,7 +137,7 @@ PRECOMP= MAKEPRECOMP= !else PCH=WX.PCH -PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH) /Fd$(WXDIR)\src\msw\wx.pdb +PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH) /Fd$(WXDIR)\lib\wx.pdb MAKEPRECOMP=/YcWX/WXPREC.H !endif @@ -157,7 +157,7 @@ PCH=WX.PCH DUMMY=dummy !endif -PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH) /Fd$(WXDIR)\src\msw\wx.pdb +PRECOMP=/YuWX/WXPREC.H /Fp$(WXDIR)\src\msw\$(PCH) /Fd$(WXDIR)\lib\wx.pdb CPPFLAGS=$(WINFLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(EXTRAFLAGS) /D__WINDOWS__ $(INC) $(OPT) /D_DLL /MT $(EXTRADLLFLAGS) /D_WINDOWS /D_WINDLL CPPFLAGS2=$(WINFLAGS) $(DEBUG_FLAGS) /D__WINDOWS__ $(INC) $(EXTRAFLAGS) $(OPT) /D_DLL /MT $(EXTRADLLFLAGS) /D_WINDOWS /D_WINDLL LINKFLAGS=$(LINK_DEBUG_FLAGS) -machine:i386 -subsystem:windows,$(APPVER) -dll # -entry:_DllMainCRTStartup$(DLLENTRY)