示例#1
0
 @Override
 boolean forceFocus(long /*int*/ focusHandle) {
   int dir = OS.GTK_DIR_TAB_FORWARD;
   if ((style & SWT.MIRRORED) != 0) dir = OS.GTK_DIR_TAB_BACKWARD;
   long /*int*/ childHandle = handle;
   if (currentFocusItem != null) childHandle = currentFocusItem.handle;
   /*
    * Feature in GTK. GtkToolBar takes care of navigating through
    * items by Up/Down arrow keys.
    */
   if (OS.gtk_widget_child_focus(childHandle, dir)) return true;
   return super.forceFocus(focusHandle);
 }
示例#2
0
 boolean setFocus() {
   return OS.gtk_widget_child_focus(handle, OS.GTK_DIR_TAB_FORWARD);
 }