summaryrefslogtreecommitdiff
path: root/platform/macos/src/MGLAttributionButton.h
blob: 88fcdadf78af7e0e8f6ac4f8d4875ab4cfee96e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#import <Cocoa/Cocoa.h>

#import "MGLTypes.h"

NS_ASSUME_NONNULL_BEGIN

@class MGLAttributionInfo;

/// Button that looks like a hyperlink and opens a URL.
@interface MGLAttributionButton : NSButton

/// Returns an `MGLAttributionButton` instance with the given info.
- (instancetype)initWithAttributionInfo:(MGLAttributionInfo *)info;

/// The URL to open and display as a tooltip.
@property (nonatomic, readonly, nullable) NSURL *URL;

/// Opens the URL.
- (IBAction)openURL:(nullable id)sender;

@end

NS_ASSUME_NONNULL_END