Extracted context bar for trash, history and filter browsing. Some regressions in focus handling were introduced. History tab will go away as this will be incorporated in the entry comparable to searching. Code cleanup. Moved copying to KeePassKit

This commit is contained in:
michael starke
2013-12-18 02:29:25 +01:00
parent 21355101ed
commit 92d963a9ef
27 changed files with 800 additions and 577 deletions

View File

@@ -0,0 +1,54 @@
//
// MPContextBarViewController.h
// MacPass
//
// Created by Michael Starke on 16/12/13.
// Copyright (c) 2013 HicknHack Software GmbH. All rights reserved.
//
#import "MPViewController.h"
@protocol MPContextBarDelegate <NSObject>
@optional
- (void)contextBarDidChangeFilter;
- (void)contextBarDidExitFilter;
- (void)contextBarDidExitHistory;
- (void)contextBarShouldEmptyTrash;
@end
typedef NS_OPTIONS(NSUInteger, MPFilterModeType) {
MPFilterNone = 0,
MPFilterUrls = (1<<0),
MPFilterUsernames = (1<<1),
MPFilterTitles = (1<<2),
MPFilterPasswords = (1<<3),
};
@class HNHGradientView;
@interface MPContextBarViewController : MPViewController
@property (nonatomic, assign) MPFilterModeType filterMode;
@property (nonatomic, readonly) BOOL hasFilter;
@property (nonatomic, weak) id<MPContextBarDelegate> delegate;
- (NSString *)filterString;
- (NSArray *)filterPredicates;
- (IBAction)toggleFilterSpace:(id)sender;
- (BOOL)showsFilter;
- (BOOL)showsHistory;
- (BOOL)showsTrash;
- (void)exitFilter;
- (void)showFilter;
- (void)showHistory;
- (void)showTrash;
- (void)enable;
- (void)disable;
@end