@Override int hit(Theme theme, Point position, Rectangle bounds) { if (!bounds.contains(position)) return DrawData.WIDGET_NOWHERE; long /*int*/ buttonHandle = theme.buttonHandle; long /*int*/ gtkStyle = gtk_widget_get_style(buttonHandle); 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 xthickness = OS.gtk_style_get_xthickness(gtkStyle); // int ythickness = OS.gtk_style_get_xthickness(gtkStyle); int arrow_width = MIN_ARROW_SIZE; int x_border = xthickness + focus_padding; //int y_border = ythickness + focus_padding; if (interior_focus == 0) { x_border += focus_line_width; //y_border += focus_line_width; } int arrow_button_width = arrow_width + x_border * 2; int arrow_button_x = bounds.x + bounds.width - arrow_button_width; Rectangle arrowRect = new Rectangle(arrow_button_x, bounds.y, arrow_button_width, bounds.height); if (arrowRect.contains(position)) return DrawData.COMBO_ARROW; return DrawData.WIDGET_WHOLE; }
@Override int hit(Theme theme, Point position, Rectangle bounds) { if (!bounds.contains(position)) return DrawData.WIDGET_NOWHERE; int /*long*/ buttonHandle = theme.buttonHandle; int /*long*/ gtkStyle = gtk_widget_get_style(buttonHandle); 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 xthickness = OS.gtk_style_get_xthickness(gtkStyle); // int ythickness = OS.gtk_style_get_xthickness(gtkStyle); int arrow_width = MIN_ARROW_SIZE; int x_border = xthickness + focus_padding; //int y_border = ythickness + focus_padding; if (interior_focus == 0) { x_border += focus_line_width; //y_border += focus_line_width; } int arrow_button_width = arrow_width + x_border * 2; int arrow_button_x = bounds.x + bounds.width - arrow_button_width; Rectangle arrowRect = new Rectangle(arrow_button_x, bounds.y, arrow_button_width, bounds.height); if (arrowRect.contains(position)) return DrawData.COMBO_ARROW; return DrawData.WIDGET_WHOLE; }
@Override int hit(Theme theme, Point position, Rectangle bounds) { if (!bounds.contains(position)) return DrawData.WIDGET_NOWHERE; int /*long*/ buttonHandle = theme.buttonHandle; int /*long*/ gtkStyle = gtk_widget_get_style(buttonHandle); 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 xthickness = OS.gtk_style_get_xthickness(gtkStyle); // int ythickness = OS.gtk_style_get_xthickness(gtkStyle); int arrow_width = MIN_ARROW_SIZE; int x_border = xthickness + focus_padding; //int y_border = ythickness + focus_padding; if (interior_focus == 0) { x_border += focus_line_width; //y_border += focus_line_width; } int arrow_button_width = arrow_width + x_border * 2; int arrow_button_x = bounds.x + bounds.width - arrow_button_width; Rectangle arrowRect = new Rectangle(arrow_button_x, bounds.y, arrow_button_width, bounds.height); if (arrowRect.contains(position)) return DrawData.COMBO_ARROW; return DrawData.WIDGET_WHOLE; }
@Override void draw(Theme theme, GC gc, Rectangle bounds) { int /*long*/ buttonHandle = theme.buttonHandle; int /*long*/ gtkStyle = gtk_widget_get_style(buttonHandle); int /*long*/ drawable = gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); gtkStyle = gtk_widget_get_style(entryHandle); theme.transferClipping(gc, gtkStyle); state_type = getStateType(DrawData.WIDGET_WHOLE);
@Override void draw(Theme theme, GC gc, Rectangle bounds) { int /*long*/ buttonHandle = theme.buttonHandle; int /*long*/ gtkStyle = gtk_widget_get_style(buttonHandle); int /*long*/ drawable = gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); gtkStyle = gtk_widget_get_style(entryHandle); theme.transferClipping(gc, gtkStyle); state_type = getStateType(DrawData.WIDGET_WHOLE);
@Override void draw(Theme theme, GC gc, Rectangle bounds) { long /*int*/ buttonHandle = theme.buttonHandle; long /*int*/ gtkStyle = gtk_widget_get_style(buttonHandle); long /*int*/ drawable = gc.getGCData().drawable; theme.transferClipping(gc, gtkStyle); gtkStyle = gtk_widget_get_style(entryHandle); theme.transferClipping(gc, gtkStyle); state_type = getStateType(DrawData.WIDGET_WHOLE);