summaryrefslogtreecommitdiff
path: root/platform/macos/src/MGLAttributionButton.h
blob: 3e0b53a6d045f9395ca0be92c368c75f26dca8f1 (plain)
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
#import <Cocoa/Cocoa.h>

#import "MGLFoundation.h"
#import "MGLTypes.h"

NS_ASSUME_NONNULL_BEGIN

@class MGLAttributionInfo;

/// Button that looks like a hyperlink and opens a URL.
MGL_EXPORT
@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