Skip to content

Commit

Permalink
various stuff moved
Browse files Browse the repository at this point in the history
  • Loading branch information
atg committed Jan 23, 2010
1 parent e5671b4 commit 9523693
Show file tree
Hide file tree
Showing 313 changed files with 7,333 additions and 225 deletions.
Binary file not shown.
@@ -0,0 +1,21 @@
//
// BWAnchoredButton.h
// BWToolkit
//
// Created by Brandon Walkin (www.brandonwalkin.com)
// All code is provided under the New BSD license.
//

#import <Cocoa/Cocoa.h>

@interface BWAnchoredButton : NSButton
{
BOOL isAtLeftEdgeOfBar;
BOOL isAtRightEdgeOfBar;
NSPoint topAndLeftInset;
}

@property BOOL isAtLeftEdgeOfBar;
@property BOOL isAtRightEdgeOfBar;

@end
@@ -0,0 +1,27 @@
//
// BWAnchoredButtonBar.h
// BWToolkit
//
// Created by Brandon Walkin (www.brandonwalkin.com)
// All code is provided under the New BSD license.
//

#import <Cocoa/Cocoa.h>

@interface BWAnchoredButtonBar : NSView
{
BOOL isResizable, isAtBottom, handleIsRightAligned;
int selectedIndex;
id splitViewDelegate;
}

@property BOOL isResizable, isAtBottom, handleIsRightAligned;
@property int selectedIndex;

// The mode of this bar with a resize handle makes use of some NSSplitView delegate methods. Use the splitViewDelegate for any custom delegate implementations
// you'd like to provide.
@property (assign) id splitViewDelegate;

+ (BOOL)wasBorderedBar;

@end
@@ -0,0 +1,16 @@
//
// BWAnchoredButtonCell.h
// BWToolkit
//
// Created by Brandon Walkin (www.brandonwalkin.com)
// All code is provided under the New BSD license.
//

#import <Cocoa/Cocoa.h>

@interface BWAnchoredButtonCell : NSButtonCell
{

}

@end
@@ -0,0 +1,21 @@
//
// BWAnchoredPopUpButton.h
// BWToolkit
//
// Created by Brandon Walkin (www.brandonwalkin.com)
// All code is provided under the New BSD license.
//

#import <Cocoa/Cocoa.h>

@interface BWAnchoredPopUpButton : NSPopUpButton
{
BOOL isAtLeftEdgeOfBar;
BOOL isAtRightEdgeOfBar;
NSPoint topAndLeftInset;
}

@property BOOL isAtLeftEdgeOfBar;
@property BOOL isAtRightEdgeOfBar;

@end
@@ -0,0 +1,16 @@
//
// BWAnchoredPopUpButtonCell.h
// BWToolkit
//
// Created by Brandon Walkin (www.brandonwalkin.com)
// All code is provided under the New BSD license.
//

#import <Cocoa/Cocoa.h>

@interface BWAnchoredPopUpButtonCell : NSPopUpButtonCell
{

}

@end
@@ -0,0 +1,24 @@
//
// BWGradientBox.h
// BWToolkit
//
// Created by Brandon Walkin (www.brandonwalkin.com)
// All code is provided under the New BSD license.
//

#import <Cocoa/Cocoa.h>

@interface BWGradientBox : NSView
{
NSColor *fillStartingColor, *fillEndingColor, *fillColor;
NSColor *topBorderColor, *bottomBorderColor;
float topInsetAlpha, bottomInsetAlpha;

BOOL hasTopBorder, hasBottomBorder, hasGradient, hasFillColor;
}

@property (nonatomic, retain) NSColor *fillStartingColor, *fillEndingColor, *fillColor, *topBorderColor, *bottomBorderColor;
@property float topInsetAlpha, bottomInsetAlpha;
@property BOOL hasTopBorder, hasBottomBorder, hasGradient, hasFillColor;

@end
@@ -0,0 +1,18 @@
//
// BWHyperlinkButton.h
// BWToolkit
//
// Created by Brandon Walkin (www.brandonwalkin.com)
// All code is provided under the New BSD license.
//

#import <Cocoa/Cocoa.h>

@interface BWHyperlinkButton : NSButton
{
NSString *urlString;
}

@property (copy, nonatomic) NSString *urlString;

@end
@@ -0,0 +1,16 @@
//
// BWHyperlinkButtonCell.h
// BWToolkit
//
// Created by Brandon Walkin (www.brandonwalkin.com)
// All code is provided under the New BSD license.
//

#import <Cocoa/Cocoa.h>

@interface BWHyperlinkButtonCell : NSButtonCell
{

}

@end
@@ -0,0 +1,16 @@
//
// BWInsetTextField.h
// BWToolkit
//
// Created by Brandon Walkin (www.brandonwalkin.com)
// All code is provided under the New BSD license.
//

#import <Cocoa/Cocoa.h>

@interface BWInsetTextField : NSTextField
{

}

@end
@@ -0,0 +1,36 @@
//
// BWSelectableToolbar.h
// BWToolkit
//
// Created by Brandon Walkin (www.brandonwalkin.com)
// All code is provided under the New BSD license.
//

#import <Cocoa/Cocoa.h>

@class BWSelectableToolbarHelper;

// Notification that gets sent when a toolbar item has been clicked. You can get the button that was clicked by getting the object
// for the key @"BWClickedItem" in the supplied userInfo dictionary.
extern NSString * const BWSelectableToolbarItemClickedNotification;

@interface BWSelectableToolbar : NSToolbar
{
BWSelectableToolbarHelper *helper;
NSMutableArray *itemIdentifiers;
NSMutableDictionary *itemsByIdentifier, *enabledByIdentifier;
BOOL inIB;

// For the IB inspector
int selectedIndex;
BOOL isPreferencesToolbar;
}

// Call one of these methods to set the active tab.
- (void)setSelectedItemIdentifier:(NSString *)itemIdentifier; // Use if you want an action in the tabbed window to change the tab.
- (void)setSelectedItemIdentifierWithoutAnimation:(NSString *)itemIdentifier; // Use if you want to show the window with a certain item selected.

// Programmatically disable or enable a toolbar item.
- (void)setEnabled:(BOOL)flag forIdentifier:(NSString *)itemIdentifier;

@end
@@ -0,0 +1,31 @@
//
// BWSheetController.h
// BWToolkit
//
// Created by Brandon Walkin (www.brandonwalkin.com)
// All code is provided under the New BSD license.
//

#import <Cocoa/Cocoa.h>

@interface BWSheetController : NSObject
{
NSWindow *sheet;
NSWindow *parentWindow;
id delegate;
}

@property (nonatomic, retain) IBOutlet NSWindow *sheet, *parentWindow;
@property (nonatomic, retain) IBOutlet id delegate;

- (IBAction)openSheet:(id)sender;
- (IBAction)closeSheet:(id)sender;
- (IBAction)messageDelegateAndCloseSheet:(id)sender;

// The optional delegate should implement the method:
// - (BOOL)shouldCloseSheet:(id)sender
// Return YES if you want the sheet to close after the button click, NO if it shouldn't close. The sender
// object is the button that requested the close. This is helpful because in the event that there are multiple buttons
// hooked up to the messageDelegateAndCloseSheet: method, you can distinguish which button called the method.

@end
@@ -0,0 +1,45 @@
//
// BWSplitView.h
// BWToolkit
//
// Created by Brandon Walkin (www.brandonwalkin.com) and Fraser Kuyvenhoven.
// All code is provided under the New BSD license.
//

#import <Cocoa/Cocoa.h>

@interface BWSplitView : NSSplitView
{
NSColor *color;
BOOL colorIsEnabled, checkboxIsEnabled, dividerCanCollapse, collapsibleSubviewCollapsed;
id secondaryDelegate;
NSMutableDictionary *minValues, *maxValues, *minUnits, *maxUnits;
NSMutableDictionary *resizableSubviewPreferredProportion, *nonresizableSubviewPreferredSize;
NSArray *stateForLastPreferredCalculations;
int collapsiblePopupSelection;
float uncollapsedSize;

// Collapse button
NSButton *toggleCollapseButton;
BOOL isAnimating;
}

@property (retain) NSMutableDictionary *minValues, *maxValues, *minUnits, *maxUnits;
@property (retain) NSMutableDictionary *resizableSubviewPreferredProportion, *nonresizableSubviewPreferredSize;
@property (retain) NSArray *stateForLastPreferredCalculations;
@property (retain) NSButton *toggleCollapseButton;
@property (assign) id secondaryDelegate;
@property BOOL collapsibleSubviewCollapsed;
@property int collapsiblePopupSelection;
@property BOOL dividerCanCollapse;

// The split view divider color
@property (copy) NSColor *color;

// Flag for whether a custom divider color is enabled. If not, the standard divider color is used.
@property BOOL colorIsEnabled;

// Call this method to collapse or expand a subview configured as collapsible in the IB inspector.
- (IBAction)toggleCollapse:(id)sender;

@end
@@ -0,0 +1,33 @@
//
// BWStyledTextField.h
// BWToolkit
//
// Created by Brandon Walkin (www.brandonwalkin.com)
// All code is provided under the New BSD license.
//

#import <Cocoa/Cocoa.h>

@interface BWStyledTextField : NSTextField
{

}

- (BOOL)hasGradient;
- (void)setHasGradient:(BOOL)flag;
- (NSColor *)startingColor;
- (void)setStartingColor:(NSColor *)color;
- (NSColor *)endingColor;
- (void)setEndingColor:(NSColor *)color;

- (NSColor *)solidColor;
- (void)setSolidColor:(NSColor *)color;

- (BOOL)hasShadow;
- (void)setHasShadow:(BOOL)flag;
- (BOOL)shadowIsBelow;
- (void)setShadowIsBelow:(BOOL)flag;
- (NSColor *)shadowColor;
- (void)setShadowColor:(NSColor *)color;

@end
@@ -0,0 +1,23 @@
//
// BWStyledTextFieldCell.h
// BWToolkit
//
// Created by Brandon Walkin (www.brandonwalkin.com)
// All code is provided under the New BSD license.
//

#import <Cocoa/Cocoa.h>

@interface BWStyledTextFieldCell : NSTextFieldCell
{
BOOL shadowIsBelow, hasShadow, hasGradient;
NSColor *shadowColor, *startingColor, *endingColor, *solidColor;

NSShadow *shadow;
NSMutableDictionary *previousAttributes;
}

@property BOOL shadowIsBelow, hasShadow, hasGradient;
@property (nonatomic, retain) NSColor *shadowColor, *startingColor, *endingColor, *solidColor;

@end
@@ -0,0 +1,25 @@
//
// BWTexturedSlider.h
// BWToolkit
//
// Created by Brandon Walkin (www.brandonwalkin.com)
// All code is provided under the New BSD license.
//

#import <Cocoa/Cocoa.h>

@interface BWTexturedSlider : NSSlider
{
int trackHeight, indicatorIndex;
NSRect sliderCellRect;
NSButton *minButton, *maxButton;
}

@property int indicatorIndex;
@property (retain) NSButton *minButton;
@property (retain) NSButton *maxButton;

- (int)trackHeight;
- (void)setTrackHeight:(int)newTrackHeight;

@end

0 comments on commit 9523693

Please sign in to comment.