@Override void draw(Theme theme, GC gc, Rectangle bounds) { long /*int*/ notebookHandle = theme.notebookHandle; long /*int*/ gtkStyle = gtk_widget_get_style (notebookHandle); long /*int*/ drawable = OS.GTK3 ? gc.getGCData().cairo : gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; height -= tabsHeight; int gap_x = selectedX, gap_width = selectedWidth, gap_side = OS.GTK_POS_TOP; if ((style & SWT.BOTTOM) != 0) { gap_side = OS.GTK_POS_BOTTOM; } else { y += tabsHeight; } byte[] detail = Converter.wcsToMbcs(null, "notebook", true); gtk_render_frame_gap (gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_OUT, null, notebookHandle, detail, x, y, width, height, gap_side, gap_x, gap_width); if (tabsArea != null) { tabsArea.x = bounds.x; tabsArea.y = bounds.y; tabsArea.width = bounds.width; tabsArea.height = tabsHeight; if ((style & SWT.BOTTOM) != 0) { tabsArea.y += bounds.height - tabsHeight; } } }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) { int /*long*/ hTheme = OS.OpenThemeData(0, getClassId()); RECT rect = new RECT (); rect.left = bounds.x; rect.right = bounds.x + bounds.width; rect.top = bounds.y; if ((style & SWT.BOTTOM) != 0) { rect.bottom = bounds.y + bounds.height - tabsHeight; } else { rect.top += tabsHeight; rect.bottom = bounds.y + bounds.height; } int[] part = getPartId(DrawData.WIDGET_WHOLE); OS.DrawThemeBackground (hTheme, gc.handle, part[0], part[1], rect, null); OS.CloseThemeData(hTheme); if (tabsArea != null) { tabsArea.x = bounds.x; tabsArea.y = bounds.y; tabsArea.width = bounds.width; tabsArea.height = tabsHeight; if ((style & SWT.BOTTOM) != 0) { tabsArea.y += bounds.height - tabsHeight; } } } }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { int /*long*/ notebookHandle = theme.notebookHandle; int /*long*/ gtkStyle = gtk_widget_get_style (notebookHandle); int /*long*/ drawable = OS.GTK3 ? gc.getGCData().cairo : gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; height -= tabsHeight; int gap_x = selectedX, gap_width = selectedWidth, gap_side = OS.GTK_POS_TOP; if ((style & SWT.BOTTOM) != 0) { gap_side = OS.GTK_POS_BOTTOM; } else { y += tabsHeight; } byte[] detail = Converter.wcsToMbcs(null, "notebook", true); gtk_render_frame_gap (gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_OUT, null, notebookHandle, detail, x, y, width, height, gap_side, gap_x, gap_width); if (tabsArea != null) { tabsArea.x = bounds.x; tabsArea.y = bounds.y; tabsArea.width = bounds.width; tabsArea.height = tabsHeight; if ((style & SWT.BOTTOM) != 0) { tabsArea.y += bounds.height - tabsHeight; } } }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { int /*long*/ notebookHandle = theme.notebookHandle; int /*long*/ gtkStyle = gtk_widget_get_style (notebookHandle); int /*long*/ drawable = OS.GTK3 ? gc.getGCData().cairo : gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height; height -= tabsHeight; int gap_x = selectedX, gap_width = selectedWidth, gap_side = OS.GTK_POS_TOP; if ((style & SWT.BOTTOM) != 0) { gap_side = OS.GTK_POS_BOTTOM; } else { y += tabsHeight; } byte[] detail = Converter.wcsToMbcs(null, "notebook", true); gtk_render_frame_gap (gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_OUT, null, notebookHandle, detail, x, y, width, height, gap_side, gap_x, gap_width); if (tabsArea != null) { tabsArea.x = bounds.x; tabsArea.y = bounds.y; tabsArea.width = bounds.width; tabsArea.height = tabsHeight; if ((style & SWT.BOTTOM) != 0) { tabsArea.y += bounds.height - tabsHeight; } } }