boolean setRadioSelection (boolean value) { if ((style & SWT.RADIO) == 0) return false; if (getSelection () != value) { setSelection (value); sendSelectionEvent (SWT.Selection); } return true; }
boolean setRadioSelection (boolean value) { if ((style & SWT.RADIO) == 0) return false; if (getSelection () != value) { setSelection (value); sendSelectionEvent (SWT.Selection); } return true; }
boolean setRadioSelection (boolean value) { if ((style & SWT.RADIO) == 0) return false; if (getSelection () != value) { setSelection (value); sendSelectionEvent (SWT.Selection); } return true; }
boolean setRadioSelection (boolean value) { if ((style & SWT.RADIO) == 0) return false; if (getSelection () != value) { setSelection (value); sendSelectionEvent (SWT.Selection); } return true; }
LRESULT wmCommandChild (int /*long*/ wParam, int /*long*/ lParam) { if ((style & SWT.RADIO) != 0) { if ((parent.getStyle () & SWT.NO_RADIO_GROUP) == 0) { selectRadio (); } } sendSelectionEvent (SWT.Selection); return null; }
boolean setRadioSelection (boolean value) { if ((style & SWT.RADIO) == 0) return false; if (getSelection () != value) { setSelection (value); sendSelectionEvent (SWT.Selection); } return true; }
boolean handleKeyDown() { if ((style & SWT.DROP_DOWN) != 0) { NSRect frame = view.frame(); Event event = new Event (); event.detail = SWT.ARROW; event.x = (int)frame.x; event.y = (int)(frame.y + frame.height); sendSelectionEvent (SWT.Selection, event, false); return true; } else { return false; } }
void sendSelection () { if ((style & SWT.RADIO) != 0) { if ((parent.getStyle () & SWT.NO_RADIO_GROUP) == 0) { selectRadio (); } } if ((style & SWT.CHECK) != 0) setSelection (!getSelection ()); sendSelectionEvent (SWT.Selection); }
void mouseDown(long /*int*/ id, long /*int*/ sel, long /*int*/ theEvent) { if (!parent.mouseEvent(parent.view.id, sel, theEvent, SWT.MouseDown)) return; Display display = this.display; display.trackingControl = parent; super.mouseDown(id, sel, theEvent); display.trackingControl = null; if ((style & SWT.DROP_DOWN) != 0 && id == view.id) { NSRect frame = view.frame(); Event event = new Event (); event.detail = SWT.ARROW; event.x = (int)frame.x; event.y = (int)(frame.y + frame.height); sendSelectionEvent (SWT.Selection, event, false); } }
long /*int*/ menuItemSelected (long /*int*/ widget, ToolItem item) { Event event = new Event (); switch (item.style) { case SWT.DROP_DOWN : /* * Feature in GTK. The DROP_DOWN item does not * contain arrow button in the overflow menu. So, it * is impossible to select the menu of that item. * The fix is to consider the item selection * as Arrow click, in order to popup the drop-down. */ event.detail = SWT.ARROW; GtkAllocation allocation = new GtkAllocation (); OS.gtk_widget_get_allocation (widget, allocation); event.x = DPIUtil.autoScaleDown(allocation.x); if ((style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (getClientWidth () - allocation.width) - event.x; event.y = DPIUtil.autoScaleDown(allocation.y + allocation.height); break; case SWT.RADIO : if ((style & SWT.NO_RADIO_GROUP) == 0) item.selectRadio (); break; case SWT.CHECK : boolean currentSelection = item.getSelection(); item.setSelection (!currentSelection); } item.sendSelectionEvent (SWT.Selection, event, false); return 0; }
int /*long*/ menuItemSelected (int /*long*/ widget, ToolItem item) { Event event = new Event (); switch (item.style) { case SWT.DROP_DOWN : /* * Feature in GTK. The DROP_DOWN item does not * contain arrow button in the overflow menu. So, it * is impossible to select the menu of that item. * The fix is to consider the item selection * as Arrow click, in order to popup the drop-down. */ event.detail = SWT.ARROW; GtkAllocation allocation = new GtkAllocation (); OS.gtk_widget_get_allocation (widget, allocation); event.x = DPIUtil.autoScaleDown(allocation.x); if ((style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (getClientWidth () - allocation.width) - event.x; event.y = DPIUtil.autoScaleDown(allocation.y + allocation.height); break; case SWT.RADIO : if ((style & SWT.NO_RADIO_GROUP) == 0) item.selectRadio (); break; case SWT.CHECK : boolean currentSelection = item.getSelection(); item.setSelection (!currentSelection); } item.sendSelectionEvent (SWT.Selection, event, false); return 0; }
int /*long*/ menuItemSelected (int /*long*/ widget, ToolItem item) { Event event = new Event (); switch (item.style) { case SWT.DROP_DOWN : /* * Feature in GTK. The DROP_DOWN item does not * contain arrow button in the overflow menu. So, it * is impossible to select the menu of that item. * The fix is to consider the item selection * as Arrow click, in order to popup the drop-down. */ event.detail = SWT.ARROW; GtkAllocation allocation = new GtkAllocation (); OS.gtk_widget_get_allocation (widget, allocation); event.x = DPIUtil.autoScaleDown(allocation.x); if ((style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (getClientWidth () - allocation.width) - event.x; event.y = DPIUtil.autoScaleDown(allocation.y + allocation.height); break; case SWT.RADIO : if ((style & SWT.NO_RADIO_GROUP) == 0) item.selectRadio (); break; case SWT.CHECK : boolean currentSelection = item.getSelection(); item.setSelection (!currentSelection); } item.sendSelectionEvent (SWT.Selection, event, false); return 0; }
sendSelectionEvent (SWT.Selection, event, false); return 0;
sendSelectionEvent (SWT.Selection, event, false); return 0;
sendSelectionEvent (SWT.Selection, event, false); return 0;
OS.SendMessage (handle, OS.TB_GETITEMRECT, index, rect); event.setLocationInPixels(rect.left, rect.bottom); child.sendSelectionEvent (SWT.Selection, event, false);