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
This commit is contained in:
Julian Smart 1998-06-26 20:18:30 +00:00
parent 68919656bb
commit 7798a18ec8
21 changed files with 92 additions and 89 deletions

View File

@ -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;

View File

@ -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() );

View File

@ -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;

View File

@ -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 );
};

View File

@ -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;

View File

@ -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;

View File

@ -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 );

View File

@ -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 );
};

View File

@ -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;

View File

@ -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;

View File

@ -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 );

View File

@ -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 )
{

View File

@ -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;

View File

@ -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) )
{

View File

@ -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) )
{

View File

@ -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)
{
}

View File

@ -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)
{
}

View File

@ -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:

View File

@ -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) ;
@ -107,6 +107,9 @@ bool wxTreeCtrl::Create(wxWindow *parent, const wxWindowID id, const wxPoint& po
if ( m_windowStyle & wxTR_EDIT_LABELS )
wstyle |= TVS_EDITLABELS;
if ( m_windowStyle & wxTR_LINES_AT_ROOT )
wstyle |= TVS_LINESATROOT;
// Create the toolbar control.
HWND hWndTreeControl = CreateWindowEx(exStyle,
WC_TREEVIEW,
@ -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;

View File

@ -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);
}
}

View File

@ -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)