Point getLocationInPixels () { checkWidget(); int /*long*/ topHandle = topHandle (); GtkAllocation allocation = new GtkAllocation (); OS.gtk_widget_get_allocation (topHandle, allocation); int x = allocation.x; int y = allocation.y; if ((parent.style & SWT.MIRRORED) != 0) { int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width; x = parent.getClientWidth () - width - x; } return new Point (x, y); }
Point getLocationInPixels () { checkWidget(); int /*long*/ topHandle = topHandle (); GtkAllocation allocation = new GtkAllocation (); OS.gtk_widget_get_allocation (topHandle, allocation); int x = allocation.x; int y = allocation.y; if ((parent.style & SWT.MIRRORED) != 0) { int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width; x = parent.getClientWidth () - width - x; } return new Point (x, y); }
Point getLocationInPixels () { checkWidget(); long /*int*/ topHandle = topHandle (); GtkAllocation allocation = new GtkAllocation (); OS.gtk_widget_get_allocation (topHandle, allocation); int x = allocation.x; int y = allocation.y; if ((parent.style & SWT.MIRRORED) != 0) { int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width; x = parent.getClientWidth () - width - x; } return new Point (x, y); }
Rectangle getBoundsInPixels () { checkWidget(); int /*long*/ topHandle = topHandle (); GtkAllocation allocation = new GtkAllocation (); OS.gtk_widget_get_allocation (topHandle, allocation); int x = allocation.x; int y = allocation.y; int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width; int height = (state & ZERO_HEIGHT) != 0 ? 0 :allocation.height; if ((parent.style & SWT.MIRRORED) != 0) x = parent.getClientWidth () - width - x; return new Rectangle (x, y, width, height); }
Rectangle getBoundsInPixels () { checkWidget(); long /*int*/ topHandle = topHandle (); GtkAllocation allocation = new GtkAllocation (); OS.gtk_widget_get_allocation (topHandle, allocation); int x = allocation.x; int y = allocation.y; int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width; int height = (state & ZERO_HEIGHT) != 0 ? 0 :allocation.height; if ((parent.style & SWT.MIRRORED) != 0) x = parent.getClientWidth () - width - x; return new Rectangle (x, y, width, height); }
Rectangle getBoundsInPixels () { checkWidget(); int /*long*/ topHandle = topHandle (); GtkAllocation allocation = new GtkAllocation (); OS.gtk_widget_get_allocation (topHandle, allocation); int x = allocation.x; int y = allocation.y; int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width; int height = (state & ZERO_HEIGHT) != 0 ? 0 :allocation.height; if ((parent.style & SWT.MIRRORED) != 0) x = parent.getClientWidth () - width - x; return new Rectangle (x, y, width, height); }
void setInitialBounds () { if ((state & ZERO_WIDTH) != 0 && (state & ZERO_HEIGHT) != 0) { /* * Feature in GTK. On creation, each widget's allocation is * initialized to a position of (-1, -1) until the widget is * first sized. The fix is to set the value to (0, 0) as * expected by SWT. */ int /*long*/ topHandle = topHandle (); GtkAllocation allocation = new GtkAllocation(); if ((parent.style & SWT.MIRRORED) != 0) { allocation.x = parent.getClientWidth (); } else { allocation.x = 0; } allocation.y = 0; if (OS.GTK3) { OS.gtk_widget_set_visible(topHandle, true); } OS.gtk_widget_set_allocation(topHandle, allocation); } else { resizeHandle (1, 1); forceResize (); } }
void setInitialBounds () { if ((state & ZERO_WIDTH) != 0 && (state & ZERO_HEIGHT) != 0) { /* * Feature in GTK. On creation, each widget's allocation is * initialized to a position of (-1, -1) until the widget is * first sized. The fix is to set the value to (0, 0) as * expected by SWT. */ long /*int*/ topHandle = topHandle (); GtkAllocation allocation = new GtkAllocation(); if ((parent.style & SWT.MIRRORED) != 0) { allocation.x = parent.getClientWidth (); } else { allocation.x = 0; } allocation.y = 0; if (OS.GTK3) { OS.gtk_widget_set_visible(topHandle, true); } OS.gtk_widget_set_allocation(topHandle, allocation); } else { resizeHandle (1, 1); forceResize (); } }
void setInitialBounds () { if ((state & ZERO_WIDTH) != 0 && (state & ZERO_HEIGHT) != 0) { /* * Feature in GTK. On creation, each widget's allocation is * initialized to a position of (-1, -1) until the widget is * first sized. The fix is to set the value to (0, 0) as * expected by SWT. */ int /*long*/ topHandle = topHandle (); GtkAllocation allocation = new GtkAllocation(); if ((parent.style & SWT.MIRRORED) != 0) { allocation.x = parent.getClientWidth (); } else { allocation.x = 0; } allocation.y = 0; if (OS.GTK3) { OS.gtk_widget_set_visible(topHandle, true); } OS.gtk_widget_set_allocation(topHandle, allocation); } else { resizeHandle (1, 1); forceResize (); } }
event.detail = SWT.DRAG; if ((parent.style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (parent.getClientWidth () - width) - event.x; sendSelectionEvent (SWT.Selection, event, true); if (isDisposed ()) return 0; lastX = rect.x; lastY = rect.y; if ((parent.style & SWT.MIRRORED) != 0) lastX = parent.getClientWidth () - width - lastX; parent.update (true, (style & SWT.SMOOTH) == 0); drawBand (lastX, rect.y, width, height);
int controlWidth = (child.state & ZERO_WIDTH) != 0 ? 0 : allocation.width; if (oldWidth > 0) x = oldWidth - controlWidth - x; int clientWidth = getClientWidth (); x = clientWidth - controlWidth - x; if (child.enableWindow != 0) {
int controlWidth = (child.state & ZERO_WIDTH) != 0 ? 0 : allocation.width; if (oldWidth > 0) x = oldWidth - controlWidth - x; int clientWidth = getClientWidth (); x = clientWidth - controlWidth - x; if (child.enableWindow != 0) {
int controlWidth = (child.state & ZERO_WIDTH) != 0 ? 0 : allocation.width; if (oldWidth > 0) x = oldWidth - controlWidth - x; int clientWidth = getClientWidth (); x = clientWidth - controlWidth - x; if (child.enableWindow != 0) {
event.setBounds (DPIUtil.autoScaleDown (eventRect)); drawBand (lastX, lastY, width, height); if ((parent.style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (parent.getClientWidth () - width) - event.x; sendSelectionEvent (SWT.Selection, event, true); if (isDisposed ()) return result;
event.setBounds (DPIUtil.autoScaleDown (eventRect)); drawBand (lastX, lastY, width, height); if ((parent.style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (parent.getClientWidth () - width) - event.x; sendSelectionEvent (SWT.Selection, event, true); if (isDisposed ()) return result;
event.setBounds (DPIUtil.autoScaleDown (eventRect)); drawBand (lastX, lastY, width, height); if ((parent.style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (parent.getClientWidth () - width) - event.x; sendSelectionEvent (SWT.Selection, event, true); if (isDisposed ()) return result;
OS.memmove (rect, rectangles [0] + i * GdkRectangle.sizeof, GdkRectangle.sizeof); event.setBounds (DPIUtil.autoScaleDown (new Rectangle(rect.x, rect.y, rect.width, rect.height))); if ((style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (getClientWidth ()) - event.width - event.x; long /*int*/ damageRgn = OS.gdk_region_new (); OS.gdk_region_union_with_rect (damageRgn, rect);
OS.memmove (rect, rectangles [0] + i * GdkRectangle.sizeof, GdkRectangle.sizeof); event.setBounds (DPIUtil.autoScaleDown (new Rectangle(rect.x, rect.y, rect.width, rect.height))); if ((style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (getClientWidth ()) - event.width - event.x; int /*long*/ damageRgn = OS.gdk_region_new (); OS.gdk_region_union_with_rect (damageRgn, rect);
OS.memmove (rect, rectangles [0] + i * GdkRectangle.sizeof, GdkRectangle.sizeof); event.setBounds (DPIUtil.autoScaleDown (new Rectangle(rect.x, rect.y, rect.width, rect.height))); if ((style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (getClientWidth ()) - event.width - event.x; int /*long*/ damageRgn = OS.gdk_region_new (); OS.gdk_region_union_with_rect (damageRgn, rect);
Rectangle rect = rects [i]; int x = rect.x; if (parent != null && (parent.style & SWT.MIRRORED) != 0) x = parent.getClientWidth () - rect.width - x; OS.gdk_draw_rectangle (window, gc, 0, x, rect.y, rect.width, rect.height);