-------------------------------------------------------------------------- */
{
EmacsView *view = FRAME_NS_VIEW (f);
+
+ NSTRACE ("free_frame_tool_bar");
+
block_input ();
view->wait_for_tool_bar = NO;
- [[view toolbar] setVisible: NO];
+
FRAME_TOOLBAR_HEIGHT (f) = 0;
+
+ /* Note: This trigger an animation, which calls windowDidResize
+ repeatedly. */
+ f->output_data.ns->in_animation = 1;
+ [[view toolbar] setVisible: NO];
+ f->output_data.ns->in_animation = 0;
+
unblock_input ();
}
EmacsToolbar *toolbar = [view toolbar];
int oldh;
+ NSTRACE ("update_frame_tool_bar");
+
if (view == nil || toolbar == nil) return;
block_input ();
}
if (![toolbar isVisible])
+ {
+ f->output_data.ns->in_animation = 1;
[toolbar setVisible: YES];
+ f->output_data.ns->in_animation = 0;
+ }
#ifdef NS_IMPL_COCOA
if ([toolbar changed])
- initForView: (EmacsView *)view withIdentifier: (NSString *)identifier
{
+ NSTRACE ("[EmacsToolbar initForView: withIdentifier:]");
+
self = [super initWithIdentifier: identifier];
emacsView = view;
[self setDisplayMode: NSToolbarDisplayModeIconOnly];
- (void)dealloc
{
+ NSTRACE ("[EmacsToolbar dealloc]");
+
[prevIdentifiers release];
[activeIdentifiers release];
[identifierToItem release];
- (void) clearActive
{
+ NSTRACE ("[EmacsToolbar clearActive]");
+
[prevIdentifiers release];
prevIdentifiers = [activeIdentifiers copy];
[activeIdentifiers removeAllObjects];
- (void) clearAll
{
+ NSTRACE ("[EmacsToolbar clearAll]");
+
[self clearActive];
while ([[self items] count] > 0)
[self removeItemAtIndex: 0];
- (BOOL) changed
{
+ NSTRACE ("[EmacsToolbar changed]");
+
return [activeIdentifiers isEqualToArray: prevIdentifiers] &&
enablement == prevEnablement ? NO : YES;
}
helpText: (const char *)help
enabled: (BOOL)enabled
{
+ NSTRACE ("[EmacsToolbar addDisplayItemWithImage: ...]");
+
/* 1) come up w/identifier */
NSString *identifier
= [NSString stringWithFormat: @"%lu", (unsigned long)[img hash]];
all items to enabled state (for some reason). */
- (void)validateVisibleItems
{
+ NSTRACE ("[EmacsToolbar validateVisibleItems]");
}
itemForItemIdentifier: (NSString *)itemIdentifier
willBeInsertedIntoToolbar: (BOOL)flag
{
+ NSTRACE ("[EmacsToolbar toolbar: ...]");
+
/* look up NSToolbarItem by identifier and return... */
return [identifierToItem objectForKey: itemIdentifier];
}
- (NSArray *)toolbarDefaultItemIdentifiers: (NSToolbar *)toolbar
{
+ NSTRACE ("[EmacsToolbar toolbarDefaultItemIdentifiers:]");
+
/* return entire set.. */
return activeIdentifiers;
}
/* for configuration palette (not yet supported) */
- (NSArray *)toolbarAllowedItemIdentifiers: (NSToolbar *)toolbar
{
+ NSTRACE ("[EmacsToolbar toolbarAllowedItemIdentifiers:]");
+
/* return entire set... */
return activeIdentifiers;
//return [identifierToItem allKeys];