summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2002-12-10 17:41:37 +0000
committerSilenio Quarti <silenio>2002-12-10 17:41:37 +0000
commit972d56feaf277f9b4bc9f2fde2856144254b0eae (patch)
tree2f0f399ef32e5f4307173430a1ea5dd40419f621
parente526124eb0b0190d5dc2144aa7a1d11a550bee18 (diff)
downloadeclipse.platform.swt-972d56feaf277f9b4bc9f2fde2856144254b0eae.tar.gz
eclipse.platform.swt-972d56feaf277f9b4bc9f2fde2856144254b0eae.tar.xz
eclipse.platform.swt-972d56feaf277f9b4bc9f2fde2856144254b0eae.zip
tool draw
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java19
1 files changed, 17 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java
index a50f4d1722..0fbc4d7898 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java
@@ -287,12 +287,27 @@ void hookEvents () {
super.hookEvents ();
Display display = getDisplay ();
int controlProc = display.controlProc;
- int [] mask = new int [] {
+ int [] mask1 = new int [] {
OS.kEventClassControl, OS.kEventControlDraw,
OS.kEventClassControl, OS.kEventControlHit,
};
int controlTarget = OS.GetControlEventTarget (handle);
- OS.InstallEventHandler (controlTarget, controlProc, mask.length / 2, mask, handle, null);
+ OS.InstallEventHandler (controlTarget, controlProc, mask1.length / 2, mask1, handle, null);
+ int [] mask2 = new int [] {
+ OS.kEventClassControl, OS.kEventControlDraw,
+ };
+ if (iconHandle != 0) {
+ controlTarget = OS.GetControlEventTarget (iconHandle);
+ OS.InstallEventHandler (controlTarget, controlProc, mask2.length / 2, mask2, iconHandle, null);
+ }
+ if (labelHandle != 0) {
+ controlTarget = OS.GetControlEventTarget (labelHandle);
+ OS.InstallEventHandler (controlTarget, controlProc, mask2.length / 2, mask2, labelHandle, null);
+ }
+ if (arrowHandle != 0) {
+ controlTarget = OS.GetControlEventTarget (arrowHandle);
+ OS.InstallEventHandler (controlTarget, controlProc, mask2.length / 2, mask2, arrowHandle, null);
+ }
int helpProc = display.helpProc;
OS.HMInstallControlContentCallback (handle, helpProc);
}