5 // Created by Evan Schoenberg on 12/26/05.
8 #import "AIMessageWindow.h"
9 #import "AIClickThroughThemeDocumentButton.h"
10 #import <AIUtilities/AIApplicationAdditions.h>
13 * @class AIMessageWindow
14 * @brief This AIDockingWindow subclass serves message windows.
16 * It overrides the standardWindowButton:forStyleMask: class method to provide
17 * AIClickThroughThemeDocumentButton objects for NSWindowDocumentIconButton requests.
19 @implementation AIMessageWindow
22 * @brief Return the standard window button for a mask
24 * We return AIClickThroughThemeDocumentButton instead of NSThemeDocumentButton to provide
25 * click-through dragging behavior.
27 + (NSButton *)standardWindowButton:(NSWindowButton)button forStyleMask:(unsigned int)styleMask
29 NSButton *standardWindowButton = [super standardWindowButton:button forStyleMask:styleMask];
31 if (button == NSWindowDocumentIconButton &&
32 [NSApp isOnTigerOrBetter]) {
33 [NSKeyedArchiver setClassName:@"AIClickThroughThemeDocumentButton" forClass:[NSThemeDocumentButton class]];
34 standardWindowButton = [NSKeyedUnarchiver unarchiveObjectWithData:[NSKeyedArchiver archivedDataWithRootObject:standardWindowButton]];
36 [[standardWindowButton retain] autorelease];
39 return standardWindowButton;