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

Commit

Permalink
Small fixes to various parts of the documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrozanski committed Jan 27, 2014
1 parent 92b64ab commit 8a64779
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 31 deletions.
14 changes: 7 additions & 7 deletions PXSourceList/PXSourceList.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
@param dataSource An object to use for the data source.
@since Requires PXSourceList 0.8 or above and the OS X v10.5 SDK.
@since Requires PXSourceList 0.8 or above and the OS X v10.5 SDK or above.
*/
- (void)setDataSource:(id<PXSourceListDataSource>)dataSource;

Expand All @@ -102,7 +102,7 @@
@param delegate An object to use for the delegate.
@since Requires PXSourceList 0.8 or above and the OS X v10.5 SDK.
@since Requires PXSourceList 0.8 or above and the OS X v10.5 SDK or above.
*/
- (void)setDelegate:(id<PXSourceListDelegate>)delegate;

Expand All @@ -117,7 +117,7 @@
@warning This property only applies when using `PXSourceList` in cell-based mode. If set on a Source List
operating in view-based mode, this value is not used.
@since Requires PXSourceList 0.8 or above and the OS X v10.5 SDK.
@since Requires PXSourceList 0.8 or above and the OS X v10.5 SDK or above.
*/

@property (nonatomic, assign) NSSize iconSize;
Expand All @@ -136,7 +136,7 @@
@discussion "Group" items are defined as root items in the Source List tree hierarchy.
@since Requires PXSourceList 0.8 or above and the OS X v10.5 SDK.
@since Requires PXSourceList 0.8 or above and the OS X v10.5 SDK or above.
*/
- (BOOL)isGroupItem:(id)item;

Expand All @@ -153,7 +153,7 @@
This method calls the `-sourceList:isGroupAlwaysExpanded:` method on the Source List's delegate to determine
whether the particular group item is displayed as always expanded or not.
@since Requires PXSourceList 0.8 or above and the OS X v10.5 SDK.
@since Requires PXSourceList 0.8 or above and the OS X v10.5 SDK or above.
*/
- (BOOL)isGroupAlwaysExpanded:(id)group;

Expand All @@ -173,7 +173,7 @@
@warning This method only applies when using a Source List in cell-based mode. If sent to a Source List in view-based mode, this
method returns `NO`.
@since Requires PXSourceList 0.8 or above and the OS X v10.5 SDK.
@since Requires PXSourceList 0.8 or above and the OS X v10.5 SDK or above.
*/
- (BOOL)itemHasBadge:(id)item;

Expand All @@ -189,7 +189,7 @@
@warning This method only applies when using a Source List in cell-based mode. If sent to a Source List in view-based mode, this
method returns `NSNotFound`.
@since Requires PXSourceList 0.8 or above and the OS X v10.5 SDK.
@since Requires PXSourceList 0.8 or above and the OS X v10.5 SDK or above.
*/
- (NSInteger)badgeValueForItem:(id)item;

Expand Down
4 changes: 2 additions & 2 deletions PXSourceList/PXSourceListBadgeCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#import <Cocoa/Cocoa.h>

/* This is the cell which backs drawing done by PXSourceListBadgeView, and is used for drawing badges
when using PXSourceList in cell-based mode.
/* This is the cell which backs drawing done by PXSourceListBadgeView, and is used internally for
drawing badges when PXSourceList is used in cell-based mode.
You shouldn't need to interact with this class directly.
*/
Expand Down
14 changes: 8 additions & 6 deletions PXSourceList/PXSourceListBadgeView.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,25 @@
///---------------------------------------------------------------------------------------
/**
@brief Returns the custom text colour used to display the receiver.
@discussion The default value for this property is `nil`. Set this property to `nil` to use the default
badge text colour.
@discussion The default value for this property is `nil`. Set this property to `nil` to use the default light badge text colour.
@see backgroundColor
@warning Note that this property is only respected when the row displaying the badge isn't highlighted. When the row is highlighted, the badge is displayed with a blue text colour.
@since Requires the Mac OS X 10.7 SDK or above.
@since Requires PXSourceList 2.0.0 and above and the Mac OS X 10.7 SDK or above.
*/
@property (strong, nonatomic) NSColor *textColor;

/**
@brief Returns the custom background colour used to display the receiver.
@discussion The default value for this property is `nil`. Set this property to `nil` to use the default
badge background colour.
@discussion The default value for this property is `nil`. Set this property to `nil` to use the default grey-blue badge background colour.
@see textColor
@warning Note that this property is only respected when the row displaying the badge isn't highlighted. When the row is highlighted, the badge is displayed with a white background colour.
@since Requires the Mac OS X 10.7 SDK or above.
@since Requires PXSourceList 2.0.0 and above and the Mac OS X 10.7 SDK or above.
*/
@property (strong, nonatomic) NSColor *backgroundColor;

Expand Down
22 changes: 11 additions & 11 deletions PXSourceList/PXSourceListItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
@see itemWithTitle:identifier:icon:
@see itemWithRepresentedObject:icon:
@since Requires the Mac OS X 10.7 SDK or above.
@since Requires PXSourceList 2.0.0 and above and the Mac OS X 10.7 SDK or above.
*/
+ (instancetype)itemWithTitle:(NSString *)title identifier:(NSString *)identifier;

Expand All @@ -85,7 +85,7 @@
@see itemWithTitle:identifier:
@see itemWithRepresentedObject:icon:
@since Requires the Mac OS X 10.7 SDK or above.
@since Requires PXSourceList 2.0.0 and above and the Mac OS X 10.7 SDK or above.
*/
+ (instancetype)itemWithTitle:(NSString *)title identifier:(NSString *)identifier icon:(NSImage *)icon;

Expand All @@ -99,7 +99,7 @@
@see itemWithTitle:identifier:
@see itemWithTitle:identifier:icon:
@since Requires the Mac OS X 10.7 SDK or above.
@since Requires PXSourceList 2.0.0 and above and the Mac OS X 10.7 SDK or above.
*/
+ (instancetype)itemWithRepresentedObject:(id)object icon:(NSImage *)icon;

Expand All @@ -114,7 +114,7 @@
@see hasChildren
@since Requires the Mac OS X 10.7 SDK or above.
@since Requires PXSourceList 2.0.0 and above and the Mac OS X 10.7 SDK or above.
*/
@property (strong, nonatomic) NSArray *children;

Expand All @@ -125,7 +125,7 @@
@see children
@since Requires the Mac OS X 10.7 SDK or above.
@since Requires PXSourceList 2.0.0 and above and the Mac OS X 10.7 SDK or above.
*/
- (BOOL)hasChildren;

Expand All @@ -140,7 +140,7 @@
@see insertChildItem:atIndex:
@since Requires the Mac OS X 10.7 SDK or above.
@since Requires PXSourceList 2.0.0 and above and the Mac OS X 10.7 SDK or above.
*/
- (void)addChildItem:(PXSourceListItem *)childItem;

Expand All @@ -157,7 +157,7 @@
@see addChildItem:
@see insertChildItems:atIndexes:
@since Requires the Mac OS X 10.7 SDK or above.
@since Requires PXSourceList 2.0.0 and above and the Mac OS X 10.7 SDK or above.
*/
- (void)insertChildItem:(PXSourceListItem *)childItem atIndex:(NSUInteger)index;

Expand All @@ -173,7 +173,7 @@
@see removeChildItemAtIndex:
@see removeChildItems:
@since Requires the Mac OS X 10.7 SDK or above.
@since Requires PXSourceList 2.0.0 and above and the Mac OS X 10.7 SDK or above.
*/
- (void)removeChildItem:(PXSourceListItem *)childItem;

Expand All @@ -189,7 +189,7 @@
@see removeChildItem:
@see removeChildItems:
@since Requires the Mac OS X 10.7 SDK or above.
@since Requires PXSourceList 2.0.0 and above and the Mac OS X 10.7 SDK or above.
*/
- (void)removeChildItemAtIndex:(NSUInteger)index;

Expand All @@ -205,7 +205,7 @@
@see removeChildItem:
@see removeChildItemAtIndex:
@since Requires the Mac OS X 10.7 SDK or above.
@since Requires PXSourceList 2.0.0 and above and the Mac OS X 10.7 SDK or above.
*/
- (void)removeChildItems:(NSArray *)items;

Expand All @@ -221,7 +221,7 @@
@see insertChildItem:atIndex:
@since Requires the Mac OS X 10.7 SDK or above.
@since Requires PXSourceList 2.0.0 and above and the Mac OS X 10.7 SDK or above.
*/
- (void)insertChildItems:(NSArray *)items atIndexes:(NSIndexSet *)indexes;

Expand Down
12 changes: 7 additions & 5 deletions PXSourceList/PXSourceListTableCellView.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,23 @@
and then configured in `sourceList:viewForItem:`.
`PXSourceListTableCellView` positions its `badgeView` automatically (as `NSTableCellView` does for the `textField`
and `imageView` outlets) to be positioned centred (vertically) and rightmost (horizontally). If you want to
change this positioning you can do so by creating a `PXSourceListTableCellView` subclass and overriding
`-layout`, but note that idiomatically, source lists display badges to the right of each row.
and `imageView` outlets) to be positioned centred (vertically) and rightmost (horizontally) within the table cell's
bounds. If you want to change this positioning you can do so by creating a `PXSourceListTableCellView` subclass and
overriding `-layout`, but note that idiomatically, source lists display badges to the right of each row.
*/
@interface PXSourceListTableCellView : NSTableCellView

/**
@brief The badge view displayed by the cell.
@discussion When a `PXSourceListTableCellView` instance is created, a `PXSourceListTableCellView` instance
is *not* automatically created and set to this property (just like with `NSTableCellView` and its
`textField` and `imageView` properties. This property is purely declared on this class to make creating
`textField` and `imageView` properties). This property is purely declared on this class to make creating
table cell views for a `PXSourceList` in Interface Builder easier without having to declare your own
`NSTableCellView` subclass.
This property is typically configured in the `PXSourceListDataSource` method `sourceList:viewForItem:`.
This property is typically configured in the `PXSourceListDelegate` method `sourceList:viewForItem:`.
@since Requires PXSourceList 2.0.0 and above and the Mac OS X 10.7 SDK or above.
*/
@property (weak, nonatomic) IBOutlet PXSourceListBadgeView *badgeView;

Expand Down

0 comments on commit 8a64779

Please sign in to comment.