aboutsummaryrefslogtreecommitdiffstats
path: root/Framework/MASShortcutView.h
diff options
context:
space:
mode:
authorTomáš Znamenáček2014-08-05 11:13:13 +0200
committerTomáš Znamenáček2015-01-07 15:05:11 +0100
commit377b44220f2a4a8b7ffc3eda9e93cf073e8a74da (patch)
treeb83239fd741773451bd9a75480ebe5a276c7d885 /Framework/MASShortcutView.h
parenta3a459b4e4e47bf18dccd5dc7f315389346e3d6c (diff)
downloadMASShortcut-377b44220f2a4a8b7ffc3eda9e93cf073e8a74da.tar.bz2
Repackaged the code as a framework and included the demo.
Packaging the code as a framework is mostly just a formality. It doesn’t really change much, it just turns the code into a regular component. What it does change is that the code now has its own Xcode settings, which could make compatibility easier in the long run. Including the demo in the main repository makes it easier to hack on the library, since you can try the changes immediately. It also shows how to bundle the framework into an app that uses it.
Diffstat (limited to 'Framework/MASShortcutView.h')
-rw-r--r--Framework/MASShortcutView.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/Framework/MASShortcutView.h b/Framework/MASShortcutView.h
new file mode 100644
index 0000000..c8a46bb
--- /dev/null
+++ b/Framework/MASShortcutView.h
@@ -0,0 +1,23 @@
+#import <AppKit/AppKit.h>
+
+@class MASShortcut;
+
+typedef enum {
+ MASShortcutViewAppearanceDefault = 0, // Height = 19 px
+ MASShortcutViewAppearanceTexturedRect, // Height = 25 px
+ MASShortcutViewAppearanceRounded, // Height = 43 px
+ MASShortcutViewAppearanceFlat
+} MASShortcutViewAppearance;
+
+@interface MASShortcutView : NSView
+
+@property (nonatomic, strong) MASShortcut *shortcutValue;
+@property (nonatomic, getter = isRecording) BOOL recording;
+@property (nonatomic, getter = isEnabled) BOOL enabled;
+@property (nonatomic, copy) void (^shortcutValueChange)(MASShortcutView *sender);
+@property (nonatomic) MASShortcutViewAppearance appearance;
+
+/// Returns custom class for drawing control.
++ (Class)shortcutCellClass;
+
+@end