wxListBox mouse events now report coords relative

to the whole list box.
  wxRadioButton doesn't emit any event when unpressed.
  Similar correction to wxRadioBox and wxToggleButton.
  Upported change to wxMenuEvent so that the id is
     set in the constructor. Otherwise the EVT_MENU
     macro is pretty useless. Already in 2.2.8.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2001-11-08 23:24:16 +00:00
parent 6433f6d316
commit e2762ff06a
13 changed files with 101 additions and 73 deletions

View File

@@ -1333,6 +1333,14 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
event.m_y = (wxCoord)gdk_event->y;
AdjustEventButtonState(event);
// wxListBox actually get mouse events from the item
if (win->m_isListBox)
{
event.m_x += widget->allocation.x;
event.m_y += widget->allocation.y;
}
// Some control don't have their own X window and thus cannot get
// any events.
@@ -1466,6 +1474,14 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
AdjustEventButtonState(event);
// wxListBox actually get mouse events from the item
if (win->m_isListBox)
{
event.m_x += widget->allocation.x;
event.m_y += widget->allocation.y;
}
// Some control don't have their own X window and thus cannot get
// any events.
@@ -2366,6 +2382,7 @@ void wxWindowGTK::Init()
m_isStaticBox = FALSE;
m_isRadioButton = FALSE;
m_isListBox = FALSE;
m_isFrame = FALSE;
m_acceptsFocus = FALSE;