Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
add UXImageView, UXSourceController, NSIndexPath categories
Browse files Browse the repository at this point in the history
  • Loading branch information
kirb committed May 25, 2015
1 parent 7ddf296 commit e0e964b
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 2 deletions.
13 changes: 13 additions & 0 deletions NSIndexPath+UXCollectionViewAdditions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* UXKit headers, derived from reverse engineering
* Reversed by Adam D (kirb), licensed under WTFPL v2
*/

@interface NSIndexPath (UXCollectionViewAdditions)

+ (instancetype)indexPathForItem:(NSUInteger)item inSection:(NSUInteger)section;

@property (readonly, nonatomic) NSUInteger section;
@property (readonly, nonatomic) NSUInteger item;

@end
13 changes: 13 additions & 0 deletions NSIndexPath+UXTableView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* UXKit headers, derived from reverse engineering
* Reversed by Adam D (kirb), licensed under WTFPL v2
*/

@interface NSIndexPath (UXTableView)

+ (instancetype)indexPathForRow:(NSUInteger)row inSection:(NSUInteger)section;

@property (readonly, nonatomic) NSUInteger section;
@property (readonly, nonatomic) NSUInteger row;

@end
21 changes: 21 additions & 0 deletions UXImageView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* UXKit headers, derived from reverse engineering
* Reversed by Adam D (kirb), licensed under WTFPL v2
*/

@interface UXImageView : UXView

@property (retain, nonatomic) NSImage *image;

- (instancetype)initWithImage:(NSImage *)image;

- (void)sizeToFit;
- (void)setFrameSize:(CGSize)frameSize;

@property (readonly) CGSize intrinsicContentSize;
@property (retain, nonatomic) NSString *accessibilityLabel;

- (void)viewWillMoveToWindow:(NSWindow *)window;
- (void)viewDidChangeBackingProperties;

@end
4 changes: 4 additions & 0 deletions UXKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#import "UXCollectionViewController.h"
#import "UXKitAppearance.h"
#import "UXKitDefines.h"
#import "UXImageView.h"
#import "UXLabel.h"
#import "UXLayoutSupport.h"
#import "UXNavigationController.h"
Expand All @@ -28,10 +29,13 @@
#import "UXViewControllerContextTransitioning.h"
#import "UXViewControllerInteractiveTransitioning.h"
#import "UXViewControllerTransitionCoordinator.h"
#import "UXSourceController.h"
#import "UXWindowViewController.h"

#import "NSGestureRecognizer+UXKit.h"
#import "NSImage+UXKit.h"
#import "NSIndexPath+UXTableView.h"
#import "NSIndexPath+UXCollectionViewAdditions.h"
#import "NSResponder+UXKit.h"
#import "NSScrollView+UXKit.h"
#import "NSTextFieldCell+UXKit.h"
Expand Down
35 changes: 35 additions & 0 deletions UXSourceController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* UXKit headers, derived from reverse engineering
* Reversed by Adam D (kirb), licensed under WTFPL v2
*/

#import "UXViewController.h"

typedef NS_ENUM(NSUInteger, UXSourceControllerStyle) {
UXSourceControllerStyleTabBar,
UXSourceControllerStyleSplitView
};

@class _UXSourceSplitView;

@protocol UXSourceList;

@interface UXSourceController : UXViewController

@property (retain, nonatomic) NSArray *rootViewControllers;
@property (retain, nonatomic) UXViewController *selectedViewController;

@property (readonly, nonatomic) NSSegmentedControl *segmentedControl;
@property (readonly, nonatomic) _UXSourceSplitView *splitView;

@property (retain, nonatomic) UXViewController<UXSourceList> *sourceListViewController;
@property (copy, nonatomic) NSString *sourceListAutosaveName;

@property (nonatomic) UXSourceControllerStyle style;
@property (nonatomic) UXSourceControllerStyle preferredStyle;

@property (readonly, nonatomic) NSMapTable *transitionControllerClassByToViewControllerClass;
@property (readonly, nonatomic) NSMapTable *navigationControllerByRootViewController;
@property (readonly) NSOperationQueue *viewControllerOperations;

@end
2 changes: 0 additions & 2 deletions UXTableViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

@class UXTableView;

@protocol UXTableViewDataSource, UXTableViewDelegate;

@interface UXTableViewController : UXCollectionViewController <UXTableViewDataSource, UXTableViewDelegate>

@property (readonly, nonatomic) UXTableView *tableView;
Expand Down

0 comments on commit e0e964b

Please sign in to comment.