本文整理了Java中org.eclipse.swt.widgets.Tree.drawBackground()
方法的一些代码示例,展示了Tree.drawBackground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tree.drawBackground()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Tree
类名称:Tree
方法名:drawBackground
暂无
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
LRESULT CDDS_PREPAINT (NMTVCUSTOMDRAW nmcd, int /*long*/ wParam, int /*long*/ lParam) {
if (explorerTheme) {
if ((OS.IsWindowEnabled (handle) && hooks (SWT.EraseItem)) || findImageControl () != null) {
RECT rect = new RECT ();
OS.SetRect (rect, nmcd.left, nmcd.top, nmcd.right, nmcd.bottom);
drawBackground (nmcd.hdc, rect);
}
}
return new LRESULT (OS.CDRF_NOTIFYITEMDRAW | OS.CDRF_NOTIFYPOSTPAINT);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) {
switch ((int)/*64*/user_data) {
case EXPOSE_EVENT_INVERSE: {
/*
* Feature in GTK. When the GtkTreeView has no items it does not propagate
* expose events. The fix is to fill the background in the inverse expose
* event.
*/
int itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, 0);
if (itemCount == 0 && (state & OBSCURED) == 0) {
if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
Control control = findBackgroundControl ();
if (control != null) {
GdkEventExpose gdkEvent = new GdkEventExpose ();
OS.memmove (gdkEvent, arg0, GdkEventExpose.sizeof);
int /*long*/ window = OS.gtk_tree_view_get_bin_window (handle);
if (window == gdkEvent.window) {
drawBackground (control, window, gdkEvent.region, gdkEvent.area_x, gdkEvent.area_y, gdkEvent.area_width, gdkEvent.area_height);
}
}
}
}
break;
}
}
return super.windowProc (handle, arg0, user_data);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) {
switch ((int)/*64*/user_data) {
case EXPOSE_EVENT_INVERSE: {
/*
* Feature in GTK. When the GtkTreeView has no items it does not propagate
* expose events. The fix is to fill the background in the inverse expose
* event.
*/
int itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, 0);
if (itemCount == 0 && (state & OBSCURED) == 0) {
if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
Control control = findBackgroundControl ();
if (control != null) {
GdkEventExpose gdkEvent = new GdkEventExpose ();
OS.memmove (gdkEvent, arg0, GdkEventExpose.sizeof);
int /*long*/ window = OS.gtk_tree_view_get_bin_window (handle);
if (window == gdkEvent.window) {
drawBackground (control, window, gdkEvent.region, gdkEvent.area_x, gdkEvent.area_y, gdkEvent.area_width, gdkEvent.area_height);
}
}
}
}
break;
}
}
return super.windowProc (handle, arg0, user_data);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) {
switch ((int)/*64*/user_data) {
case EXPOSE_EVENT_INVERSE: {
/*
* Feature in GTK. When the GtkTreeView has no items it does not propagate
* expose events. The fix is to fill the background in the inverse expose
* event.
*/
int itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, 0);
if (itemCount == 0 && (state & OBSCURED) == 0) {
if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
Control control = findBackgroundControl ();
if (control != null) {
GdkEventExpose gdkEvent = new GdkEventExpose ();
OS.memmove (gdkEvent, arg0, GdkEventExpose.sizeof);
long /*int*/ window = OS.gtk_tree_view_get_bin_window (handle);
if (window == gdkEvent.window) {
drawBackground (control, window, gdkEvent.region, gdkEvent.area_x, gdkEvent.area_y, gdkEvent.area_width, gdkEvent.area_height);
}
}
}
}
break;
}
}
return super.windowProc (handle, arg0, user_data);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
drawBackground (control, window, cairo, rgn, 0, rect.y + rect.height, width [0], height [0] - (rect.y + rect.height));
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
drawBackground (control, window, cairo, rgn, 0, rect.y + rect.height, width [0], height [0] - (rect.y + rect.height));
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
drawBackground (control, window, cairo, rgn, 0, rect.y + rect.height, width [0], height [0] - (rect.y + rect.height));
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
RECT rect = new RECT ();
OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom);
drawBackground (hDC, rect);
callWindowProc (handle, OS.WM_PAINT, hDC, 0);
OS.SetWindowOrgEx (hDC, lpPoint1.x, lpPoint1.y, null);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
RECT cellRect = item.getBounds (index, true, true, true, true, true, hDC);
if (clrSortBk != -1) {
drawBackground (hDC, cellRect, clrSortBk, 0, 0);
} else {
if (OS.IsWindowEnabled (handle) || findImageControl () != null) {
drawBackground (hDC, rect);
} else {
fillBackground (hDC, OS.GetBkColor (hDC), rect);
fillBackground (hDC, OS.GetBkColor (hDC), rect);
} else {
if (OS.IsWindowEnabled (handle)) drawBackground (hDC, rect);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
drawBackground (control, window, cr, 0, rect.x, rect.y, rect.width, rect.height);
if (cr != 0) {
Cairo.cairo_restore (cr);
Cairo.cairo_reset_clip (cr);
drawBackground (control, window, cr, 0, rect.x, rect.y, rect.width, rect.height);
if (cr != 0) {
Cairo.cairo_restore (cr);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
drawBackground (control, window, cr, 0, rect.x, rect.y, rect.width, rect.height);
if (cr != 0) {
Cairo.cairo_restore (cr);
Cairo.cairo_reset_clip (cr);
drawBackground (control, window, cr, 0, rect.x, rect.y, rect.width, rect.height);
if (cr != 0) {
Cairo.cairo_restore (cr);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
drawBackground (control, window, cr, 0, rect.x, rect.y, rect.width, rect.height);
if (cr != 0) {
Cairo.cairo_restore (cr);
Cairo.cairo_reset_clip (cr);
drawBackground (control, window, cr, 0, rect.x, rect.y, rect.width, rect.height);
if (cr != 0) {
Cairo.cairo_restore (cr);
内容来源于网络,如有侵权,请联系作者删除!