-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
322 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2013-2014 Jeevanandam M. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
|
||
// | ||
// MHDisplayNotes.h | ||
// ReplyWithHeader | ||
// | ||
// Created by Jeevanandam M. on 9/9/14. | ||
// | ||
// | ||
|
||
@interface MHDisplayNotes : NSWindowController { | ||
__unsafe_unretained NSTextView *_notesView; | ||
NSString *_rtfPath; | ||
} | ||
|
||
@property (unsafe_unretained) IBOutlet NSTextView *notesView; | ||
|
||
- (id)initWithPath:(NSString *)rtfPath; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2013-2014 Jeevanandam M. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
|
||
// | ||
// MHDisplayNotes.m | ||
// ReplyWithHeader | ||
// | ||
// Created by Jeevanandam M. on 9/9/14. | ||
// | ||
// | ||
|
||
#import "MHDisplayNotes.h" | ||
|
||
@interface MHDisplayNotes () | ||
- (IBAction)closeDisplayNotes:(id)sender; | ||
@end | ||
|
||
@implementation MHDisplayNotes | ||
|
||
- (void)windowDidLoad | ||
{ | ||
[super windowDidLoad]; | ||
} | ||
|
||
- (NSString *)windowNibName { | ||
return NSStringFromClass([MHDisplayNotes class]); | ||
} | ||
|
||
- (void)awakeFromNib | ||
{ | ||
[[self window] setShowsResizeIndicator: NO]; | ||
[[self window] center]; | ||
|
||
[_notesView readRTFDFromFile:_rtfPath]; | ||
} | ||
|
||
- (id)initWithPath:(NSString *)rtfPath | ||
{ | ||
self = [super init]; | ||
if (self) | ||
{ | ||
[self setShouldCascadeWindows:NO]; | ||
|
||
_rtfPath = [rtfPath copy]; | ||
} | ||
return self; | ||
} | ||
|
||
- (IBAction)closeDisplayNotes:(id)sender | ||
{ | ||
[NSApp stopModal]; | ||
[self close]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> | ||
<dependencies> | ||
<deployment defaultVersion="1070" identifier="macosx"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/> | ||
</dependencies> | ||
<objects> | ||
<customObject id="-2" userLabel="File's Owner" customClass="MHDisplayNotes"> | ||
<connections> | ||
<outlet property="notesView" destination="tKf-J3-YiI" id="iNy-dB-Uwm"/> | ||
<outlet property="window" destination="F0z-JX-Cv5" id="gIp-Ho-8D9"/> | ||
</connections> | ||
</customObject> | ||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/> | ||
<customObject id="-3" userLabel="Application"/> | ||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" showsToolbarButton="NO" animationBehavior="default" id="F0z-JX-Cv5"> | ||
<windowStyleMask key="styleMask" closable="YES"/> | ||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> | ||
<rect key="contentRect" x="428" y="257" width="480" height="282"/> | ||
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="778"/> | ||
<view key="contentView" id="se5-gp-TjO"> | ||
<rect key="frame" x="0.0" y="0.0" width="480" height="282"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
<subviews> | ||
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pOy-x6-tRX"> | ||
<rect key="frame" x="374" y="19" width="86" height="19"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/> | ||
<buttonCell key="cell" type="roundRect" title="Close" bezelStyle="roundedRect" alignment="center" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="fq9-hS-aYS"> | ||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/> | ||
<font key="font" metaFont="cellTitle"/> | ||
</buttonCell> | ||
<connections> | ||
<action selector="closeDisplayNotes:" target="-2" id="H57-6g-mGl"/> | ||
</connections> | ||
</button> | ||
<scrollView fixedFrame="YES" borderType="groove" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4zr-Zz-3xc"> | ||
<rect key="frame" x="20" y="46" width="440" height="216"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
<clipView key="contentView" ambiguous="YES" misplaced="YES" id="JHS-Ya-Pc6"> | ||
<rect key="frame" x="2" y="2" width="436" height="212"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<subviews> | ||
<textView ambiguous="YES" editable="NO" selectable="NO" findStyle="panel" continuousSpellChecking="YES" usesRuler="YES" usesFontPanel="YES" verticallyResizable="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" linkDetection="YES" dashSubstitution="YES" spellingCorrection="YES" id="tKf-J3-YiI"> | ||
<rect key="frame" x="0.0" y="0.0" width="436" height="212"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
<size key="minSize" width="436" height="212"/> | ||
<size key="maxSize" width="463" height="10000000"/> | ||
<color key="insertionPointColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/> | ||
<size key="minSize" width="436" height="212"/> | ||
<size key="maxSize" width="463" height="10000000"/> | ||
</textView> | ||
</subviews> | ||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
</clipView> | ||
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="Nse-th-0gS"> | ||
<rect key="frame" x="2" y="186" width="436" height="16"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
</scroller> | ||
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="loP-kk-gXS"> | ||
<rect key="frame" x="422" y="2" width="16" height="200"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
</scroller> | ||
</scrollView> | ||
</subviews> | ||
</view> | ||
<connections> | ||
<outlet property="delegate" destination="-2" id="0bl-1N-AYu"/> | ||
</connections> | ||
</window> | ||
</objects> | ||
</document> |
Oops, something went wrong.