@Override int hit(Theme theme, Point position, Rectangle bounds) { if (!bounds.contains(position)) return DrawData.WIDGET_NOWHERE; if ((style & SWT.DROP_DOWN) != 0) { int /*long*/ buttonHandle = theme.buttonHandle; int /*long*/ gtkStyle = gtk_widget_get_style (buttonHandle); int xthickness = OS.gtk_style_get_xthickness(gtkStyle); int interior_focus = theme.getWidgetProperty(buttonHandle, "interior-focus"); int focus_line_width = theme.getWidgetProperty(buttonHandle, "focus-line-width"); int focus_padding = theme.getWidgetProperty(buttonHandle, "focus-padding"); int arrow_width = ARROW_WIDTH; int arrow_x = bounds.x + bounds.width - arrow_width - xthickness - focus_padding; if (interior_focus == 0) arrow_x -= focus_line_width; if (arrow_x <= position.x) return DrawData.TOOLITEM_ARROW; } return DrawData.WIDGET_WHOLE; }
@Override Rectangle computeTrim(Theme theme, GC gc) { int /*long*/ buttonHandle = theme.buttonHandle; int /*long*/ gtkStyle = gtk_widget_get_style(buttonHandle); int focus_width = theme.getWidgetProperty(buttonHandle, "focus-line-width"); int focus_padding = theme.getWidgetProperty(buttonHandle, "focus-padding"); int xthickness = OS.gtk_style_get_xthickness(gtkStyle); int ythickness = OS.gtk_style_get_ythickness(gtkStyle); int borderX = xthickness + focus_width + focus_padding; int borderY = ythickness + focus_width + focus_padding; int x = clientArea.x - borderX; int y = clientArea.y - borderY; int width = clientArea.width + 2 * borderX; int height = clientArea.height + 2 * borderY; if ((style & SWT.DROP_DOWN) != 0) { width += ARROW_WIDTH; } return new Rectangle(x, y, width, height); }
@Override int hit(Theme theme, Point position, Rectangle bounds) { if (!bounds.contains(position)) return DrawData.WIDGET_NOWHERE; if ((style & SWT.DROP_DOWN) != 0) { int /*long*/ buttonHandle = theme.buttonHandle; int /*long*/ gtkStyle = gtk_widget_get_style (buttonHandle); int xthickness = OS.gtk_style_get_xthickness(gtkStyle); int interior_focus = theme.getWidgetProperty(buttonHandle, "interior-focus"); int focus_line_width = theme.getWidgetProperty(buttonHandle, "focus-line-width"); int focus_padding = theme.getWidgetProperty(buttonHandle, "focus-padding"); int arrow_width = ARROW_WIDTH; int arrow_x = bounds.x + bounds.width - arrow_width - xthickness - focus_padding; if (interior_focus == 0) arrow_x -= focus_line_width; if (arrow_x <= position.x) return DrawData.TOOLITEM_ARROW; } return DrawData.WIDGET_WHOLE; }
@Override int hit(Theme theme, Point position, Rectangle bounds) { if (!bounds.contains(position)) return DrawData.WIDGET_NOWHERE; if ((style & SWT.DROP_DOWN) != 0) { long /*int*/ buttonHandle = theme.buttonHandle; long /*int*/ gtkStyle = gtk_widget_get_style (buttonHandle); int xthickness = OS.gtk_style_get_xthickness(gtkStyle); int interior_focus = theme.getWidgetProperty(buttonHandle, "interior-focus"); int focus_line_width = theme.getWidgetProperty(buttonHandle, "focus-line-width"); int focus_padding = theme.getWidgetProperty(buttonHandle, "focus-padding"); int arrow_width = ARROW_WIDTH; int arrow_x = bounds.x + bounds.width - arrow_width - xthickness - focus_padding; if (interior_focus == 0) arrow_x -= focus_line_width; if (arrow_x <= position.x) return DrawData.TOOLITEM_ARROW; } return DrawData.WIDGET_WHOLE; }
@Override Rectangle computeTrim(Theme theme, GC gc) { int /*long*/ buttonHandle = theme.buttonHandle; int /*long*/ gtkStyle = gtk_widget_get_style(buttonHandle); int focus_width = theme.getWidgetProperty(buttonHandle, "focus-line-width"); int focus_padding = theme.getWidgetProperty(buttonHandle, "focus-padding"); int xthickness = OS.gtk_style_get_xthickness(gtkStyle); int ythickness = OS.gtk_style_get_ythickness(gtkStyle); int borderX = xthickness + focus_width + focus_padding; int borderY = ythickness + focus_width + focus_padding; int x = clientArea.x - borderX; int y = clientArea.y - borderY; int width = clientArea.width + 2 * borderX; int height = clientArea.height + 2 * borderY; if ((style & SWT.DROP_DOWN) != 0) { width += ARROW_WIDTH; } return new Rectangle(x, y, width, height); }
@Override Rectangle computeTrim(Theme theme, GC gc) { long /*int*/ buttonHandle = theme.buttonHandle; long /*int*/ gtkStyle = gtk_widget_get_style(buttonHandle); int focus_width = theme.getWidgetProperty(buttonHandle, "focus-line-width"); int focus_padding = theme.getWidgetProperty(buttonHandle, "focus-padding"); int xthickness = OS.gtk_style_get_xthickness(gtkStyle); int ythickness = OS.gtk_style_get_ythickness(gtkStyle); int borderX = xthickness + focus_width + focus_padding; int borderY = ythickness + focus_width + focus_padding; int x = clientArea.x - borderX; int y = clientArea.y - borderY; int width = clientArea.width + 2 * borderX; int height = clientArea.height + 2 * borderY; if ((style & SWT.DROP_DOWN) != 0) { width += ARROW_WIDTH; } return new Rectangle(x, y, width, height); }
int /*long*/ separatorHandle = theme.separatorHandle; byte[] detail = Converter.wcsToMbcs(null, "vseparator", true); int /*long*/ gtkStyle = gtk_widget_get_style (separatorHandle); theme.transferClipping(gc, gtkStyle); if ((parent.style & SWT.VERTICAL) != 0) { int /*long*/ gtkStyle = gtk_widget_get_style (buttonHandle); theme.transferClipping (gc, gtkStyle); int focus_line_width = theme.getWidgetProperty(buttonHandle, "focus-line-width");
int /*long*/ separatorHandle = theme.separatorHandle; byte[] detail = Converter.wcsToMbcs(null, "vseparator", true); int /*long*/ gtkStyle = gtk_widget_get_style (separatorHandle); theme.transferClipping(gc, gtkStyle); if ((parent.style & SWT.VERTICAL) != 0) { int /*long*/ gtkStyle = gtk_widget_get_style (buttonHandle); theme.transferClipping (gc, gtkStyle); int focus_line_width = theme.getWidgetProperty(buttonHandle, "focus-line-width");
long /*int*/ separatorHandle = theme.separatorHandle; byte[] detail = Converter.wcsToMbcs(null, "vseparator", true); long /*int*/ gtkStyle = gtk_widget_get_style (separatorHandle); theme.transferClipping(gc, gtkStyle); if ((parent.style & SWT.VERTICAL) != 0) { long /*int*/ gtkStyle = gtk_widget_get_style (buttonHandle); theme.transferClipping (gc, gtkStyle); int focus_line_width = theme.getWidgetProperty(buttonHandle, "focus-line-width");