ptrdiff_t img_id;
struct image *img;
Lisp_Object image;
+ Lisp_Object labelObj;
+ const char *labelText;
Lisp_Object helpObj;
const char *helpText;
{
idx = -1;
}
+ labelObj = TOOLPROP (TOOL_BAR_ITEM_LABEL);
+ labelText = NILP (labelObj) ? "" : SSDATA (labelObj);
helpObj = TOOLPROP (TOOL_BAR_ITEM_HELP);
if (NILP (helpObj))
helpObj = TOOLPROP (TOOL_BAR_ITEM_CAPTION);
[toolbar addDisplayItemWithImage: img->pixmap
idx: k++
tag: i
+ labelText: labelText
helpText: helpText
enabled: enabled_p];
#undef TOOLPROP
- (void) addDisplayItemWithImage: (EmacsImage *)img
idx: (int)idx
tag: (int)tag
+ labelText: (const char *)label
helpText: (const char *)help
enabled: (BOOL)enabled
{
item = [[[NSToolbarItem alloc] initWithItemIdentifier: identifier]
autorelease];
[item setImage: img];
+ [item setLabel: [NSString stringWithUTF8String: label]];
[item setToolTip: [NSString stringWithUTF8String: help]];
[item setTarget: emacsView];
[item setAction: @selector (toolbarClicked:)];
- (void) addDisplayItemWithImage: (EmacsImage *)img
idx: (int)idx
tag: (int)tag
+ labelText: (const char *)label
helpText: (const char *)help
enabled: (BOOL)enabled;