diff options
author | Silenio Quarti | 2007-05-15 17:12:19 +0000 |
---|---|---|
committer | Silenio Quarti | 2007-05-15 17:12:19 +0000 |
commit | 56ccc8bcfcb43580a57bd9a371e724bac5e06479 (patch) | |
tree | c3be7b97309e56422a8579fb389b0b5dd35b841d | |
parent | b76d431a779fdd2091d3d4adbf75cfc8e9615d94 (diff) | |
download | eclipse.platform.swt-56ccc8bcfcb43580a57bd9a371e724bac5e06479.tar.gz eclipse.platform.swt-56ccc8bcfcb43580a57bd9a371e724bac5e06479.tar.xz eclipse.platform.swt-56ccc8bcfcb43580a57bd9a371e724bac5e06479.zip |
185231 - Mac: Cannot get rid of native tooltip in a table with columns
3 files changed, 248 insertions, 241 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java index dac3efcb11..6066c264d6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java @@ -1777,122 +1777,124 @@ public int getTopIndex () { } int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentProvided, int ioHelpContent) { - switch (inRequest) { - case OS.kHMSupplyContent: { - if (!(toolTipText != null && toolTipText.length () != 0)) { - Rect rect = new Rect (); - int window = OS.GetControlOwner (handle); - OS.GetWindowBounds (window, (short) OS.kWindowContentRgn, rect); - short windowLeft = rect.left, windowTop = rect.top; - org.eclipse.swt.internal.carbon.Point pt = new org.eclipse.swt.internal.carbon.Point (); - OS.memmove(pt, new int[] {inGlobalMouse}, 4); - pt.h -= windowLeft; - pt.v -= windowTop; - if (!contains (pt.h, pt.v)) break; - String toolTipText = null; - int tagSide = OS.kHMAbsoluteCenterAligned; - CGPoint inPt = new CGPoint (); - int [] contentView = new int [1]; - OS.HIViewFindByID (OS.HIViewGetRoot (OS.GetControlOwner (handle)), OS.kHIViewWindowContentID (), contentView); - OS.HIViewConvertPoint (inPt, handle, contentView [0]); - pt.h -= (int) inPt.x; - pt.v -= (int) inPt.y; - windowLeft += (int) inPt.x; - windowTop += (int) inPt.y; - int x = pt.h; - int y = pt.v; - int headerHeight = getHeaderHeight (); - if (headerHeight != 0 && (0 <= y && y < headerHeight) ) { - int startX = 0; - for (int i = 0; i < columnCount; i++) { - TableColumn column = columns [i]; - int width = column.lastWidth; - if (startX <= x && x < startX + width) { - toolTipText = column.toolTipText; - rect.left = (short) startX; - rect.right = (short) (rect.left + width); - rect.bottom = (short) (rect.top + headerHeight); - tagSide = OS.kHMOutsideBottomRightAligned; - break; - } - startX += width; - } - } else { - int columnIndex = 0; - TableItem item = null; - TableColumn column = null; - int rc = OS.noErr; - for (int i=getTopIndex (); i<itemCount && item == null && rc == OS.noErr; i++) { - if (columnCount == 0) { - if ((rc = OS.GetDataBrowserItemPartBounds (handle, i + 1, column_id, OS.kDataBrowserPropertyContentPart, rect)) == OS.noErr) { - if (OS.PtInRect (pt, rect)) { - item = _getItem (i); - break; - } + if (toolTipText == null) { + switch (inRequest) { + case OS.kHMSupplyContent: { + if (!(toolTipText != null && toolTipText.length () != 0)) { + Rect rect = new Rect (); + int window = OS.GetControlOwner (handle); + OS.GetWindowBounds (window, (short) OS.kWindowContentRgn, rect); + short windowLeft = rect.left, windowTop = rect.top; + org.eclipse.swt.internal.carbon.Point pt = new org.eclipse.swt.internal.carbon.Point (); + OS.memmove(pt, new int[] {inGlobalMouse}, 4); + pt.h -= windowLeft; + pt.v -= windowTop; + if (!contains (pt.h, pt.v)) break; + String toolTipText = null; + int tagSide = OS.kHMAbsoluteCenterAligned; + CGPoint inPt = new CGPoint (); + int [] contentView = new int [1]; + OS.HIViewFindByID (OS.HIViewGetRoot (OS.GetControlOwner (handle)), OS.kHIViewWindowContentID (), contentView); + OS.HIViewConvertPoint (inPt, handle, contentView [0]); + pt.h -= (int) inPt.x; + pt.v -= (int) inPt.y; + windowLeft += (int) inPt.x; + windowTop += (int) inPt.y; + int x = pt.h; + int y = pt.v; + int headerHeight = getHeaderHeight (); + if (headerHeight != 0 && (0 <= y && y < headerHeight) ) { + int startX = 0; + for (int i = 0; i < columnCount; i++) { + TableColumn column = columns [i]; + int width = column.lastWidth; + if (startX <= x && x < startX + width) { + toolTipText = column.toolTipText; + rect.left = (short) startX; + rect.right = (short) (rect.left + width); + rect.bottom = (short) (rect.top + headerHeight); + tagSide = OS.kHMOutsideBottomRightAligned; + break; } - } else { - for (int j = 0; j < columnCount; j++) { - column = columns [j]; - if ((rc = OS.GetDataBrowserItemPartBounds (handle, i + 1, column.id, OS.kDataBrowserPropertyContentPart, rect)) == OS.noErr) { + startX += width; + } + } else { + int columnIndex = 0; + TableItem item = null; + TableColumn column = null; + int rc = OS.noErr; + for (int i=getTopIndex (); i<itemCount && item == null && rc == OS.noErr; i++) { + if (columnCount == 0) { + if ((rc = OS.GetDataBrowserItemPartBounds (handle, i + 1, column_id, OS.kDataBrowserPropertyContentPart, rect)) == OS.noErr) { if (OS.PtInRect (pt, rect)) { item = _getItem (i); - columnIndex = j; break; } } + } else { + for (int j = 0; j < columnCount; j++) { + column = columns [j]; + if ((rc = OS.GetDataBrowserItemPartBounds (handle, i + 1, column.id, OS.kDataBrowserPropertyContentPart, rect)) == OS.noErr) { + if (OS.PtInRect (pt, rect)) { + item = _getItem (i); + columnIndex = j; + break; + } + } + } } } - } - if (item != null) { - GC gc = new GC (this); - int inset = getInsetWidth (); - int width = item.calculateWidth (columnIndex, gc) + inset; - gc.dispose (); - short [] w = new short [1]; - OS.GetDataBrowserTableViewNamedColumnWidth (handle, column == null ? column_id : column.id, w); - if (width > w [0]) { - toolTipText = item.getText (columnIndex); - Image image = item.getImage (columnIndex); - int imageWidth = image != null ? image.getBounds ().width + getGap () : 0; - int style = column == null ? SWT.LEFT : column.style; - if ((style & SWT.LEFT) != 0) { - rect.left += imageWidth; - rect.right = (short) (rect.left + width - imageWidth - inset); - } - if ((style & SWT.RIGHT) != 0) { - rect.left = (short) (rect.right - width + imageWidth + inset); - } - if ((style & SWT.CENTER) != 0) { - rect.left += imageWidth; + if (item != null) { + GC gc = new GC (this); + int inset = getInsetWidth (); + int width = item.calculateWidth (columnIndex, gc) + inset; + gc.dispose (); + short [] w = new short [1]; + OS.GetDataBrowserTableViewNamedColumnWidth (handle, column == null ? column_id : column.id, w); + if (width > w [0]) { + toolTipText = item.getText (columnIndex); + Image image = item.getImage (columnIndex); + int imageWidth = image != null ? image.getBounds ().width + getGap () : 0; + int style = column == null ? SWT.LEFT : column.style; + if ((style & SWT.LEFT) != 0) { + rect.left += imageWidth; + rect.right = (short) (rect.left + width - imageWidth - inset); + } + if ((style & SWT.RIGHT) != 0) { + rect.left = (short) (rect.right - width + imageWidth + inset); + } + if ((style & SWT.CENTER) != 0) { + rect.left += imageWidth; + } } } } + if (toolTipText != null && toolTipText.length () != 0) { + char [] buffer = new char [toolTipText.length ()]; + toolTipText.getChars (0, buffer.length, buffer, 0); + int length = fixMnemonic (buffer); + if (display.helpString != 0) OS.CFRelease (display.helpString); + display.helpString = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, buffer, length); + HMHelpContentRec helpContent = new HMHelpContentRec (); + OS.memmove (helpContent, ioHelpContent, HMHelpContentRec.sizeof); + display.helpWidget = this; + helpContent.version = OS.kMacHelpVersion; + helpContent.tagSide = (short) tagSide; + helpContent.absHotRect_left = (short) (rect.left + windowLeft); + helpContent.absHotRect_top = (short) (rect.top + windowTop); + helpContent.absHotRect_right = (short) (rect.right + windowLeft); + helpContent.absHotRect_bottom = (short) (rect.bottom + windowTop); + helpContent.content0_contentType = OS.kHMCFStringContent; + helpContent.content0_tagCFString = display.helpString; + helpContent.content1_contentType = OS.kHMCFStringContent; + helpContent.content1_tagCFString = display.helpString; + OS.memmove (ioHelpContent, helpContent, HMHelpContentRec.sizeof); + OS.memmove (outContentProvided, new short[]{OS.kHMContentProvided}, 2); + return OS.noErr; + } } - if (toolTipText != null && toolTipText.length () != 0) { - char [] buffer = new char [toolTipText.length ()]; - toolTipText.getChars (0, buffer.length, buffer, 0); - int length = fixMnemonic (buffer); - if (display.helpString != 0) OS.CFRelease (display.helpString); - display.helpString = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, buffer, length); - HMHelpContentRec helpContent = new HMHelpContentRec (); - OS.memmove (helpContent, ioHelpContent, HMHelpContentRec.sizeof); - display.helpWidget = this; - helpContent.version = OS.kMacHelpVersion; - helpContent.tagSide = (short) tagSide; - helpContent.absHotRect_left = (short) (rect.left + windowLeft); - helpContent.absHotRect_top = (short) (rect.top + windowTop); - helpContent.absHotRect_right = (short) (rect.right + windowLeft); - helpContent.absHotRect_bottom = (short) (rect.bottom + windowTop); - helpContent.content0_contentType = OS.kHMCFStringContent; - helpContent.content0_tagCFString = display.helpString; - helpContent.content1_contentType = OS.kHMCFStringContent; - helpContent.content1_tagCFString = display.helpString; - OS.memmove (ioHelpContent, helpContent, HMHelpContentRec.sizeof); - OS.memmove (outContentProvided, new short[]{OS.kHMContentProvided}, 2); - return OS.noErr; - } + break; } - break; } } return super.helpProc (inControl, inGlobalMouse, inRequest, outContentProvided, ioHelpContent); 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 1d2d93bffd..c2cfcfc439 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 @@ -620,42 +620,45 @@ int getVisibleRegion (int control, boolean clipChildren) { } int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentProvided, int ioHelpContent) { - switch (inRequest) { - case OS.kHMSupplyContent: { - short [] contentProvided = { OS.kHMContentNotProvided }; - if (toolTipText != null && toolTipText.length () != 0) { - char [] buffer = new char [toolTipText.length ()]; - toolTipText.getChars (0, buffer.length, buffer, 0); - int length = fixMnemonic (buffer); + if (parent.toolTipText == null) { + switch (inRequest) { + case OS.kHMSupplyContent: { + short [] contentProvided = { OS.kHMContentNotProvided }; + if (toolTipText != null && toolTipText.length () != 0) { + char [] buffer = new char [toolTipText.length ()]; + toolTipText.getChars (0, buffer.length, buffer, 0); + int length = fixMnemonic (buffer); + if (display.helpString != 0) OS.CFRelease (display.helpString); + display.helpString = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, buffer, length); + HMHelpContentRec helpContent = new HMHelpContentRec (); + OS.memmove (helpContent, ioHelpContent, HMHelpContentRec.sizeof); + helpContent.version = OS.kMacHelpVersion; + helpContent.tagSide = (short) OS.kHMDefaultSide; + display.helpWidget = null; + helpContent.absHotRect_left = (short) 0; + helpContent.absHotRect_top = (short) 0; + helpContent.absHotRect_right = (short) 0; + helpContent.absHotRect_bottom = (short) 0; + helpContent.content0_contentType = OS.kHMCFStringContent; + helpContent.content0_tagCFString = display.helpString; + helpContent.content1_contentType = OS.kHMCFStringContent; + helpContent.content1_tagCFString = display.helpString; + OS.memmove (ioHelpContent, helpContent, HMHelpContentRec.sizeof); + contentProvided [0] = OS.kHMContentProvided; + } + OS.memmove (outContentProvided, contentProvided, 2); + break; + } + case OS.kHMDisposeContent: { if (display.helpString != 0) OS.CFRelease (display.helpString); - display.helpString = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, buffer, length); - HMHelpContentRec helpContent = new HMHelpContentRec (); - OS.memmove (helpContent, ioHelpContent, HMHelpContentRec.sizeof); - helpContent.version = OS.kMacHelpVersion; - helpContent.tagSide = (short) OS.kHMDefaultSide; display.helpWidget = null; - helpContent.absHotRect_left = (short) 0; - helpContent.absHotRect_top = (short) 0; - helpContent.absHotRect_right = (short) 0; - helpContent.absHotRect_bottom = (short) 0; - helpContent.content0_contentType = OS.kHMCFStringContent; - helpContent.content0_tagCFString = display.helpString; - helpContent.content1_contentType = OS.kHMCFStringContent; - helpContent.content1_tagCFString = display.helpString; - OS.memmove (ioHelpContent, helpContent, HMHelpContentRec.sizeof); - contentProvided [0] = OS.kHMContentProvided; + display.helpString = 0; + break; } - OS.memmove (outContentProvided, contentProvided, 2); - break; - } - case OS.kHMDisposeContent: { - if (display.helpString != 0) OS.CFRelease (display.helpString); - display.helpWidget = null; - display.helpString = 0; - break; - } - } - return OS.noErr; + } + return OS.noErr; + } + return parent.helpProc (inControl, inGlobalMouse, inRequest, outContentProvided, ioHelpContent); } void hookEvents () { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java index 4c4deb4bec..85a0f94544 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Tree.java @@ -1836,125 +1836,127 @@ public TreeItem getTopItem () { } int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentProvided, int ioHelpContent) { - switch (inRequest) { - case OS.kHMSupplyContent: { - if (!(toolTipText != null && toolTipText.length () != 0)) { - Rect rect = new Rect (); - int window = OS.GetControlOwner (handle); - OS.GetWindowBounds (window, (short) OS.kWindowContentRgn, rect); - short windowLeft = rect.left, windowTop = rect.top; - org.eclipse.swt.internal.carbon.Point pt = new org.eclipse.swt.internal.carbon.Point (); - OS.memmove(pt, new int[] {inGlobalMouse}, 4); - pt.h -= windowLeft; - pt.v -= windowTop; - if (!contains (pt.h, pt.v)) break; - String toolTipText = null; - int tagSide = OS.kHMAbsoluteCenterAligned; - CGPoint inPt = new CGPoint (); - int [] contentView = new int [1]; - OS.HIViewFindByID (OS.HIViewGetRoot (OS.GetControlOwner (handle)), OS.kHIViewWindowContentID (), contentView); - OS.HIViewConvertPoint (inPt, handle, contentView [0]); - pt.h -= (int) inPt.x; - pt.v -= (int) inPt.y; - windowLeft += (int) inPt.x; - windowTop += (int) inPt.y; - int x = pt.h; - int y = pt.v; - int headerHeight = getHeaderHeight (); - if (headerHeight != 0 && (0 <= y && y < headerHeight) ) { - int startX = 0; - for (int i = 0; i < columnCount; i++) { - TreeColumn column = columns [i]; - int width = column.lastWidth + getLeftDisclosureInset (column.id); - if (startX <= x && x < startX + width) { - toolTipText = column.toolTipText; - rect.left = (short) startX; - rect.right = (short) (rect.left + width); - rect.bottom = (short) (rect.top + headerHeight); - tagSide = OS.kHMOutsideBottomRightAligned; - break; + if (toolTipText == null) { + switch (inRequest) { + case OS.kHMSupplyContent: { + if (!(toolTipText != null && toolTipText.length () != 0)) { + Rect rect = new Rect (); + int window = OS.GetControlOwner (handle); + OS.GetWindowBounds (window, (short) OS.kWindowContentRgn, rect); + short windowLeft = rect.left, windowTop = rect.top; + org.eclipse.swt.internal.carbon.Point pt = new org.eclipse.swt.internal.carbon.Point (); + OS.memmove(pt, new int[] {inGlobalMouse}, 4); + pt.h -= windowLeft; + pt.v -= windowTop; + if (!contains (pt.h, pt.v)) break; + String toolTipText = null; + int tagSide = OS.kHMAbsoluteCenterAligned; + CGPoint inPt = new CGPoint (); + int [] contentView = new int [1]; + OS.HIViewFindByID (OS.HIViewGetRoot (OS.GetControlOwner (handle)), OS.kHIViewWindowContentID (), contentView); + OS.HIViewConvertPoint (inPt, handle, contentView [0]); + pt.h -= (int) inPt.x; + pt.v -= (int) inPt.y; + windowLeft += (int) inPt.x; + windowTop += (int) inPt.y; + int x = pt.h; + int y = pt.v; + int headerHeight = getHeaderHeight (); + if (headerHeight != 0 && (0 <= y && y < headerHeight) ) { + int startX = 0; + for (int i = 0; i < columnCount; i++) { + TreeColumn column = columns [i]; + int width = column.lastWidth + getLeftDisclosureInset (column.id); + if (startX <= x && x < startX + width) { + toolTipText = column.toolTipText; + rect.left = (short) startX; + rect.right = (short) (rect.left + width); + rect.bottom = (short) (rect.top + headerHeight); + tagSide = OS.kHMOutsideBottomRightAligned; + break; + } + startX += width; } - startX += width; - } - } else { - int columnIndex = 0; - TreeItem item = null; - TreeColumn column = null; - for (int i=0; i<items.length && item == null; i++) { - TreeItem nextItem = items [i]; - if (nextItem != null) { - if (columnCount == 0) { - if (OS.GetDataBrowserItemPartBounds (handle, nextItem.id, column_id, OS.kDataBrowserPropertyContentPart, rect) == OS.noErr) { - if (OS.PtInRect (pt, rect)) { - item = nextItem; - break; - } - } - } else { - for (int j = 0; j < columnCount; j++) { - column = columns [j]; - if (OS.GetDataBrowserItemPartBounds (handle, nextItem.id, column.id, OS.kDataBrowserPropertyContentPart, rect) == OS.noErr) { + } else { + int columnIndex = 0; + TreeItem item = null; + TreeColumn column = null; + for (int i=0; i<items.length && item == null; i++) { + TreeItem nextItem = items [i]; + if (nextItem != null) { + if (columnCount == 0) { + if (OS.GetDataBrowserItemPartBounds (handle, nextItem.id, column_id, OS.kDataBrowserPropertyContentPart, rect) == OS.noErr) { if (OS.PtInRect (pt, rect)) { item = nextItem; - columnIndex = j; break; } } + } else { + for (int j = 0; j < columnCount; j++) { + column = columns [j]; + if (OS.GetDataBrowserItemPartBounds (handle, nextItem.id, column.id, OS.kDataBrowserPropertyContentPart, rect) == OS.noErr) { + if (OS.PtInRect (pt, rect)) { + item = nextItem; + columnIndex = j; + break; + } + } + } } } } - } - if (item != null) { - int columnId = column == null ? column_id : column.id; - GC gc = new GC (this); - int inset = getInsetWidth (columnId, false); - int width = item.calculateWidth (columnIndex, gc) + inset; - gc.dispose (); - short [] w = new short [1]; - OS.GetDataBrowserTableViewNamedColumnWidth (handle, columnId, w); - if (width > w [0]) { - toolTipText = item.getText (columnIndex); - Image image = item.getImage (columnIndex); - int imageWidth = image != null ? image.getBounds ().width + getGap () : 0; - int style = column == null ? SWT.LEFT : column.style; - if ((style & SWT.LEFT) != 0) { - rect.left += imageWidth; - rect.right = (short) (rect.left + width - imageWidth - inset); - } - if ((style & SWT.RIGHT) != 0) { - rect.left = (short) (rect.right - width + imageWidth + inset); - } - if ((style & SWT.CENTER) != 0) { - rect.left += imageWidth; + if (item != null) { + int columnId = column == null ? column_id : column.id; + GC gc = new GC (this); + int inset = getInsetWidth (columnId, false); + int width = item.calculateWidth (columnIndex, gc) + inset; + gc.dispose (); + short [] w = new short [1]; + OS.GetDataBrowserTableViewNamedColumnWidth (handle, columnId, w); + if (width > w [0]) { + toolTipText = item.getText (columnIndex); + Image image = item.getImage (columnIndex); + int imageWidth = image != null ? image.getBounds ().width + getGap () : 0; + int style = column == null ? SWT.LEFT : column.style; + if ((style & SWT.LEFT) != 0) { + rect.left += imageWidth; + rect.right = (short) (rect.left + width - imageWidth - inset); + } + if ((style & SWT.RIGHT) != 0) { + rect.left = (short) (rect.right - width + imageWidth + inset); + } + if ((style & SWT.CENTER) != 0) { + rect.left += imageWidth; + } } } } + if (toolTipText != null && toolTipText.length () != 0) { + char [] buffer = new char [toolTipText.length ()]; + toolTipText.getChars (0, buffer.length, buffer, 0); + int length = fixMnemonic (buffer); + if (display.helpString != 0) OS.CFRelease (display.helpString); + display.helpString = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, buffer, length); + HMHelpContentRec helpContent = new HMHelpContentRec (); + OS.memmove (helpContent, ioHelpContent, HMHelpContentRec.sizeof); + display.helpWidget = this; + helpContent.version = OS.kMacHelpVersion; + helpContent.tagSide = (short) tagSide; + helpContent.absHotRect_left = (short) (rect.left + windowLeft); + helpContent.absHotRect_top = (short) (rect.top + windowTop); + helpContent.absHotRect_right = (short) (rect.right + windowLeft); + helpContent.absHotRect_bottom = (short) (rect.bottom + windowTop); + helpContent.content0_contentType = OS.kHMCFStringContent; + helpContent.content0_tagCFString = display.helpString; + helpContent.content1_contentType = OS.kHMCFStringContent; + helpContent.content1_tagCFString = display.helpString; + OS.memmove (ioHelpContent, helpContent, HMHelpContentRec.sizeof); + OS.memmove (outContentProvided, new short[]{OS.kHMContentProvided}, 2); + return OS.noErr; + } } - if (toolTipText != null && toolTipText.length () != 0) { - char [] buffer = new char [toolTipText.length ()]; - toolTipText.getChars (0, buffer.length, buffer, 0); - int length = fixMnemonic (buffer); - if (display.helpString != 0) OS.CFRelease (display.helpString); - display.helpString = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, buffer, length); - HMHelpContentRec helpContent = new HMHelpContentRec (); - OS.memmove (helpContent, ioHelpContent, HMHelpContentRec.sizeof); - display.helpWidget = this; - helpContent.version = OS.kMacHelpVersion; - helpContent.tagSide = (short) tagSide; - helpContent.absHotRect_left = (short) (rect.left + windowLeft); - helpContent.absHotRect_top = (short) (rect.top + windowTop); - helpContent.absHotRect_right = (short) (rect.right + windowLeft); - helpContent.absHotRect_bottom = (short) (rect.bottom + windowTop); - helpContent.content0_contentType = OS.kHMCFStringContent; - helpContent.content0_tagCFString = display.helpString; - helpContent.content1_contentType = OS.kHMCFStringContent; - helpContent.content1_tagCFString = display.helpString; - OS.memmove (ioHelpContent, helpContent, HMHelpContentRec.sizeof); - OS.memmove (outContentProvided, new short[]{OS.kHMContentProvided}, 2); - return OS.noErr; - } + break; } - break; } } return super.helpProc (inControl, inGlobalMouse, inRequest, outContentProvided, ioHelpContent); |