Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian William Wolter committed Aug 14, 2011
2 parents 8752c11 + 4741c79 commit 24ba66a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
16 changes: 16 additions & 0 deletions TwUI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@
88CC1F3A13E3684700827793 /* TUIButton+Accessibility.m in Sources */ = {isa = PBXBuildFile; fileRef = 88CC1F3613E3684600827793 /* TUIButton+Accessibility.m */; };
88CC1F3B13E3684700827793 /* TUIButton+Accessibility.m in Sources */ = {isa = PBXBuildFile; fileRef = 88CC1F3613E3684600827793 /* TUIButton+Accessibility.m */; };
88CC1F3C13E3684700827793 /* TUIButton+Accessibility.m in Sources */ = {isa = PBXBuildFile; fileRef = 88CC1F3613E3684600827793 /* TUIButton+Accessibility.m */; };
88D25F5513F5D96500CFAAA9 /* TUITableView+Cell.h in Headers */ = {isa = PBXBuildFile; fileRef = 88D25F5313F5D96500CFAAA9 /* TUITableView+Cell.h */; };
88D25F5613F5D96500CFAAA9 /* TUITableView+Cell.h in Headers */ = {isa = PBXBuildFile; fileRef = 88D25F5313F5D96500CFAAA9 /* TUITableView+Cell.h */; };
88D25F5713F5D96500CFAAA9 /* TUITableView+Cell.h in Headers */ = {isa = PBXBuildFile; fileRef = 88D25F5313F5D96500CFAAA9 /* TUITableView+Cell.h */; };
88D25F5813F5D96500CFAAA9 /* TUITableView+Cell.m in Sources */ = {isa = PBXBuildFile; fileRef = 88D25F5413F5D96500CFAAA9 /* TUITableView+Cell.m */; };
88D25F5913F5D96500CFAAA9 /* TUITableView+Cell.m in Sources */ = {isa = PBXBuildFile; fileRef = 88D25F5413F5D96500CFAAA9 /* TUITableView+Cell.m */; };
88D25F5A13F5D96500CFAAA9 /* TUITableView+Cell.m in Sources */ = {isa = PBXBuildFile; fileRef = 88D25F5413F5D96500CFAAA9 /* TUITableView+Cell.m */; };
88EFFB5113F417E200CF91A9 /* TUITextViewEditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 88EFFB4F13F417E200CF91A9 /* TUITextViewEditor.h */; };
88EFFB5213F417E200CF91A9 /* TUITextViewEditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 88EFFB4F13F417E200CF91A9 /* TUITextViewEditor.h */; };
88EFFB5313F417E200CF91A9 /* TUITextViewEditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 88EFFB4F13F417E200CF91A9 /* TUITextViewEditor.h */; };
Expand Down Expand Up @@ -264,6 +270,8 @@
88CC1F2E13E365B500827793 /* TUIControl+Accessibility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "TUIControl+Accessibility.m"; sourceTree = "<group>"; };
88CC1F3513E3684400827793 /* TUIButton+Accessibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "TUIButton+Accessibility.h"; sourceTree = "<group>"; };
88CC1F3613E3684600827793 /* TUIButton+Accessibility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "TUIButton+Accessibility.m"; sourceTree = "<group>"; };
88D25F5313F5D96500CFAAA9 /* TUITableView+Cell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "TUITableView+Cell.h"; sourceTree = "<group>"; };
88D25F5413F5D96500CFAAA9 /* TUITableView+Cell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "TUITableView+Cell.m"; sourceTree = "<group>"; };
88EFFB4F13F417E200CF91A9 /* TUITextViewEditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TUITextViewEditor.h; sourceTree = "<group>"; };
88EFFB5013F417E200CF91A9 /* TUITextViewEditor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TUITextViewEditor.m; sourceTree = "<group>"; };
CB5B264C13BE6DA200579B1E /* TwUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TwUI.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -583,6 +591,8 @@
CBB74C7213BE6E1900C85CB5 /* TUITableView.m */,
CBB74C7313BE6E1900C85CB5 /* TUITableViewCell.h */,
CBB74C7413BE6E1900C85CB5 /* TUITableViewCell.m */,
88D25F5313F5D96500CFAAA9 /* TUITableView+Cell.h */,
88D25F5413F5D96500CFAAA9 /* TUITableView+Cell.m */,
CBB74C7513BE6E1900C85CB5 /* TUITextEditor.h */,
CBB74C7613BE6E1900C85CB5 /* TUITextEditor.m */,
CBB74C7713BE6E1900C85CB5 /* TUITextField.h */,
Expand Down Expand Up @@ -633,6 +643,7 @@
88CC1F3113E365B600827793 /* TUIControl+Accessibility.h in Headers */,
88CC1F3913E3684700827793 /* TUIButton+Accessibility.h in Headers */,
88EFFB5313F417E200CF91A9 /* TUITextViewEditor.h in Headers */,
88D25F5713F5D96500CFAAA9 /* TUITableView+Cell.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -687,6 +698,7 @@
88CC1F2F13E365B600827793 /* TUIControl+Accessibility.h in Headers */,
88CC1F3713E3684700827793 /* TUIButton+Accessibility.h in Headers */,
88EFFB5113F417E200CF91A9 /* TUITextViewEditor.h in Headers */,
88D25F5513F5D96500CFAAA9 /* TUITableView+Cell.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -700,6 +712,7 @@
88CC1F3013E365B600827793 /* TUIControl+Accessibility.h in Headers */,
88CC1F3813E3684700827793 /* TUIButton+Accessibility.h in Headers */,
88EFFB5213F417E200CF91A9 /* TUITextViewEditor.h in Headers */,
88D25F5613F5D96500CFAAA9 /* TUITableView+Cell.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -898,6 +911,7 @@
88CC1F3413E365B600827793 /* TUIControl+Accessibility.m in Sources */,
88CC1F3C13E3684700827793 /* TUIButton+Accessibility.m in Sources */,
88EFFB5613F417E200CF91A9 /* TUITextViewEditor.m in Sources */,
88D25F5A13F5D96500CFAAA9 /* TUITableView+Cell.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -957,6 +971,7 @@
88CC1F3213E365B600827793 /* TUIControl+Accessibility.m in Sources */,
88CC1F3A13E3684700827793 /* TUIButton+Accessibility.m in Sources */,
88EFFB5413F417E200CF91A9 /* TUITextViewEditor.m in Sources */,
88D25F5813F5D96500CFAAA9 /* TUITableView+Cell.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -1025,6 +1040,7 @@
88CC1F3313E365B600827793 /* TUIControl+Accessibility.m in Sources */,
88CC1F3B13E3684700827793 /* TUIButton+Accessibility.m in Sources */,
88EFFB5513F417E200CF91A9 /* TUITextViewEditor.m in Sources */,
88D25F5913F5D96500CFAAA9 /* TUITableView+Cell.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
1 change: 1 addition & 0 deletions lib/UIKit/TUITableView.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ typedef enum {
- (void)tableView:(TUITableView *)tableView didClickRowAtIndexPath:(TUIFastIndexPath *)indexPath withEvent:(NSEvent *)event; // happens on left/right mouse up (can look at clickCount)

- (BOOL)tableView:(TUITableView*)tableView shouldSelectRowAtIndexPath:(TUIFastIndexPath*)indexPath forEvent:(NSEvent*)event; // YES, if not implemented
- (NSMenu *)tableView:(TUITableView *)tableView menuForRowAtIndexPath:(TUIFastIndexPath *)indexPath withEvent:(NSEvent *)event;

// the following are good places to update or restore state (such as selection) when the table data reloads
- (void)tableViewWillReloadData:(TUITableView *)tableView;
Expand Down
9 changes: 9 additions & 0 deletions lib/UIKit/TUITableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,15 @@ - (void)rightMouseUp:(NSEvent *)event{
}
}

- (NSMenu *)menuForEvent:(NSEvent *)event
{
if([self.tableView.delegate respondsToSelector:@selector(tableView:menuForRowAtIndexPath:withEvent:)]) {
return [self.tableView.delegate tableView:self.tableView menuForRowAtIndexPath:self.indexPath withEvent:event];
} else {
return [super menuForEvent:event];
}
}

- (BOOL)isHighlighted
{
return _tableViewCellFlags.highlighted;
Expand Down

0 comments on commit 24ba66a

Please sign in to comment.