From 449b50737c28a3274abb1200ab54711ce0e659bc Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Thu, 22 Oct 2015 18:52:18 +0200 Subject: MacGui: rewrote the subtitles tab to use bindings, view-based table view and to support undo/redo. --- macosx/HBSubtitles.h | 41 ++++++++--------------------------------- 1 file changed, 8 insertions(+), 33 deletions(-) (limited to 'macosx/HBSubtitles.h') diff --git a/macosx/HBSubtitles.h b/macosx/HBSubtitles.h index 29487dd6c..0a2c56594 100644 --- a/macosx/HBSubtitles.h +++ b/macosx/HBSubtitles.h @@ -9,24 +9,8 @@ NS_ASSUME_NONNULL_BEGIN -extern NSString *keySubTrackSelectionIndex; -extern NSString *keySubTrackName; -extern NSString *keySubTrackIndex; -extern NSString *keySubTrackLanguage; -extern NSString *keySubTrackLanguageIsoCode; -extern NSString *keySubTrackType; - -extern NSString *keySubTrackForced; -extern NSString *keySubTrackBurned; -extern NSString *keySubTrackDefault; - -extern NSString *keySubTrackSrtOffset; -extern NSString *keySubTrackSrtFilePath; -extern NSString *keySubTrackSrtCharCode; -extern NSString *keySubTrackSrtCharCodeIndex; -extern NSString *keySubTrackLanguageIndex; - @class HBTitle; +@class HBSubtitlesTrack; @class HBSubtitlesDefaults; @interface HBSubtitles : NSObject @@ -37,35 +21,26 @@ extern NSString *keySubTrackLanguageIndex; - (void)removeAll; - (void)reloadDefaults; -- (void)validatePassthru; -- (NSMutableDictionary *)createSubtitleTrack; -- (NSMutableDictionary *)trackFromSourceTrackIndex:(NSInteger)index; - -@property (nonatomic, readonly) NSMutableArray *masterTrackArray; // the master list of audio tracks from the title -@property (nonatomic, readonly) NSMutableArray *tracks; +- (void)addSrtTrackFromURL:(NSURL *)srtURL; -@property (nonatomic, readwrite, strong) NSString *foreignAudioSearchTrackName; -@property (nonatomic, readonly) NSArray *charCodeArray; - -@property (nonatomic, readonly) NSArray *languagesArray; -@property (nonatomic, readonly) NSInteger languagesArrayDefIndex; +@property (nonatomic, readonly) NSMutableArray *sourceTracks; +@property (nonatomic, readonly) NSMutableArray *tracks; @property (nonatomic, readwrite, strong) HBSubtitlesDefaults *defaults; /** * For internal use */ - -- (void)containerChanged:(int)container; -@property (nonatomic, readwrite) int container; // initially is the default HB_MUX_MP4 +@property (nonatomic, readwrite) int container; +@property (nonatomic, readwrite, weak, nullable) NSUndoManager *undo; @end @interface HBSubtitles (KVC) @property (nonatomic, readonly) NSUInteger countOfTracks; -- (id)objectInTracksAtIndex:(NSUInteger)index; -- (void)insertObject:(id)audioObject inTracksAtIndex:(NSUInteger)index; +- (HBSubtitlesTrack *)objectInTracksAtIndex:(NSUInteger)index; +- (void)insertObject:(HBSubtitlesTrack *)audioObject inTracksAtIndex:(NSUInteger)index; - (void)removeObjectFromTracksAtIndex:(NSUInteger)index; @end -- cgit v1.2.3