aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/BWToolkitFramework.framework/BWAnchoredPopUpButton.m
diff options
context:
space:
mode:
Diffstat (limited to 'Frameworks/BWToolkitFramework.framework/BWAnchoredPopUpButton.m')
-rw-r--r--Frameworks/BWToolkitFramework.framework/BWAnchoredPopUpButton.m43
1 files changed, 43 insertions, 0 deletions
diff --git a/Frameworks/BWToolkitFramework.framework/BWAnchoredPopUpButton.m b/Frameworks/BWToolkitFramework.framework/BWAnchoredPopUpButton.m
new file mode 100644
index 00000000..87401d21
--- /dev/null
+++ b/Frameworks/BWToolkitFramework.framework/BWAnchoredPopUpButton.m
@@ -0,0 +1,43 @@
+//
+// BWAnchoredPopUpButton.m
+// BWToolkit
+//
+// Created by Brandon Walkin (www.brandonwalkin.com)
+// All code is provided under the New BSD license.
+//
+
+#import "BWAnchoredPopUpButton.h"
+#import "BWAnchoredButtonBar.h"
+#import "NSView+BWAdditions.h"
+
+@implementation BWAnchoredPopUpButton
+
+@synthesize isAtLeftEdgeOfBar;
+@synthesize isAtRightEdgeOfBar;
+
+- (id)initWithCoder:(NSCoder *)decoder;
+{
+ if ((self = [super initWithCoder:decoder]) != nil)
+ {
+ if ([BWAnchoredButtonBar wasBorderedBar])
+ topAndLeftInset = NSMakePoint(0, 0);
+ else
+ topAndLeftInset = NSMakePoint(1, 1);
+ }
+ return self;
+}
+
+- (void)mouseDown:(NSEvent *)theEvent
+{
+ [self bringToFront];
+ [super mouseDown:theEvent];
+}
+
+- (NSRect)frame
+{
+ NSRect frame = [super frame];
+ frame.size.height = 24;
+ return frame;
+}
+
+@end