-
Notifications
You must be signed in to change notification settings - Fork 1
/
IconStyleManager.h
86 lines (61 loc) · 2.78 KB
/
IconStyleManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//
// IconStyleManager.h
// Add Folder Icons
//
// Created by Andrew Hodgkinson on 24/01/2011.
// Copyright 2011 Hipposoft. All rights reserved.
//
// Handles Core Data storage, including storage or retrieval of IconStyle
// instances and establishing default styles if the Core Data store is empty.
// Monitoring for changes in the SlipCover case design collection is also
// done here; the Core Data store contents are automatically updated.
//
// Always use "+iconStyleManager" to obtain references to instances of this
// class.
//
#import <Cocoa/Cocoa.h>
#import "IconStyle.h"
#import "CoreDataObjectIDTransformer.h"
#import "SCEventListenerProtocol.h"
#import "SCEvents.h"
#define TEST @"hello" @"there"
#define CORE_DATA_STORE_FILENAME @"Icon Styles.xml"
#define CORE_DATA_OBJECT_ID_TRANSFORMER_NAME @"CoreDataObjectIDTransformer"
#define ICON_STYLE_PRESET_PREFIX @"Preset: "
#define DEFAULT_ICON_STYLE_NAME NSLocalizedString( ICON_STYLE_PRESET_PREFIX "Classic thumbnails", @"Name of 'classic' preset icon style" )
#define PREFERENCES_DEFAULT_STYLE_KEY @"defaultStyle"
@interface IconStyleManager : NSObject < SCEventListenerProtocol,
NSAlertDelegate >
{
/* Boilerplate Core Data material generated by Interface Builder 3.2.5 */
NSPersistentStoreCoordinator * persistentStoreCoordinator;
NSManagedObjectModel * managedObjectModel;
NSManagedObjectContext * managedObjectContext;
/* Boilerplate ends */
CoreDataObjectIDTransformer * coreDataObjectIDTransformer;
NSMutableArray * slipCoverDefinitions;
SCEvents * slipCoverCaseFolderWatcher;
}
/* Boilerplate Core Data material generated by Interface Builder 3.2.5 */
@property ( strong, readonly ) NSPersistentStoreCoordinator * persistentStoreCoordinator;
@property ( strong, readonly ) NSManagedObjectModel * managedObjectModel;
@property ( strong, readonly ) NSManagedObjectContext * managedObjectContext;
/* Boilerplate ends */
/* Other properties */
@property ( strong, readonly ) NSMutableArray * slipCoverDefinitions;
/* Allocation and initialisation */
+ ( IconStyleManager * ) iconStyleManager;
/* General methods */
- ( void ) establishPresetIconStyles;
- ( void ) establishSlipCoverIconStyles;
- ( NSArray * ) findSlipCoverStyles;
- ( IconStyle * ) findStyleByName: ( NSString * ) name;
- ( IconStyle * ) findDefaultIconStyle;
- ( IconStyle * ) findClassicIconStyle;
- ( NSArray * ) getStyles;
- ( IconStyle * ) insertBlankUserStyleAndProcessChanges;
/* Implement SCEventListenerProtocol */
- ( void ) pathWatcher: ( SCEvents * ) pathWatcher eventOccurred: ( SCEvent * ) event;
/* Implement NSAlertDelegate */
- ( BOOL ) alertShowHelp: ( NSAlert * ) alert;
@end