org.eclipse.swt.widgets.Composite.parentingHandle()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(11.4k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中org.eclipse.swt.widgets.Composite.parentingHandle()方法的一些代码示例,展示了Composite.parentingHandle()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Composite.parentingHandle()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Composite
类名称:Composite
方法名:parentingHandle

Composite.parentingHandle介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

void showWidget () {
  // Comment this line to disable zero-sized widgets
  state |= ZERO_WIDTH | ZERO_HEIGHT;
  int /*long*/ topHandle = topHandle ();
  int /*long*/ parentHandle = parent.parentingHandle ();
  parent.setParentWindow (topHandle);
  OS.gtk_container_add (parentHandle, topHandle);
  if (handle != 0 && handle != topHandle) OS.gtk_widget_show (handle);
  if ((state & (ZERO_WIDTH | ZERO_HEIGHT)) == 0) {
    if (fixedHandle != 0) OS.gtk_widget_show (fixedHandle);
  }
  if (fixedHandle != 0) fixStyle (fixedHandle);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

void showWidget () {
  // Comment this line to disable zero-sized widgets
  state |= ZERO_WIDTH | ZERO_HEIGHT;
  long /*int*/ topHandle = topHandle ();
  long /*int*/ parentHandle = parent.parentingHandle ();
  parent.setParentWindow (topHandle);
  OS.gtk_container_add (parentHandle, topHandle);
  if (handle != 0 && handle != topHandle) OS.gtk_widget_show (handle);
  if ((state & (ZERO_WIDTH | ZERO_HEIGHT)) == 0) {
    if (fixedHandle != 0) OS.gtk_widget_show (fixedHandle);
  }
  if (fixedHandle != 0) fixStyle (fixedHandle);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

void showWidget () {
  // Comment this line to disable zero-sized widgets
  state |= ZERO_WIDTH | ZERO_HEIGHT;
  int /*long*/ topHandle = topHandle ();
  int /*long*/ parentHandle = parent.parentingHandle ();
  parent.setParentWindow (topHandle);
  OS.gtk_container_add (parentHandle, topHandle);
  if (handle != 0 && handle != topHandle) OS.gtk_widget_show (handle);
  if ((state & (ZERO_WIDTH | ZERO_HEIGHT)) == 0) {
    if (fixedHandle != 0) OS.gtk_widget_show (fixedHandle);
  }
  if (fixedHandle != 0) fixStyle (fixedHandle);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

Control [] _getChildren () {
  int /*long*/ parentHandle = parentingHandle ();
  int /*long*/ list = OS.gtk_container_get_children (parentHandle);
  if (list == 0) return new Control [0];
  int count = OS.g_list_length (list);
  Control [] children = new Control [count];
  int i = 0;
  int /*long*/ temp = list;
  while (temp != 0) {
    int /*long*/ handle = OS.g_list_data (temp);
    if (handle != 0) {
      Widget widget = display.getWidget (handle);
      if (widget != null && widget != this) {
        if (widget instanceof Control) {
          children [i++] = (Control) widget;
        }
      }
    }
    temp = OS.g_list_next (temp);
  }
  OS.g_list_free (list);
  if (i == count) return children;
  Control [] newChildren = new Control [i];
  System.arraycopy (children, 0, newChildren, 0, i);
  return newChildren;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

Control [] _getChildren () {
  long /*int*/ parentHandle = parentingHandle ();
  long /*int*/ list = OS.gtk_container_get_children (parentHandle);
  if (list == 0) return new Control [0];
  int count = OS.g_list_length (list);
  Control [] children = new Control [count];
  int i = 0;
  long /*int*/ temp = list;
  while (temp != 0) {
    long /*int*/ handle = OS.g_list_data (temp);
    if (handle != 0) {
      Widget widget = display.getWidget (handle);
      if (widget != null && widget != this) {
        if (widget instanceof Control) {
          children [i++] = (Control) widget;
        }
      }
    }
    temp = OS.g_list_next (temp);
  }
  OS.g_list_free (list);
  if (i == count) return children;
  Control [] newChildren = new Control [i];
  System.arraycopy (children, 0, newChildren, 0, i);
  return newChildren;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

Control [] _getChildren () {
  int /*long*/ parentHandle = parentingHandle ();
  int /*long*/ list = OS.gtk_container_get_children (parentHandle);
  if (list == 0) return new Control [0];
  int count = OS.g_list_length (list);
  Control [] children = new Control [count];
  int i = 0;
  int /*long*/ temp = list;
  while (temp != 0) {
    int /*long*/ handle = OS.g_list_data (temp);
    if (handle != 0) {
      Widget widget = display.getWidget (handle);
      if (widget != null && widget != this) {
        if (widget instanceof Control) {
          children [i++] = (Control) widget;
        }
      }
    }
    temp = OS.g_list_next (temp);
  }
  OS.g_list_free (list);
  if (i == count) return children;
  Control [] newChildren = new Control [i];
  System.arraycopy (children, 0, newChildren, 0, i);
  return newChildren;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

void setRelations () {
  int /*long*/ parentHandle = parent.parentingHandle ();
  int /*long*/ list = OS.gtk_container_get_children (parentHandle);
  if (list == 0) return;
  int count = OS.g_list_length (list);
  if (count > 1) {
    /*
     * the receiver is the last item in the list, so its predecessor will
     * be the second-last item in the list
     */
    int /*long*/ handle = OS.g_list_nth_data (list, count - 2);
    if (handle != 0) {
      Widget widget = display.getWidget (handle);
      if (widget != null && widget != this) {
        if (widget instanceof Control) {
          Control sibling = (Control)widget;
          sibling.addRelation (this);
        }
      }
    }
  }
  OS.g_list_free (list);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

void moveHandle (int x, int y) {
  int /*long*/ topHandle = topHandle ();
  int /*long*/ parentHandle = parent.parentingHandle ();
  if (OS.GTK3) {
    OS.swt_fixed_move (parentHandle, topHandle, x, y);
  } else {
    /*
    * Feature in GTK.  Calling gtk_fixed_move() to move a child causes
    * the whole parent to redraw.  This is a performance problem. The
    * fix is temporarily mark the parent not visible during the move.
    *
    * NOTE: Because every widget in SWT has an X window, the new and
    * old bounds of the child are correctly redrawn.
    *
    * NOTE: There is no API in GTK 3 to only set the GTK_VISIBLE bit.
    */
    boolean reset = OS.gtk_widget_get_visible (parentHandle);
    gtk_widget_set_visible (parentHandle, false);
    OS.gtk_fixed_move (parentHandle, topHandle, x, y);
    gtk_widget_set_visible (parentHandle, reset);
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

void moveHandle (int x, int y) {
  long /*int*/ topHandle = topHandle ();
  long /*int*/ parentHandle = parent.parentingHandle ();
  if (OS.GTK3) {
    OS.swt_fixed_move (parentHandle, topHandle, x, y);
  } else {
    /*
    * Feature in GTK.  Calling gtk_fixed_move() to move a child causes
    * the whole parent to redraw.  This is a performance problem. The
    * fix is temporarily mark the parent not visible during the move.
    *
    * NOTE: Because every widget in SWT has an X window, the new and
    * old bounds of the child are correctly redrawn.
    *
    * NOTE: There is no API in GTK 3 to only set the GTK_VISIBLE bit.
    */
    boolean reset = OS.gtk_widget_get_visible (parentHandle);
    gtk_widget_set_visible (parentHandle, false);
    OS.gtk_fixed_move (parentHandle, topHandle, x, y);
    gtk_widget_set_visible (parentHandle, reset);
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

void moveHandle (int x, int y) {
  int /*long*/ topHandle = topHandle ();
  int /*long*/ parentHandle = parent.parentingHandle ();
  if (OS.GTK3) {
    OS.swt_fixed_move (parentHandle, topHandle, x, y);
  } else {
    /*
    * Feature in GTK.  Calling gtk_fixed_move() to move a child causes
    * the whole parent to redraw.  This is a performance problem. The
    * fix is temporarily mark the parent not visible during the move.
    *
    * NOTE: Because every widget in SWT has an X window, the new and
    * old bounds of the child are correctly redrawn.
    *
    * NOTE: There is no API in GTK 3 to only set the GTK_VISIBLE bit.
    */
    boolean reset = OS.gtk_widget_get_visible (parentHandle);
    gtk_widget_set_visible (parentHandle, false);
    OS.gtk_fixed_move (parentHandle, topHandle, x, y);
    gtk_widget_set_visible (parentHandle, reset);
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

void setRelations () {
  long /*int*/ parentHandle = parent.parentingHandle ();
  long /*int*/ list = OS.gtk_container_get_children (parentHandle);
  if (list == 0) return;
  int count = OS.g_list_length (list);
  if (count > 1) {
    /*
     * the receiver is the last item in the list, so its predecessor will
     * be the second-last item in the list
     */
    long /*int*/ handle = OS.g_list_nth_data (list, count - 2);
    if (handle != 0) {
      Widget widget = display.getWidget (handle);
      if (widget != null && widget != this) {
        if (widget instanceof Control) {
          Control sibling = (Control)widget;
          sibling.addRelation (this);
        }
      }
    }
  }
  OS.g_list_free (list);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

void setRelations () {
  int /*long*/ parentHandle = parent.parentingHandle ();
  int /*long*/ list = OS.gtk_container_get_children (parentHandle);
  if (list == 0) return;
  int count = OS.g_list_length (list);
  if (count > 1) {
    /*
     * the receiver is the last item in the list, so its predecessor will
     * be the second-last item in the list
     */
    int /*long*/ handle = OS.g_list_nth_data (list, count - 2);
    if (handle != 0) {
      Widget widget = display.getWidget (handle);
      if (widget != null && widget != this) {
        if (widget instanceof Control) {
          Control sibling = (Control)widget;
          sibling.addRelation (this);
        }
      }
    }
  }
  OS.g_list_free (list);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

void fixZOrder () {
  if ((state & CANVAS) != 0) return;
  long /*int*/ parentHandle = parentingHandle ();
  long /*int*/ parentWindow = gtk_widget_get_window (parentHandle);
  if (parentWindow == 0) return;
  long /*int*/ [] userData = new long /*int*/ [1];
  long /*int*/ windowList = OS.gdk_window_get_children (parentWindow);
  if (windowList != 0) {
    long /*int*/ windows = windowList;
    while (windows != 0) {
      long /*int*/ window = OS.g_list_data (windows);
      if (window != redrawWindow) {
        OS.gdk_window_get_user_data (window, userData);
        if (userData [0] == 0 || OS.G_OBJECT_TYPE (userData [0]) != display.gtk_fixed_get_type ()) {
          OS.gdk_window_lower (window);
        }
      }
      windows = OS.g_list_next (windows);
    }
    OS.g_list_free (windowList);
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

void fixZOrder () {
  if ((state & CANVAS) != 0) return;
  int /*long*/ parentHandle = parentingHandle ();
  int /*long*/ parentWindow = gtk_widget_get_window (parentHandle);
  if (parentWindow == 0) return;
  int /*long*/ [] userData = new int /*long*/ [1];
  int /*long*/ windowList = OS.gdk_window_get_children (parentWindow);
  if (windowList != 0) {
    int /*long*/ windows = windowList;
    while (windows != 0) {
      int /*long*/ window = OS.g_list_data (windows);
      if (window != redrawWindow) {
        OS.gdk_window_get_user_data (window, userData);
        if (userData [0] == 0 || OS.G_OBJECT_TYPE (userData [0]) != display.gtk_fixed_get_type ()) {
          OS.gdk_window_lower (window);
        }
      }
      windows = OS.g_list_next (windows);
    }
    OS.g_list_free (windowList);
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

void fixZOrder () {
  if ((state & CANVAS) != 0) return;
  int /*long*/ parentHandle = parentingHandle ();
  int /*long*/ parentWindow = gtk_widget_get_window (parentHandle);
  if (parentWindow == 0) return;
  int /*long*/ [] userData = new int /*long*/ [1];
  int /*long*/ windowList = OS.gdk_window_get_children (parentWindow);
  if (windowList != 0) {
    int /*long*/ windows = windowList;
    while (windows != 0) {
      int /*long*/ window = OS.g_list_data (windows);
      if (window != redrawWindow) {
        OS.gdk_window_get_user_data (window, userData);
        if (userData [0] == 0 || OS.G_OBJECT_TYPE (userData [0]) != display.gtk_fixed_get_type ()) {
          OS.gdk_window_lower (window);
        }
      }
      windows = OS.g_list_next (windows);
    }
    OS.g_list_free (windowList);
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

void moveAbove (int /*long*/ child, int /*long*/ sibling) {
  if (child == sibling) return;
  int /*long*/ parentHandle = parentingHandle ();
  if (OS.GTK3) {
    OS.swt_fixed_restack (parentHandle, child, sibling, true);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

void moveAbove (int /*long*/ child, int /*long*/ sibling) {
  if (child == sibling) return;
  int /*long*/ parentHandle = parentingHandle ();
  if (OS.GTK3) {
    OS.swt_fixed_restack (parentHandle, child, sibling, true);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

void moveAbove (long /*int*/ child, long /*int*/ sibling) {
  if (child == sibling) return;
  long /*int*/ parentHandle = parentingHandle ();
  if (OS.GTK3) {
    OS.swt_fixed_restack (parentHandle, child, sibling, true);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

void moveBelow (int /*long*/ child, int /*long*/ sibling) {
  if (child == sibling) return;
  int /*long*/ parentHandle = parentingHandle ();
  if (sibling == 0 && parentHandle == fixedHandle) {
    moveAbove (child, scrolledHandle != 0  ? scrolledHandle : handle);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

void moveBelow (int /*long*/ child, int /*long*/ sibling) {
  if (child == sibling) return;
  int /*long*/ parentHandle = parentingHandle ();
  if (sibling == 0 && parentHandle == fixedHandle) {
    moveAbove (child, scrolledHandle != 0  ? scrolledHandle : handle);

相关文章

Composite类方法