T *gdk_event)
{
event.SetTimestamp( gdk_event->time );
- event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK);
- event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK);
- event.m_altDown = (gdk_event->state & GDK_MOD1_MASK);
- event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK);
- event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK);
- event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK);
- event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK);
+ event.m_shiftDown = gdk_event->state & GDK_SHIFT_MASK;
+ event.m_controlDown = gdk_event->state & GDK_CONTROL_MASK;
+ event.m_altDown = gdk_event->state & GDK_MOD1_MASK;
+ event.m_metaDown = gdk_event->state & GDK_MOD2_MASK;
+ event.m_leftDown = gdk_event->state & GDK_BUTTON1_MASK;
+ event.m_middleDown = gdk_event->state & GDK_BUTTON2_MASK;
+ event.m_rightDown = gdk_event->state & GDK_BUTTON3_MASK;
+ event.m_aux1Down = gdk_event->state & GDK_BUTTON4_MASK;
+ event.m_aux2Down = gdk_event->state & GDK_BUTTON5_MASK;
wxPoint pt = win->GetClientAreaOrigin();
event.m_x = (wxCoord)gdk_event->x - pt.x;
}
wxMouseEvent event(wxEVT_MOUSEWHEEL);
- // Can't use InitMouse macro because scroll events don't have button
- event.SetTimestamp( gdk_event->time );
- event.m_shiftDown = (gdk_event->state & GDK_SHIFT_MASK);
- event.m_controlDown = (gdk_event->state & GDK_CONTROL_MASK);
- event.m_altDown = (gdk_event->state & GDK_MOD1_MASK);
- event.m_metaDown = (gdk_event->state & GDK_MOD2_MASK);
- event.m_leftDown = (gdk_event->state & GDK_BUTTON1_MASK);
- event.m_middleDown = (gdk_event->state & GDK_BUTTON2_MASK);
- event.m_rightDown = (gdk_event->state & GDK_BUTTON3_MASK);
+ InitMouseEvent(win, event, gdk_event);
event.m_linesPerAction = 3;
event.m_wheelDelta = 120;
if (gdk_event->direction == GDK_SCROLL_UP)
else
event.m_wheelRotation = -120;
- wxPoint pt = win->GetClientAreaOrigin();
- event.m_x = (wxCoord)gdk_event->x - pt.x;
- event.m_y = (wxCoord)gdk_event->y - pt.y;
-
- event.SetEventObject( win );
- event.SetId( win->GetId() );
- event.SetTimestamp( gdk_event->time );
-
return win->GTKProcessEvent(event);
}
if (gdk_event->mode != GDK_CROSSING_NORMAL) return FALSE;
wxMouseEvent event( wxEVT_LEAVE_WINDOW );
- event.SetTimestamp( gdk_event->time );
- event.SetEventObject( win );
int x = 0;
int y = 0;
gdk_window_get_pointer( widget->window, &x, &y, &state );
- event.m_shiftDown = (state & GDK_SHIFT_MASK) != 0;
- event.m_controlDown = (state & GDK_CONTROL_MASK) != 0;
- event.m_altDown = (state & GDK_MOD1_MASK) != 0;
- event.m_metaDown = (state & GDK_MOD2_MASK) != 0;
- event.m_leftDown = (state & GDK_BUTTON1_MASK) != 0;
- event.m_middleDown = (state & GDK_BUTTON2_MASK) != 0;
- event.m_rightDown = (state & GDK_BUTTON3_MASK) != 0;
-
- wxPoint pt = win->GetClientAreaOrigin();
- event.m_x = x + pt.x;
- event.m_y = y + pt.y;
+ InitMouseEvent(win, event, gdk_event);
return win->GTKProcessEvent(event);
}
ms.SetLeftDown(mask & GDK_BUTTON1_MASK);
ms.SetMiddleDown(mask & GDK_BUTTON2_MASK);
ms.SetRightDown(mask & GDK_BUTTON3_MASK);
+ ms.SetAux1Down(mask & GDK_BUTTON4_MASK);
+ ms.SetAux2Down(mask & GDK_BUTTON5_MASK);
ms.SetControlDown(mask & GDK_CONTROL_MASK);
ms.SetShiftDown(mask & GDK_SHIFT_MASK);
g_signal_connect (gcombo->entry, "size_request",
G_CALLBACK (wxgtk_combo_size_request_callback),
this);
- }
- else
+ } else
#endif // wxUSE_COMBOBOX
#ifdef GTK_IS_FILE_CHOOSER_BUTTON
if (!gtk_check_version(2,6,0) && GTK_IS_FILE_CHOOSER_BUTTON(m_widget))
// then that control won't be sized properly when placed inside sizers
// (this can be tested removing this elseif and running XRC or WIDGETS samples)
// FIXME: what should be done here ?
- }
+ } else
#endif
- else if ( !IsTopLevel() ) // top level windows use their own callback
+ if ( !IsTopLevel() ) // top level windows use their own callback
{
// This is needed if we want to add our windows into native
// GTK controls, such as the toolbar. With this callback, the
}
else // navigate inside the container
{
- wxWindow *parent = wxGetTopLevelParent(this);
+ wxWindow *parent = wxGetTopLevelParent((wxWindow *)this);
wxCHECK_MSG( parent, false, _T("every window must have a TLW parent") );
GtkDirectionType dir;