Added MPExpressionView
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5023" systemVersion="13A603" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13C64" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5023"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<objects>
|
<objects>
|
||||||
<customObject id="-2" userLabel="File's Owner" customClass="MPDocument">
|
<customObject id="-2" userLabel="File's Owner" customClass="MPDocument">
|
||||||
@@ -11,29 +11,34 @@
|
|||||||
</customObject>
|
</customObject>
|
||||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||||
<customObject id="-3" userLabel="Application"/>
|
<customObject id="-3" userLabel="Application"/>
|
||||||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="xOd-HO-29H" userLabel="Window">
|
<window title="MathPad" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="xOd-HO-29H" userLabel="Window">
|
||||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||||
<rect key="contentRect" x="133" y="235" width="507" height="413"/>
|
<rect key="contentRect" x="133" y="235" width="507" height="240"/>
|
||||||
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1028"/>
|
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1058"/>
|
||||||
<value key="minSize" type="size" width="94" height="86"/>
|
<value key="minSize" type="size" width="94" height="86"/>
|
||||||
<view key="contentView" id="gIp-Ho-8D9">
|
<view key="contentView" id="gIp-Ho-8D9">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="507" height="413"/>
|
<rect key="frame" x="0.0" y="0.0" width="507" height="240"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="Hz6-mo-xeY">
|
<customView translatesAutoresizingMaskIntoConstraints="NO" id="fqc-IQ-ceJ" customClass="MPExpressionView">
|
||||||
<rect key="frame" x="119" y="195" width="268" height="22"/>
|
<rect key="frame" x="20" y="124" width="467" height="96"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="center" title="Your document contents here" id="JDq-Ah-v2f">
|
</customView>
|
||||||
<font key="font" metaFont="system" size="18"/>
|
<customView translatesAutoresizingMaskIntoConstraints="NO" id="lcd-Ip-jjR" customClass="MPExpressionView">
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<rect key="frame" x="20" y="20" width="467" height="96"/>
|
||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
</textFieldCell>
|
</customView>
|
||||||
</textField>
|
|
||||||
</subviews>
|
</subviews>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="OG3-1c-Sd0"/>
|
<constraint firstItem="lcd-Ip-jjR" firstAttribute="top" secondItem="fqc-IQ-ceJ" secondAttribute="bottom" constant="8" symbolic="YES" id="GTC-QI-4wc"/>
|
||||||
<constraint firstAttribute="centerY" secondItem="Hz6-mo-xeY" secondAttribute="centerY" id="s6i-b7-llN"/>
|
<constraint firstItem="fqc-IQ-ceJ" firstAttribute="trailing" secondItem="lcd-Ip-jjR" secondAttribute="trailing" id="Pth-4c-GNR"/>
|
||||||
|
<constraint firstAttribute="bottom" secondItem="lcd-Ip-jjR" secondAttribute="bottom" constant="20" symbolic="YES" id="VNk-bs-YOH"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="fqc-IQ-ceJ" secondAttribute="trailing" constant="20" symbolic="YES" id="fER-QH-XqN"/>
|
||||||
|
<constraint firstItem="fqc-IQ-ceJ" firstAttribute="top" secondItem="gIp-Ho-8D9" secondAttribute="top" constant="20" symbolic="YES" id="kpD-MX-yOS"/>
|
||||||
|
<constraint firstItem="fqc-IQ-ceJ" firstAttribute="leading" secondItem="gIp-Ho-8D9" secondAttribute="leading" constant="20" symbolic="YES" id="to2-nb-CUV"/>
|
||||||
|
<constraint firstItem="fqc-IQ-ceJ" firstAttribute="leading" secondItem="lcd-Ip-jjR" secondAttribute="leading" id="xJa-Qd-Ytg"/>
|
||||||
|
<constraint firstItem="lcd-Ip-jjR" firstAttribute="top" secondItem="gIp-Ho-8D9" secondAttribute="top" constant="124" id="xrY-1x-QCm"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</view>
|
</view>
|
||||||
<connections>
|
<connections>
|
||||||
|
|||||||
18
MathPad/MPExpressionView.h
Normal file
18
MathPad/MPExpressionView.h
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
//
|
||||||
|
// MPExpressionView.h
|
||||||
|
// MathPad
|
||||||
|
//
|
||||||
|
// Created by Kim Wittenburg on 17.04.14.
|
||||||
|
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
|
@class MPExpressionView, MPRange;
|
||||||
|
|
||||||
|
@interface MPExpressionView : NSView
|
||||||
|
|
||||||
|
@property (nonatomic, getter = isEditable) BOOL editable;
|
||||||
|
@property (nonatomic, strong) MPRange *selection;
|
||||||
|
|
||||||
|
@end
|
||||||
29
MathPad/MPExpressionView.m
Normal file
29
MathPad/MPExpressionView.m
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
//
|
||||||
|
// MPExpressionView.m
|
||||||
|
// MathPad
|
||||||
|
//
|
||||||
|
// Created by Kim Wittenburg on 17.04.14.
|
||||||
|
// Copyright (c) 2014 Kim Wittenburg. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MPExpressionView.h"
|
||||||
|
|
||||||
|
@implementation MPExpressionView
|
||||||
|
|
||||||
|
- (id)initWithFrame:(NSRect)frame
|
||||||
|
{
|
||||||
|
self = [super initWithFrame:frame];
|
||||||
|
if (self) {
|
||||||
|
// Initialization code here.
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)drawRect:(NSRect)dirtyRect
|
||||||
|
{
|
||||||
|
[super drawRect:dirtyRect];
|
||||||
|
|
||||||
|
// Drawing code here.
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
Reference in New Issue
Block a user