Files
MapLibreParticleLab/platform/osx/app/AppDelegate.h
Minh Nguyễn 0a23d4fe39 [osx] Restore last window regardless of system preference
Even with the system preference set to close windows when quitting, the user would still expect this map-centric application to remember the last viewed map, because the world map isn’t quite as interesting.
2016-01-04 11:40:31 -08:00

23 lines
861 B
Objective-C

#import <Mapbox/Mapbox.h>
extern NSString * const MGLMapboxAccessTokenDefaultsKey;
@interface AppDelegate : NSObject <NSApplicationDelegate>
@property (weak) IBOutlet NSWindow *preferencesWindow;
// Normally, an application should respect the “Close windows when quitting an
// application” setting in the General pane of System Preferences. But the map
// would only be restored to its last opened location if the user quits the
// application using Quit and Keep Windows. An application that displays only a
// map should restore the last viewed map, like Maps.app does. These properties
// temporarily hold state for the next map window to be opened.
@property (assign) double pendingZoomLevel;
@property (copy) MGLMapCamera *pendingCamera;
@property (copy) NSURL *pendingStyleURL;
@property (assign) MGLMapDebugMaskOptions pendingDebugMask;
@end