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

x33g5p2x  于2022-01-30 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(182)

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

Scale.gtk_scale_new介绍

暂无

代码示例

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

@Override
void createHandle (int index) {
  state |= HANDLE | THEME_BACKGROUND;
  fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
  if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
  OS.gtk_widget_set_has_window (fixedHandle, true);
  int /*long*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0);
  if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES);
  if ((style & SWT.HORIZONTAL) != 0) {
    handle = gtk_scale_new (OS.GTK_ORIENTATION_HORIZONTAL, hAdjustment);
  } else {
    handle = gtk_scale_new (OS.GTK_ORIENTATION_VERTICAL, hAdjustment);
  }
  if (handle == 0) error (SWT.ERROR_NO_HANDLES);
  OS.gtk_container_add (fixedHandle, handle);
  OS.gtk_scale_set_digits (handle, 0);
  OS.gtk_scale_set_draw_value (handle, false);
}

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

@Override
void createHandle (int index) {
  state |= HANDLE | THEME_BACKGROUND;
  fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
  if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
  OS.gtk_widget_set_has_window (fixedHandle, true);
  long /*int*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0);
  if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES);
  if ((style & SWT.HORIZONTAL) != 0) {
    handle = gtk_scale_new (OS.GTK_ORIENTATION_HORIZONTAL, hAdjustment);
  } else {
    handle = gtk_scale_new (OS.GTK_ORIENTATION_VERTICAL, hAdjustment);
  }
  if (handle == 0) error (SWT.ERROR_NO_HANDLES);
  OS.gtk_container_add (fixedHandle, handle);
  OS.gtk_scale_set_digits (handle, 0);
  OS.gtk_scale_set_draw_value (handle, false);
}

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

@Override
void createHandle (int index) {
  state |= HANDLE | THEME_BACKGROUND;
  fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
  if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
  OS.gtk_widget_set_has_window (fixedHandle, true);
  int /*long*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0);
  if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES);
  if ((style & SWT.HORIZONTAL) != 0) {
    handle = gtk_scale_new (OS.GTK_ORIENTATION_HORIZONTAL, hAdjustment);
  } else {
    handle = gtk_scale_new (OS.GTK_ORIENTATION_VERTICAL, hAdjustment);
  }
  if (handle == 0) error (SWT.ERROR_NO_HANDLES);
  OS.gtk_container_add (fixedHandle, handle);
  OS.gtk_scale_set_digits (handle, 0);
  OS.gtk_scale_set_draw_value (handle, false);
}

相关文章