Files
gitx/PBHistorySearchController.h
T
Nathan Kinsinger c605b74476 Add a File Path search mode
Highlights any commit that touches a file.

The "Show history of file" context menu item will now set the path search instead of creating a rev specifier.
2010-09-12 19:33:01 -06:00

67 lines
1.6 KiB
Objective-C

//
// PBHistorySearchController.h
// GitX
//
// Created by Nathan Kinsinger on 8/21/10.
// Copyright 2010 Nathan Kinsinger. All rights reserved.
//
#import <Cocoa/Cocoa.h>
typedef enum historySearchModes {
kGitXBasicSeachMode = 1,
kGitXPickaxeSearchMode,
kGitXRegexSearchMode,
kGitXPathSearchMode,
kGitXMaxSearchMode // always keep this item last
} PBHistorySearchMode;
@class PBGitHistoryController;
@interface PBHistorySearchController : NSObject {
PBGitHistoryController *historyController;
NSArrayController *commitController;
PBHistorySearchMode searchMode;
NSIndexSet *results;
NSSearchField *searchField;
NSSegmentedControl *stepper;
NSTextField *numberOfMatchesField;
NSProgressIndicator *progressIndicator;
NSTimer *searchTimer;
NSTask *backgroundSearchTask;
NSPanel *rewindPanel;
}
@property (assign) IBOutlet PBGitHistoryController *historyController;
@property (assign) IBOutlet NSArrayController *commitController;
@property (assign) IBOutlet NSSearchField *searchField;
@property (assign) IBOutlet NSSegmentedControl *stepper;
@property (assign) IBOutlet NSTextField *numberOfMatchesField;
@property (assign) IBOutlet NSProgressIndicator *progressIndicator;
@property (assign) PBHistorySearchMode searchMode;
- (BOOL)isRowInSearchResults:(NSInteger)rowIndex;
- (BOOL)hasSearchResults;
- (void)selectSearchMode:(id)sender;
- (void)selectNextResult;
- (void)selectPreviousResult;
- (IBAction)stepperPressed:(id)sender;
- (void)clearSearch;
- (IBAction)updateSearch:(id)sender;
- (void)setHistorySearch:(NSString *)searchString mode:(NSInteger)mode;
@end