-
Notifications
You must be signed in to change notification settings - Fork 2
/
BToolbar.m
41 lines (32 loc) · 851 Bytes
/
BToolbar.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// BToolbar.m
// BUserInterface
//
// Created by Jesse Grosjean on 9/8/08.
// Copyright 2008 Hog Bay Software. All rights reserved.
//
#import "BToolbar.h"
@implementation BToolbar
- (void)setVisible:(BOOL)shown {
if ([self isVisible] != shown) {
id delegate = [self delegate];
if (shown) {
if ([delegate respondsToSelector:@selector(toolbarWillShow:)]) {
[delegate toolbarWillShow:self];
}
} else {
if ([delegate respondsToSelector:@selector(toolbarWillHide:)]) {
[delegate toolbarWillHide:self];
}
}
[super setVisible:shown];
}
}
- (void)runCustomizationPalette:(id)sender {
id delegate = [self delegate];
if ([delegate respondsToSelector:@selector(toolbarWillRunCustomizationPalette:)]) {
[delegate toolbarWillRunCustomizationPalette:self];
}
[super runCustomizationPalette:sender];
}
@end