diff --git a/Frameworks/OCHamcrest.framework/Headers b/Frameworks/OCHamcrest.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/Frameworks/OCHamcrest.framework/OCHamcrest b/Frameworks/OCHamcrest.framework/OCHamcrest new file mode 120000 index 0000000..7d4d801 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/OCHamcrest @@ -0,0 +1 @@ +Versions/Current/OCHamcrest \ No newline at end of file diff --git a/Frameworks/OCHamcrest.framework/Resources b/Frameworks/OCHamcrest.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAllOf.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAllOf.h new file mode 100644 index 0000000..5b86261 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAllOf.h @@ -0,0 +1,45 @@ +// +// OCHamcrest - HCAllOf.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCAllOf : HCBaseMatcher +{ + NSArray *matchers; +} + ++ (instancetype)allOf:(NSArray *)theMatchers; +- (instancetype)initWithMatchers:(NSArray *)theMatchers; + +@end + + +OBJC_EXPORT id HC_allOf(id match, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + allOf(firstMatcher, ...) - + Matches if all of the given matchers evaluate to @c YES. + + @param firstMatcher,... A comma-separated list of matchers ending with @c nil. + + The matchers are evaluated from left to right using short-circuit evaluation, so evaluation + stops as soon as a matcher returns @c NO. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_allOf instead.) + + @ingroup logical_matchers + */ +#ifdef HC_SHORTHAND + #define allOf HC_allOf +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAnyOf.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAnyOf.h new file mode 100644 index 0000000..58d1b52 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAnyOf.h @@ -0,0 +1,45 @@ +// +// OCHamcrest - HCAnyOf.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCAnyOf : HCBaseMatcher +{ + NSArray *matchers; +} + ++ (instancetype)anyOf:(NSArray *)theMatchers; +- (instancetype)initWithMatchers:(NSArray *)theMatchers; + +@end + + +OBJC_EXPORT id HC_anyOf(id match, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + anyOf(firstMatcher, ...) - + Matches if any of the given matchers evaluate to @c YES. + + @param firstMatcher,... A comma-separated list of matchers ending with @c nil. + + The matchers are evaluated from left to right using short-circuit evaluation, so evaluation + stops as soon as a matcher returns @c YES. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_anyOf instead.) + + @ingroup logical_matchers + */ +#ifdef HC_SHORTHAND + #define anyOf HC_anyOf +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAssertThat.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAssertThat.h new file mode 100644 index 0000000..55b538c --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAssertThat.h @@ -0,0 +1,42 @@ +// +// OCHamcrest - HCAssertThat.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + +@protocol HCMatcher; + + +OBJC_EXPORT void HC_assertThatWithLocation(id testCase, id actual, id matcher, + const char *fileName, int lineNumber); + +#define HC_assertThat(actual, matcher) \ + HC_assertThatWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThat(actual, matcher) - + Asserts that actual value satisfies matcher. + + @param actual The object to evaluate as the actual value. + @param matcher The matcher to satisfy as the expected condition. + + @c assertThat passes the actual value to the matcher for evaluation. If the matcher is not + satisfied, an exception is thrown describing the mismatch. + + @c assertThat is designed to integrate well with OCUnit and other unit testing frameworks. + Unmet assertions are reported as test failures. In Xcode, these failures can be clicked to + reveal the line of the assertion. + + In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThat instead. + + @ingroup integration + */ +#ifdef HC_SHORTHAND + #define assertThat HC_assertThat +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCBaseDescription.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCBaseDescription.h new file mode 100644 index 0000000..ecbdee0 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCBaseDescription.h @@ -0,0 +1,33 @@ +// +// OCHamcrest - HCBaseDescription.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import +#import + + +/** + Base class for all HCDescription implementations. + + @ingroup core + */ +@interface HCBaseDescription : NSObject +@end + + +/** + Methods that must be provided by subclasses of HCBaseDescription. + */ +@interface HCBaseDescription (SubclassMustImplement) + +/** + Append the string @a str to the description. + */ +- (void)append:(NSString *)str; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCBaseMatcher.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCBaseMatcher.h new file mode 100644 index 0000000..e26849c --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCBaseMatcher.h @@ -0,0 +1,27 @@ +// +// OCHamcrest - HCBaseMatcher.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import +#import + +#import // Convenience header, to provide OBJC_EXPORT + + +/** + Base class for all HCMatcher implementations. + + Most implementations can just implement @c -matches: and let + -matches:describingMismatchTo: call it. But if it makes more sense to generate the + mismatch description during the matching, override -matches:describingMismatchTo: + and have @c -matches: call it with a @c nil description. + + @ingroup core + */ +@interface HCBaseMatcher : NSObject +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCClassMatcher.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCClassMatcher.h new file mode 100644 index 0000000..8e249df --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCClassMatcher.h @@ -0,0 +1,20 @@ +// +// OCHamcrest - HCClassMatcher.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCClassMatcher : HCBaseMatcher +{ + Class theClass; +} + +- (instancetype)initWithType:(Class)type; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCCollectMatchers.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCCollectMatchers.h new file mode 100644 index 0000000..b8684a2 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCCollectMatchers.h @@ -0,0 +1,23 @@ +// +// OCHamcrest - HCCollectMatchers.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import +#import + +#import + +@protocol HCMatcher; + + +/** + Returns an array of matchers from a variable-length comma-separated list terminated by @c nil. + + @ingroup helpers +*/ +OBJC_EXPORT NSMutableArray *HCCollectMatchers(id item1, va_list args); diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCConformsToProtocol.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCConformsToProtocol.h new file mode 100644 index 0000000..a185fee --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCConformsToProtocol.h @@ -0,0 +1,42 @@ +// +// OCHamcrest - HCConformsToProtocol.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Todd Farrell +// + +#import + + +@interface HCConformsToProtocol : HCBaseMatcher +{ + Protocol *theProtocol; +} + ++ (instancetype)conformsTo:(Protocol *)protocol; +- (instancetype)initWithProtocol:(Protocol *)protocol; + +@end + + +OBJC_EXPORT id HC_conformsTo(Protocol *aProtocol); + +/** + conformsTo(aProtocol) - + Matches if object conforms to a given protocol. + + @param aProtocol The protocol to compare against as the expected protocol. + + This matcher checks whether the evaluated object conforms to @a aProtocol. + + Example: + @li @ref conformsTo(\@protocol(NSObject)) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_conformsTo instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define conformsTo HC_conformsTo +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCDescribedAs.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCDescribedAs.h new file mode 100644 index 0000000..0b3e804 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCDescribedAs.h @@ -0,0 +1,50 @@ +// +// OCHamcrest - HCDescribedAs.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCDescribedAs : HCBaseMatcher +{ + NSString *descriptionTemplate; + id matcher; + NSArray *values; +} + ++ (instancetype)describedAs:(NSString *)description + forMatcher:(id )aMatcher + overValues:(NSArray *)templateValues; + +- (instancetype)initWithDescription:(NSString *)description + forMatcher:(id )aMatcher + overValues:(NSArray *)templateValues; + +@end + + +OBJC_EXPORT id HC_describedAs(NSString *description, id matcher, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + describedAs(description, matcher, ...) - + Adds custom failure description to a given matcher. + + @param description Overrides the matcher's description. + @param matcher,... The matcher to satisfy, followed by a comma-separated list of substitution values ending with @c nil. + + The description may contain substitution placeholders \%0, \%1, etc. These will be replaced by + any values that follow the matcher. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_describedAs instead.) + + @ingroup decorator_matchers + */ +#ifdef HC_SHORTHAND + #define describedAs HC_describedAs +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCDescription.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCDescription.h new file mode 100644 index 0000000..9693487 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCDescription.h @@ -0,0 +1,48 @@ +// +// OCHamcrest - HCDescription.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +/** + A description of an HCMatcher. + + An HCMatcher will describe itself to a description which can later be used for reporting. + + @ingroup core + */ +@protocol HCDescription + +/** + Appends some plain text to the description. + + @return @c self, for chaining. + */ +- (id)appendText:(NSString *)text; + +/** + Appends description of given value to @c self. + + If the value implements the @ref HCSelfDescribing protocol, then it will be used. + + @return @c self, for chaining. + */ +- (id)appendDescriptionOf:(id)value; + +/** + Appends a list of objects to the description. + + @return @c self, for chaining. + */ +- (id)appendList:(NSArray *)values + start:(NSString *)start + separator:(NSString *)separator + end:(NSString *)end; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasCount.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasCount.h new file mode 100644 index 0000000..7a58a63 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasCount.h @@ -0,0 +1,63 @@ +// +// OCHamcrest - HCHasCount.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCHasCount : HCBaseMatcher +{ + id countMatcher; +} + ++ (instancetype)hasCount:(id )matcher; +- (instancetype)initWithCount:(id )matcher; + +@end + + +OBJC_EXPORT id HC_hasCount(id matcher); + +/** + hasCount(aMatcher) - + Matches if object's @c -count satisfies a given matcher. + + @param aMatcher The matcher to satisfy. + + This matcher invokes @c -count on the evaluated object to get the number of elements it + contains, passing the result to @a aMatcher for evaluation. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasCount instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define hasCount HC_hasCount +#endif + + +OBJC_EXPORT id HC_hasCountOf(NSUInteger count); + +/** + hasCountOf(value) - + Matches if object's @c -count equals a given value. + + @param value @c NSUInteger value to compare against as the expected value. + + This matcher invokes @c -count on the evaluated object to get the number of elements it + contains, comparing the result to @a value for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasCountOf instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define hasCountOf HC_hasCountOf +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasDescription.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasDescription.h new file mode 100644 index 0000000..ede7019 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasDescription.h @@ -0,0 +1,44 @@ +// +// OCHamcrest - HCHasDescription.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCHasDescription : HCInvocationMatcher + ++ (instancetype)hasDescription:(id )descriptionMatcher; +- (instancetype)initWithDescription:(id )descriptionMatcher; + +@end + + +OBJC_EXPORT id HC_hasDescription(id match); + +/** + hasDescription(aMatcher) - + Matches if object's @c -description satisfies a given matcher. + + @param aMatcher The matcher to satisfy, or an expected value for @ref equalTo matching. + + This matcher invokes @c -description on the evaluated object to get its description, passing the + result to a given matcher for evaluation. If the @a aMatcher argument is not a matcher, it is + implicitly wrapped in an @ref equalTo matcher to check for equality. + + Examples: + @li @ref hasDescription(@ref startsWith(\@"foo")) + @li @ref hasDescription(\@"bar") + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasDescription instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define hasDescription HC_hasDescription +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasProperty.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasProperty.h new file mode 100644 index 0000000..60ffead --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasProperty.h @@ -0,0 +1,49 @@ +// +// OCHamcrest - HCHasProperty.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Justin Shacklette +// + +#import + + +@interface HCHasProperty : HCBaseMatcher +{ + NSString *propertyName; + id valueMatcher; +} + ++ (instancetype)hasProperty:(NSString *)property value:(id )aValueMatcher; +- (instancetype)initWithProperty:(NSString *)property value:(id )aValueMatcher; + +@end + + +OBJC_EXPORT id HC_hasProperty(NSString *name, id valueMatch); + +/** + hasProperty(name, valueMatcher) - + Matches if object has a method of a given name whose return value satisfies a given matcher. + + @param name The name of a method without arguments that returns an object. + @param valueMatcher The matcher to satisfy for the return value, or an expected value for @ref equalTo matching. + + This matcher first checks if the evaluated object has a method with a name matching the given + @c name. If so, it invokes the method and sees if the returned value satisfies @c valueMatcher. + + While this matcher is called "hasProperty", it's useful for checking the results of any simple + methods, not just properties. + + Examples: + @li @ref hasProperty(\@"firstName", \@"Joe") + @li @ref hasProperty(\@"firstName", startsWith(\@"J")) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasProperty instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define hasProperty HC_hasProperty +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCInvocationMatcher.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCInvocationMatcher.h new file mode 100755 index 0000000..8dde95a --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCInvocationMatcher.h @@ -0,0 +1,57 @@ +// +// OCHamcrest - HCInvocationMatcher.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +/** + Supporting class for matching a feature of an object. + + Tests whether the result of passing a given invocation to the value satisfies a given matcher. + + @ingroup helpers + */ +@interface HCInvocationMatcher : HCBaseMatcher +{ + NSInvocation *invocation; + id subMatcher; + BOOL shortMismatchDescription; +} + +/** + Determines whether a mismatch will be described in short form. + + Default is long form, which describes the object, the name of the invocation, and the + sub-matcher's mismatch diagnosis. Short form only has the sub-matcher's mismatch diagnosis. + */ +@property (nonatomic, assign) BOOL shortMismatchDescription; + +/** + Helper method for creating an invocation. + + A class is specified only so we can determine the method signature. + */ ++ (NSInvocation *)invocationForSelector:(SEL)selector onClass:(Class)aClass; + +/** + Returns an HCInvocationMatcher object initialized with an invocation and a matcher. + */ +- (instancetype)initWithInvocation:(NSInvocation *)anInvocation matching:(id )aMatcher; + +/** + Invokes stored invocation on given item and returns the result. + */ +- (id)invokeOn:(id)item; + +/** + Returns string representation of the invocation's selector. + */ +- (NSString *)stringFromSelector; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIs.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIs.h new file mode 100644 index 0000000..8574299 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIs.h @@ -0,0 +1,54 @@ +// +// OCHamcrest - HCIs.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIs : HCBaseMatcher +{ + id matcher; +} + ++ (instancetype)is:(id )aMatcher; +- (instancetype)initWithMatcher:(id )aMatcher; + +@end + + +OBJC_EXPORT id HC_is(id match); + +/** + is(aMatcher) - + Decorates another matcher, or provides a shortcut to the frequently used @ref is(equalTo(x)). + + @param aMatcher The matcher to satisfy, or an expected value for @ref equalTo matching. + + This matcher compares the evaluated object to the given matcher. + + If the @a aMatcher argument is a matcher, its behavior is retained, but the test may be more + expressive. For example: + @li @ref assertThatInt(value, equalToInt(5)) + @li @ref assertThatInt(value, is(equalToInt(5))) + + If the @a aMatcher argument is not a matcher, it is wrapped in an @ref equalTo matcher. This + makes the following statements equivalent: + @li @ref assertThat(cheese, equalTo(s melly)) + @li @ref assertThat(cheese, is(equalTo(smelly))) + @li @ref assertThat(cheese, is(smelly)) + + Choose the style that makes your expression most readable. This will vary depending on context. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_is instead.) + + @ingroup decorator_matchers + */ +#ifdef HC_SHORTHAND + #define is HC_is +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsAnything.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsAnything.h new file mode 100644 index 0000000..b4ad3f7 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsAnything.h @@ -0,0 +1,63 @@ +// +// OCHamcrest - HCIsAnything.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsAnything : HCBaseMatcher +{ + NSString *description; +} + ++ (instancetype)isAnything; ++ (instancetype)isAnythingWithDescription:(NSString *)aDescription; + +- (instancetype)init; +- (instancetype)initWithDescription:(NSString *)aDescription; + +@end + + +OBJC_EXPORT id HC_anything(void); + +/** + Matches anything. + + This matcher always evaluates to @c YES. Specify this in composite matchers when the value of a + particular element is unimportant. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_anything instead.) + + @ingroup logical_matchers + */ +#ifdef HC_SHORTHAND + #define anything() HC_anything() +#endif + + +OBJC_EXPORT id HC_anythingWithDescription(NSString *aDescription); + +/** + anythingWithDescription(description) - + Matches anything. + + @param description A string used to describe this matcher. + + This matcher always evaluates to @c YES. Specify this in collection matchers when the value of a + particular element in a collection is unimportant. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_anything instead.) + + @ingroup logical_matchers + */ +#ifdef HC_SHORTHAND + #define anythingWithDescription HC_anythingWithDescription +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCloseTo.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCloseTo.h new file mode 100644 index 0000000..5e818ba --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCloseTo.h @@ -0,0 +1,47 @@ +// +// OCHamcrest - HCIsCloseTo.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsCloseTo : HCBaseMatcher +{ + double value; + double delta; +} + ++ (instancetype)isCloseTo:(double)aValue within:(double)aDelta; +- (instancetype)initWithValue:(double)aValue delta:(double)aDelta; + +@end + + +OBJC_EXPORT id HC_closeTo(double aValue, double aDelta); + +/** + closeTo(aValue, aDelta) - + Matches if object is a number close to a given value, within a given delta. + + @param aValue The @c double value to compare against as the expected value. + @param aDelta The @c double maximum delta between the values for which the numbers are considered close. + + This matcher invokes @c -doubleValue on the evaluated object to get its value as a @c double. + The result is compared against @a aValue to see if the difference is within a positive @a aDelta. + + Example: + @li @ref closeTo(3.0, 0.25) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_closeTo instead.) + + @ingroup number_matchers + */ +#ifdef HC_SHORTHAND + #define closeTo HC_closeTo +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContaining.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContaining.h new file mode 100644 index 0000000..facb93b --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContaining.h @@ -0,0 +1,69 @@ +// +// OCHamcrest - HCIsCollectionContaining.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsCollectionContaining : HCBaseMatcher +{ + id elementMatcher; +} + ++ (instancetype)isCollectionContaining:(id )anElementMatcher; +- (instancetype)initWithMatcher:(id )anElementMatcher; + +@end + + +OBJC_EXPORT id HC_hasItem(id itemMatch); + +/** + hasItem(aMatcher) - + Matches if any element of collection satisfies a given matcher. + + @param aMatcher The matcher to satisfy, or an expected value for @ref equalTo matching. + + This matcher iterates the evaluated collection, searching for any element that satisfies a + given matcher. If a matching element is found, @c hasItem is satisfied. + + If the @a aMatcher argument is not a matcher, it is implicitly wrapped in an @ref equalTo + matcher to check for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasItem instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define hasItem HC_hasItem +#endif + + +OBJC_EXPORT id HC_hasItems(id itemMatch, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + hasItems(firstMatcher, ...) - + Matches if all of the given matchers are satisfied by any elements of the collection. + + @param firstMatcher,... A comma-separated list of matchers ending with @c nil. + + This matcher iterates the given matchers, searching for any elements in the evaluated collection + that satisfy them. If each matcher is satisfied, then @c hasItems is satisfied. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c hasItems instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define hasItems HC_hasItems +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContainingInAnyOrder.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContainingInAnyOrder.h new file mode 100644 index 0000000..4937e94 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContainingInAnyOrder.h @@ -0,0 +1,47 @@ +// +// OCHamcrest - HCIsCollectionContainingInAnyOrder.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsCollectionContainingInAnyOrder : HCBaseMatcher +{ + NSArray *matchers; +} + ++ (instancetype)isCollectionContainingInAnyOrder:(NSArray *)itemMatchers; +- (instancetype)initWithMatchers:(NSArray *)itemMatchers; + +@end + + +OBJC_EXPORT id HC_containsInAnyOrder(id itemMatch, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + containsInAnyOrder(firstMatcher, ...) - + Matches if collection's elements, in any order, satisfy a given list of matchers. + + @param firstMatcher,... A comma-separated list of matchers ending with @c nil. + + This matcher iterates the evaluated collection, seeing if each element satisfies any of the + given matchers. The matchers are tried from left to right, and when a satisfied matcher is + found, it is no longer a candidate for the remaining elements. If a one-to-one correspondence is + established between elements and matchers, @c containsInAnyOrder is satisfied. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_containsInAnyOrder instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define containsInAnyOrder HC_containsInAnyOrder +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContainingInOrder.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContainingInOrder.h new file mode 100644 index 0000000..269666e --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContainingInOrder.h @@ -0,0 +1,45 @@ +// +// OCHamcrest - HCIsCollectionContainingInOrder.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsCollectionContainingInOrder : HCBaseMatcher +{ + NSArray *matchers; +} + ++ (instancetype)isCollectionContainingInOrder:(NSArray *)itemMatchers; +- (instancetype)initWithMatchers:(NSArray *)itemMatchers; + +@end + + +OBJC_EXPORT id HC_contains(id itemMatch, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + contains(firstMatcher, ...) - + Matches if collection's elements satisfy a given list of matchers, in order. + + @param firstMatcher,... A comma-separated list of matchers ending with @c nil. + + This matcher iterates the evaluated collection and a given list of matchers, seeing if each + element satisfies its corresponding matcher. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_contains instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define contains HC_contains +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionOnlyContaining.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionOnlyContaining.h new file mode 100644 index 0000000..2fe4ae7 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionOnlyContaining.h @@ -0,0 +1,52 @@ +// +// OCHamcrest - HCIsCollectionOnlyContaining.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsCollectionOnlyContaining : HCBaseMatcher +{ + id matcher; +} + ++ (instancetype)isCollectionOnlyContaining:(id )aMatcher; +- (instancetype)initWithMatcher:(id )aMatcher; + +@end + + +OBJC_EXPORT id HC_onlyContains(id itemMatch, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + onlyContains(firstMatcher, ...) - + Matches if each element of collection satisfies any of the given matchers. + + @param firstMatcher,... A comma-separated list of matchers ending with @c nil. + + This matcher iterates the evaluated collection, confirming whether each element satisfies any of + the given matchers. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + Example: + + @par + @ref onlyContains(startsWith(@"Jo"), nil) + + will match a collection [@"Jon", @"John", @"Johann"]. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_onlyContains instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define onlyContains HC_onlyContains +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContaining.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContaining.h new file mode 100644 index 0000000..729910e --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContaining.h @@ -0,0 +1,54 @@ +// +// OCHamcrest - HCIsDictionaryContaining.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsDictionaryContaining : HCBaseMatcher +{ + id keyMatcher; + id valueMatcher; +} + ++ (instancetype)isDictionaryContainingKey:(id )aKeyMatcher + value:(id )aValueMatcher; + +- (instancetype)initWithKeyMatcher:(id )aKeyMatcher + valueMatcher:(id )aValueMatcher; + +@end + + +OBJC_EXPORT id HC_hasEntry(id keyMatch, id valueMatch); + +/** + hasEntry(keyMatcher, valueMatcher) - + Matches if dictionary contains key-value entry satisfying a given pair of matchers. + + @param keyMatcher The matcher to satisfy for the key, or an expected value for @ref equalTo matching. + @param valueMatcher The matcher to satisfy for the value, or an expected value for @ref equalTo matching. + + This matcher iterates the evaluated dictionary, searching for any key-value entry that satisfies + @a keyMatcher and @a valueMatcher. If a matching entry is found, @c hasEntry is satisfied. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + Examples: + @li @ref hasEntry(@ref equalTo(@"foo"), equalTo(@"bar")) + @li @ref hasEntry(@"foo", @"bar") + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasEntry instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define hasEntry HC_hasEntry +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingEntries.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingEntries.h new file mode 100644 index 0000000..5f4ac6d --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingEntries.h @@ -0,0 +1,53 @@ +// +// OCHamcrest - HCIsDictionaryContainingEntries.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsDictionaryContainingEntries : HCBaseMatcher +{ + NSArray *keys; + NSArray *valueMatchers; +} + ++ (instancetype)isDictionaryContainingKeys:(NSArray *)theKeys + valueMatchers:(NSArray *)theValueMatchers; + +- (instancetype)initWithKeys:(NSArray *)theKeys + valueMatchers:(NSArray *)theValueMatchers; + +@end + + +OBJC_EXPORT id HC_hasEntries(id keysAndValueMatch, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + hasEntries(firstKey, valueMatcher, ...) - + Matches if dictionary contains entries satisfying a list of alternating keys and their value + matchers. + + @param firstKey A key (not a matcher) to look up. + @param valueMatcher,... The matcher to satisfy for the value, or an expected value for @ref equalTo matching. + + Note that the keys must be actual keys, not matchers. Any value argument that is not a matcher + is implicitly wrapped in an @ref equalTo matcher to check for equality. The list must end with + @c nil. + + Examples: + @li @ref hasEntries(@"first", equalTo(@"Jon"), @"last", equalTo(@"Reid"), nil) + @li @ref hasEntries(@"first", @"Jon", @"last", @"Reid", nil) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasEntry instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define hasEntries HC_hasEntries +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingKey.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingKey.h new file mode 100644 index 0000000..6d8b06b --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingKey.h @@ -0,0 +1,49 @@ +// +// OCHamcrest - HCIsDictionaryContainingKey.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsDictionaryContainingKey : HCBaseMatcher +{ + id keyMatcher; +} + ++ (instancetype)isDictionaryContainingKey:(id )theKeyMatcher; +- (instancetype)initWithKeyMatcher:(id )theKeyMatcher; + +@end + + +OBJC_EXPORT id HC_hasKey(id keyMatch); + +/** + hasKey(keyMatcher) - + Matches if dictionary contains an entry whose key satisfies a given matcher. + + @param keyMatcher The matcher to satisfy for the key, or an expected value for @ref equalTo matching. + + This matcher iterates the evaluated dictionary, searching for any key-value entry whose key + satisfies the given matcher. If a matching entry is found, @c hasKey is satisfied. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasKey instead.) + + Examples: + @li @ref hasEntry(equalTo(@"foo")) + @li @ref hasEntry(@"foo") + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define hasKey HC_hasKey +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingValue.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingValue.h new file mode 100644 index 0000000..627778c --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingValue.h @@ -0,0 +1,49 @@ +// +// OCHamcrest - HCIsDictionaryContainingValue.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsDictionaryContainingValue : HCBaseMatcher +{ + id valueMatcher; +} + ++ (instancetype)isDictionaryContainingValue:(id )theValueMatcher; +- (instancetype)initWithValueMatcher:(id )theValueMatcher; + +@end + + +OBJC_EXPORT id HC_hasValue(id valueMatch); + +/** + hasValue(valueMatcher) - + Matches if dictionary contains an entry whose value satisfies a given matcher. + + @param valueMatcher The matcher to satisfy for the value, or an expected value for @ref equalTo matching. + + This matcher iterates the evaluated dictionary, searching for any key-value entry whose value + satisfies the given matcher. If a matching entry is found, @c hasValue is satisfied. + + Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for + equality. + + Examples: + @li @ref hasValue(equalTo(@"bar")) + @li @ref hasValue(@"bar") + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_hasValue instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define hasValue HC_hasValue +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEmptyCollection.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEmptyCollection.h new file mode 100644 index 0000000..bd756b4 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEmptyCollection.h @@ -0,0 +1,36 @@ +// +// OCHamcrest - HCIsEmptyCollection.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsEmptyCollection : HCHasCount + ++ (instancetype)isEmptyCollection; +- (instancetype)init; + +@end + + +OBJC_EXPORT id HC_isEmpty(void); + +/** + Matches empty collection. + + This matcher invokes @c -count on the evaluated object to determine if the number of elements it + contains is zero. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_isEmpty instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define isEmpty() HC_isEmpty() +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqual.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqual.h new file mode 100644 index 0000000..e9dcfb7 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqual.h @@ -0,0 +1,44 @@ +// +// OCHamcrest - HCIsEqual.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsEqual : HCBaseMatcher +{ + id object; +} + ++ (instancetype)isEqualTo:(id)anObject; +- (instancetype)initEqualTo:(id)anObject; + +@end + + +OBJC_EXPORT id HC_equalTo(id object); + +/** + equalTo(anObject) - + Matches if object is equal to a given object. + + @param anObject The object to compare against as the expected value. + + This matcher compares the evaluated object to @a anObject for equality, as determined by the + @c -isEqual: method. + + If @a anObject is @c nil, the matcher will successfully match @c nil. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalTo instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define equalTo HC_equalTo +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualIgnoringCase.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualIgnoringCase.h new file mode 100644 index 0000000..be93433 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualIgnoringCase.h @@ -0,0 +1,49 @@ +// +// OCHamcrest - HCIsEqualIgnoringCase.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsEqualIgnoringCase : HCBaseMatcher +{ + NSString *string; +} + ++ (instancetype)isEqualIgnoringCase:(NSString *)aString; +- (instancetype)initWithString:(NSString *)aString; + +@end + + +OBJC_EXPORT id HC_equalToIgnoringCase(NSString *aString); + +/** + equalToIgnoringCase(aString) - + Matches if object is a string equal to a given string, ignoring case differences. + + @param aString The string to compare against as the expected value. This value must not be @c nil. + + This matcher first checks whether the evaluated object is a string. If so, it compares it with + @a aString, ignoring differences of case. + + Example: + + @par + @ref equalToIgnoringCase(@"hello world") + + will match "heLLo WorlD". + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToIgnoringCase instead.) + + @ingroup text_matchers + */ +#ifdef HC_SHORTHAND + #define equalToIgnoringCase HC_equalToIgnoringCase +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualIgnoringWhiteSpace.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualIgnoringWhiteSpace.h new file mode 100644 index 0000000..415654a --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualIgnoringWhiteSpace.h @@ -0,0 +1,50 @@ +// +// OCHamcrest - HCIsEqualIgnoringWhiteSpace.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsEqualIgnoringWhiteSpace : HCBaseMatcher +{ + NSString *originalString; + NSString *strippedString; +} + ++ (instancetype)isEqualIgnoringWhiteSpace:(NSString *)aString; +- (instancetype)initWithString:(NSString *)aString; + +@end + + +OBJC_EXPORT id HC_equalToIgnoringWhiteSpace(NSString *aString); + +/** + equalToIgnoringWhiteSpace(aString) - + Matches if object is a string equal to a given string, ignoring differences in whitespace. + + @param aString The string to compare against as the expected value. This value must not be @c nil. + + This matcher first checks whether the evaluated object is a string. If so, it compares it with + @a aString, ignoring differences in runs of whitespace. + + Example: + + @par + @ref equalToIgnoringWhiteSpace(@"hello world") + + will match @verbatim "hello world" @endverbatim + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToIgnoringWhiteSpace instead.) + + @ingroup text_matchers + */ +#ifdef HC_SHORTHAND + #define equalToIgnoringWhiteSpace HC_equalToIgnoringWhiteSpace +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualToNumber.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualToNumber.h new file mode 100644 index 0000000..191d6a7 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualToNumber.h @@ -0,0 +1,331 @@ +// +// OCHamcrest - HCIsEqualToNumber.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +OBJC_EXPORT id HC_equalToBool(BOOL value); + +/** + equalToBool(value) - + Matches if object is equal to @c NSNumber created from a @c BOOL. + + @param value The @c BOOL value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from a @c BOOL @a value and compares the evaluated + object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToBool instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToBool HC_equalToBool +#endif + +@interface HCIsEqualToBool : HCBaseMatcher + +- (instancetype)initWithValue:(BOOL)value; + +@end + + +OBJC_EXPORT id HC_equalToChar(char value); + +/** + equalToChar(value) - + Matches if object is equal to @c NSNumber created from a @c char. + + @param value The @c char value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from a @c char @a value and compares the evaluated + object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToChar instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToChar HC_equalToChar +#endif + + +OBJC_EXPORT id HC_equalToDouble(double value); + +/** + equalToDouble(value) - + Matches if object is equal to @c NSNumber created from a @c double. + + @param value The @c double value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from a @c double @a value and compares the evaluated + object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToDouble instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToDouble HC_equalToDouble +#endif + + +OBJC_EXPORT id HC_equalToFloat(float value); + +/** + equalToFloat(value) - + Matches if object is equal to @c NSNumber created from a @c float. + + @param value The @c float value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from a @c float @a value and compares the evaluated + object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToFloat instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToFloat HC_equalToFloat +#endif + + +OBJC_EXPORT id HC_equalToInt(int value); + +/** + equalToInt(value) - + Matches if object is equal to @c NSNumber created from an @c int. + + @param value The @c int value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from a @c int @a value and compares the evaluated + object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToInt instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToInt HC_equalToInt +#endif + + +OBJC_EXPORT id HC_equalToLong(long value); + +/** + equalToLong(value) - + Matches if object is equal to @c NSNumber created from a @c long. + + @param value The @c long value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from a @c long @a value and compares the evaluated + object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToLong instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToLong HC_equalToLong +#endif + + +OBJC_EXPORT id HC_equalToLongLong(long long value); + +/** + equalToLongLong(value) - + Matches if object is equal to @c NSNumber created from a long long. + + @param value The long long value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from a long long @a value and compares + the evaluated object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToLongLong instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToLongLong HC_equalToLongLong +#endif + + +OBJC_EXPORT id HC_equalToShort(short value); + +/** + equalToShort(value) - + Matches if object is equal to @c NSNumber created from a @c short. + + @param value The @c short value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from a @c short @a value and compares the evaluated + object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToShort instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToShort HC_equalToShort +#endif + + +OBJC_EXPORT id HC_equalToUnsignedChar(unsigned char value); + +/** + equalToUnsignedChar(value) - + Matches if object is equal to @c NSNumber created from an unsigned char. + + @param value The unsigned char value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from an unsigned char @a value and + compares the evaluated object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToUnsignedChar instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToUnsignedChar HC_equalToUnsignedChar +#endif + + +OBJC_EXPORT id HC_equalToUnsignedInt(unsigned int value); + +/** + equalToUnsignedInt(value) - + Matches if object is equal to @c NSNumber created from an unsigned int. + + @param value The unsigned int value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from an unsigned int @a value and + compares the evaluated object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToUnsignedInt instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToUnsignedInt HC_equalToUnsignedInt +#endif + + +OBJC_EXPORT id HC_equalToUnsignedLong(unsigned long value); + +/** + equalToUnsignedLong(value) - + Matches if object is equal to @c NSNumber created from an unsigned long. + + @param value The unsigned long value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from an unsigned long @a value and + compares the evaluated object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToUnsignedLong instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToUnsignedLong HC_equalToUnsignedLong +#endif + + +OBJC_EXPORT id HC_equalToUnsignedLongLong(unsigned long long value); + +/** + equalToUnsignedLongLong(value) - + Matches if object is equal to @c NSNumber created from an unsigned long long. + + @param value The unsigned long long value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from an unsigned long long @a value and + compares the evaluated object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToUnsignedLongLong instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToUnsignedLongLong HC_equalToUnsignedLongLong +#endif + + +OBJC_EXPORT id HC_equalToUnsignedShort(unsigned short value); + +/** + equalToUnsignedShort(value) - + Matches if object is equal to @c NSNumber created from an unsigned short. + + @param value The unsigned short value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from an unsigned short @a value and + compares the evaluated object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToUnsignedShort instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToUnsignedShort HC_equalToUnsignedShort +#endif + + +OBJC_EXPORT id HC_equalToInteger(NSInteger value); + +/** + equalToInteger(value) - + Matches if object is equal to @c NSNumber created from an @c NSInteger. + + @param value The @c NSInteger value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from an @c NSInteger @a value and compares the + evaluated object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToInteger instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToInteger HC_equalToInteger +#endif + + +OBJC_EXPORT id HC_equalToUnsignedInteger(NSUInteger value); + +/** + equalToUnsignedInteger(value) - + Matches if object is equal to @c NSNumber created from an @c NSUInteger. + + @param value The @c NSUInteger value from which to create an @c NSNumber. + + This matcher creates an @c NSNumber object from an @c NSUInteger @a value and compares the + evaluated object to it for equality. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_equalToUnsignedInteger instead.) + + @ingroup primitive_number_matchers + */ +#ifdef HC_SHORTHAND + #define equalToUnsignedInteger HC_equalToUnsignedInteger +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsIn.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsIn.h new file mode 100644 index 0000000..9db152d --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsIn.h @@ -0,0 +1,42 @@ +// +// OCHamcrest - HCIsIn.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsIn : HCBaseMatcher +{ + id collection; +} + ++ (instancetype)isInCollection:(id)aCollection; +- (instancetype)initWithCollection:(id)aCollection; + +@end + + +OBJC_EXPORT id HC_isIn(id aCollection); + +/** + isIn(aCollection) - + Matches if evaluated object is present in a given collection. + + @param aCollection The collection to search. + + This matcher invokes @c -containsObject: on @a aCollection to determine if the evaluated object + is an element of the collection. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_isIn instead.) + + @ingroup collection_matchers + */ +#ifdef HC_SHORTHAND + #define isIn HC_isIn +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsInstanceOf.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsInstanceOf.h new file mode 100644 index 0000000..ad9134b --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsInstanceOf.h @@ -0,0 +1,41 @@ +// +// OCHamcrest - HCIsInstanceOf.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsInstanceOf : HCClassMatcher + ++ (id)isInstanceOf:(Class)type; + +@end + + +OBJC_EXPORT id HC_instanceOf(Class aClass); + +/** + instanceOf(aClass) - + Matches if object is an instance of, or inherits from, a given class. + + @param aClass The class to compare against as the expected class. + + This matcher checks whether the evaluated object is an instance of @a aClass or an instance of + any class that inherits from @a aClass. + + Example: + @li @ref instanceOf([NSString class]) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_instanceOf instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define instanceOf HC_instanceOf +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsNil.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsNil.h new file mode 100644 index 0000000..5167f13 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsNil.h @@ -0,0 +1,47 @@ +// +// OCHamcrest - HCIsNil.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsNil : HCBaseMatcher + ++ (id)isNil; + +@end + + +OBJC_EXPORT id HC_nilValue(void); + +/** + Matches if object is @c nil. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_nilValue instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define nilValue() HC_nilValue() +#endif + + +OBJC_EXPORT id HC_notNilValue(void); + +/** + Matches if object is not @c nil. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_notNilValue instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define notNilValue() HC_notNilValue() +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsNot.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsNot.h new file mode 100644 index 0000000..5f80d3a --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsNot.h @@ -0,0 +1,47 @@ +// +// OCHamcrest - HCIsNot.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsNot : HCBaseMatcher +{ + id matcher; +} + ++ (instancetype)isNot:(id )aMatcher; +- (instancetype)initNot:(id )aMatcher; + +@end + + +OBJC_EXPORT id HC_isNot(id aMatcher); + +/** + isNot(aMatcher) - + Inverts the given matcher to its logical negation. + + @param aMatcher The matcher to negate. + + This matcher compares the evaluated object to the negation of the given matcher. If the + @a aMatcher argument is not a matcher, it is implicitly wrapped in an @ref equalTo matcher to + check for equality, and thus matches for inequality. + + Examples: + @li @ref assertThat(cheese, isNot(equalTo(smelly))) + @li @ref assertThat(cheese, isNot(smelly)) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_isNot instead.) + + @ingroup logical_matchers + */ +#ifdef HC_SHORTHAND + #define isNot HC_isNot +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsSame.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsSame.h new file mode 100644 index 0000000..0fbc30e --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsSame.h @@ -0,0 +1,42 @@ +// +// OCHamcrest - HCIsSame.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsSame : HCBaseMatcher +{ + id object; +} + ++ (instancetype)isSameAs:(id)anObject; +- (instancetype)initSameAs:(id)anObject; + +@end + + +OBJC_EXPORT id HC_sameInstance(id object); + +/** + sameInstance(anObject) - + Matches if evaluated object is the same instance as a given object. + + @param anObject The object to compare against as the expected value. + + This matcher compares the address of the evaluated object to determine if it is the same object + as @a anObject. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_sameInstance instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define sameInstance HC_sameInstance +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsTypeOf.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsTypeOf.h new file mode 100644 index 0000000..df4a432 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsTypeOf.h @@ -0,0 +1,40 @@ +// +// OCHamcrest - HCIsTypeOf.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCIsTypeOf : HCClassMatcher + ++ (id)isTypeOf:(Class)type; + +@end + + +OBJC_EXPORT id HC_isA(Class aClass); + +/** + isA(aClass) - + Matches if object is an instance of a given class (but not of a subclass). + + @param aClass The class to compare against as the expected class. + + This matcher checks whether the evaluated object is an instance of @a aClass. + + Example: + @li @ref isA([Foo class]) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_isA instead.) + + @ingroup object_matchers + */ +#ifdef HC_SHORTHAND + #define isA HC_isA +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCMatcher.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCMatcher.h new file mode 100644 index 0000000..69b65d2 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCMatcher.h @@ -0,0 +1,56 @@ +// +// OCHamcrest - HCMatcher.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import "HCSelfDescribing.h" + + +/** + A matcher over acceptable values. + + A matcher is able to describe itself to give feedback when it fails. + + HCMatcher implementations should @b not directly implement this protocol. + Instead, @b extend the HCBaseMatcher class, which will ensure that the HCMatcher API can grow + to support new features and remain compatible with all HCMatcher implementations. + + @ingroup core + */ +@protocol HCMatcher + +/** + Evaluates the matcher for argument @a item. + + @param item The object against which the matcher is evaluated. + @return @c YES if @a item matches, otherwise @c NO. + */ +- (BOOL)matches:(id)item; + +/** + Evaluates the matcher for argument @a item. + + @param item The object against which the matcher is evaluated. + @param mismatchDescription The description to be built or appended to if @a item does not match. + @return @c YES if @a item matches, otherwise @c NO. + */ +- (BOOL)matches:(id)item describingMismatchTo:(id)mismatchDescription; + +/** + Generates a description of why the matcher has not accepted the item. + + The description will be part of a larger description of why a matching failed, so it should be + concise. + + This method assumes that @c matches:item is false, but will not check this. + + @param item The item that the HCMatcher has rejected. + @param mismatchDescription The description to be built or appended to. + */ +- (void)describeMismatchOf:(id)item to:(id)mismatchDescription; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCNumberAssert.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCNumberAssert.h new file mode 100644 index 0000000..2a99fb0 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCNumberAssert.h @@ -0,0 +1,359 @@ +// +// OCHamcrest - HCNumberAssert.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + +@protocol HCMatcher; + + +OBJC_EXPORT void HC_assertThatBoolWithLocation(id testCase, BOOL actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatBool(actual, matcher) \ + HC_assertThatBoolWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatBool(actual, matcher) - + Asserts that @c BOOL actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c BOOL value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatBool instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatBool HC_assertThatBool +#endif + + +OBJC_EXPORT void HC_assertThatCharWithLocation(id testCase, char actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatChar(actual, matcher) \ + HC_assertThatCharWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatChar(actual, matcher) - + Asserts that @c char actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c char value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatChar instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatChar HC_assertThatChar +#endif + + +OBJC_EXPORT void HC_assertThatDoubleWithLocation(id testCase, double actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatDouble(actual, matcher) \ + HC_assertThatDoubleWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + HC_assertThatDouble(actual, matcher) - + Asserts that @c double actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c double value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatDouble instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatDouble HC_assertThatDouble +#endif + + +OBJC_EXPORT void HC_assertThatFloatWithLocation(id testCase, float actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatFloat(actual, matcher) \ + HC_assertThatFloatWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatFloat(actual, matcher) - + Asserts that @c float actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c float value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatFloat instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatFloat HC_assertThatFloat +#endif + + +OBJC_EXPORT void HC_assertThatIntWithLocation(id testCase, int actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatInt(actual, matcher) \ + HC_assertThatIntWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatInt(actual, matcher) - + Asserts that @c int actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c int value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatInt instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatInt HC_assertThatInt +#endif + + +OBJC_EXPORT void HC_assertThatLongWithLocation(id testCase, long actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatLong(actual, matcher) \ + HC_assertThatLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatLong(actual, matcher) - + Asserts that @c long actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c long value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatLong instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatLong HC_assertThatLong +#endif + + +OBJC_EXPORT void HC_assertThatLongLongWithLocation(id testCase, long long actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatLongLong(actual, matcher) \ + HC_assertThatLongLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatLongLong(actual, matcher) - + Asserts that long long actual value, converted to an @c NSNumber, satisfies + matcher. + + @param actual The long long value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatLongLong instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatLongLong HC_assertThatLongLong +#endif + + +OBJC_EXPORT void HC_assertThatShortWithLocation(id testCase, short actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatShort(actual, matcher) \ + HC_assertThatShortWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatShort(actual, matcher) - + Asserts that @c short actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c short value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatShort instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatShort HC_assertThatShort +#endif + + +OBJC_EXPORT void HC_assertThatUnsignedCharWithLocation(id testCase, unsigned char actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatUnsignedChar(actual, matcher) \ + HC_assertThatUnsignedCharWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatUnsignedChar(actual, matcher) - + Asserts that unsigned char actual value, converted to an @c NSNumber, satisfies + matcher. + + @param actual The unsigned char value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatUnsignedChar instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatUnsignedChar HC_assertThatUnsignedChar +#endif + + +OBJC_EXPORT void HC_assertThatUnsignedIntWithLocation(id testCase, unsigned int actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatUnsignedInt(actual, matcher) \ + HC_assertThatUnsignedIntWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatUnsignedInt(actual, matcher) - + Asserts that unsigned int actual value, converted to an @c NSNumber, satisfies + matcher. + + @param actual The unsigned int value to convert to an @c NSNumber for evaluation @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatUnsignedInt instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatUnsignedInt HC_assertThatUnsignedInt +#endif + + +OBJC_EXPORT void HC_assertThatUnsignedLongWithLocation(id testCase, unsigned long actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatUnsignedLong(actual, matcher) \ + HC_assertThatUnsignedLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatUnsignedLong(actual, matcher) - + Asserts that unsigned long actual value, converted to an @c NSNumber, satisfies + matcher. + + @param actual The unsigned long value to convert to an @c NSNumber for evaluation @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatUnsignedLong instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatUnsignedLong HC_assertThatUnsignedLong +#endif + + +OBJC_EXPORT void HC_assertThatUnsignedLongLongWithLocation(id testCase, unsigned long long actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatUnsignedLongLong(actual, matcher) \ + HC_assertThatUnsignedLongLongWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatUnsignedLongLong(actual, matcher) - + Asserts that unsigned long long actual value, converted to an @c NSNumber, + satisfies matcher. + + @param actual The unsigned long long value to convert to an @c NSNumber for evaluation @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatUnsignedLongLong instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatUnsignedLongLong HC_assertThatUnsignedLongLong +#endif + + +OBJC_EXPORT void HC_assertThatUnsignedShortWithLocation(id testCase, unsigned short actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatUnsignedShort(actual, matcher) \ + HC_assertThatUnsignedShortWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatUnsignedShort(actual, matcher) - + Asserts that unsigned short actual value, converted to an @c NSNumber, satisfies + matcher. + + @param actual The unsigned short value to convert to an @c NSNumber for evaluation @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatUnsignedShort instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatUnsignedShort HC_assertThatUnsignedShort +#endif + + +OBJC_EXPORT void HC_assertThatIntegerWithLocation(id testCase, NSInteger actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatInteger(actual, matcher) \ + HC_assertThatIntegerWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatInteger(actual, matcher) - + Asserts that @c NSInteger actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c NSInteger value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatInteger instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatInteger HC_assertThatInteger +#endif + + +OBJC_EXPORT void HC_assertThatUnsignedIntegerWithLocation(id testCase, NSUInteger actual, + id matcher, const char* fileName, int lineNumber); + +#define HC_assertThatUnsignedInteger(actual, matcher) \ + HC_assertThatUnsignedIntegerWithLocation(self, actual, matcher, __FILE__, __LINE__) + +/** + assertThatUnsignedInteger(actual, matcher) - + Asserts that @c NSUInteger actual value, converted to an @c NSNumber, satisfies matcher. + + @param actual The @c NSUInteger value to convert to an @c NSNumber for evaluation. + @param matcher The matcher to satisfy as the expected condition. + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_assertThatUnsignedInteger instead.) + + @ingroup integration_numeric + */ +#ifdef HC_SHORTHAND + #define assertThatUnsignedInteger HC_assertThatUnsignedInteger +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCOrderingComparison.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCOrderingComparison.h new file mode 100644 index 0000000..817c56f --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCOrderingComparison.h @@ -0,0 +1,115 @@ +// +// OCHamcrest - HCOrderingComparison.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCOrderingComparison : HCBaseMatcher +{ + id expected; + NSComparisonResult minCompare; + NSComparisonResult maxCompare; + NSString *comparisonDescription; +} + ++ (instancetype)compare:(id)expectedValue + minCompare:(NSComparisonResult)min + maxCompare:(NSComparisonResult)max + comparisonDescription:(NSString *)comparisonDescription; + +- (instancetype)initComparing:(id)expectedValue + minCompare:(NSComparisonResult)min + maxCompare:(NSComparisonResult)max + comparisonDescription:(NSString *)comparisonDescription; + +@end + + +OBJC_EXPORT id HC_greaterThan(id expected); + +/** + greaterThan(aNumber) - + Matches if object is greater than a given number. + + @param aNumber The @c NSNumber to compare against. + + Example: + @li @ref greaterThan(\@5) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_greaterThan instead.) + + @ingroup number_matchers + */ +#ifdef HC_SHORTHAND + #define greaterThan HC_greaterThan +#endif + + +OBJC_EXPORT id HC_greaterThanOrEqualTo(id expected); + +/** + greaterThanOrEqualTo(aNumber) - + Matches if object is greater than or equal to a given number. + + @param aNumber The @c NSNumber to compare against. + + Example: + @li @ref greaterThanOrEqualTo(\@5) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_greaterThanOrEqualTo instead.) + + @ingroup number_matchers + */ +#ifdef HC_SHORTHAND + #define greaterThanOrEqualTo HC_greaterThanOrEqualTo +#endif + + +OBJC_EXPORT id HC_lessThan(id expected); + +/** + lessThan(aNumber) - + Matches if object is less than a given number. + + @param aNumber The @c NSNumber to compare against. + + Example: + @li @ref lessThan(\@5) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_lessThan instead.) + + @ingroup number_matchers + */ +#ifdef HC_SHORTHAND + #define lessThan HC_lessThan +#endif + + +OBJC_EXPORT id HC_lessThanOrEqualTo(id expected); + +/** + lessThanOrEqualTo(aNumber) - + Matches if object is less than or equal to a given number. + + @param aNumber The @c NSNumber to compare against. + + Example: + @li @ref lessThanOrEqualTo(\@5) + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_lessThanOrEqualTo instead.) + + @ingroup number_matchers + */ +#ifdef HC_SHORTHAND + #define lessThanOrEqualTo HC_lessThanOrEqualTo +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCRequireNonNilObject.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCRequireNonNilObject.h new file mode 100644 index 0000000..b7e8bcc --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCRequireNonNilObject.h @@ -0,0 +1,19 @@ +// +// OCHamcrest - HCRequireNonNilObject.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import +#import + + +/** + Throws an NSException if @a obj is @c nil. + + @ingroup helpers +*/ +OBJC_EXPORT void HCRequireNonNilObject(id obj); diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCSelfDescribing.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCSelfDescribing.h new file mode 100644 index 0000000..73e661a --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCSelfDescribing.h @@ -0,0 +1,32 @@ +// +// OCHamcrest - HCSelfDescribing.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + +#import "HCDescription.h" + + +/** + The ability of an object to describe itself. + + @ingroup core + */ +@protocol HCSelfDescribing + +/** + Generates a description of the object. + + The description may be part of a description of a larger object of which this is just a + component, so it should be worded appropriately. + + @param description The description to be built or appended to. + */ +- (void)describeTo:(id)description; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringContains.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringContains.h new file mode 100644 index 0000000..1b653b0 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringContains.h @@ -0,0 +1,45 @@ +// +// OCHamcrest - HCStringContains.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCStringContains : HCSubstringMatcher + ++ (id)stringContains:(NSString *)aSubstring; + +@end + + +OBJC_EXPORT id HC_containsString(NSString *aSubstring); + +/** +containsString(aString) - + Matches if object is a string containing a given string. + + @param aString The string to search for. This value must not be @c nil. + + This matcher first checks whether the evaluated object is a string. If so, it checks whether it + contains @a aString. + + Example: + + @par + @ref containsString(@"def") + + will match "abcdefg". + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_containsString instead.) + + @ingroup text_matchers + */ +#ifdef HC_SHORTHAND + #define containsString HC_containsString +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringContainsInOrder.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringContainsInOrder.h new file mode 100644 index 0000000..537a6c2 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringContainsInOrder.h @@ -0,0 +1,50 @@ +// +// OCHamcrest - HCStringContainsInOrder.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCStringContainsInOrder : HCBaseMatcher +{ + NSArray *substrings; +} + ++ (instancetype)containsInOrder:(NSArray *)substringList; +- (instancetype)initWithSubstrings:(NSArray *)substringList; + +@end + + +OBJC_EXPORT id HC_stringContainsInOrder(NSString *substring, ...) NS_REQUIRES_NIL_TERMINATION; + +/** + stringContainsInOrder(firstString, ...) - + Matches if object is a string containing a given list of substrings in relative order. + + @param firstString,... A comma-separated list of strings ending with @c nil. + + This matcher first checks whether the evaluated object is a string. If so, it checks whether it + contains a given list of strings, in relative order to each other. The searches are performed + starting from the beginning of the evaluated string. + + Example: + + @par + @ref stringContainsInOrder(@"bc", @"fg", @"jkl", nil) + + will match "abcdefghijklm". + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_stringContainsInOrder instead.) + + @ingroup text_matchers + */ +#ifdef HC_SHORTHAND + #define stringContainsInOrder HC_stringContainsInOrder +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringDescription.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringDescription.h new file mode 100644 index 0000000..7f0ad89 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringDescription.h @@ -0,0 +1,43 @@ +// +// OCHamcrest - HCStringDescription.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + +@protocol HCSelfDescribing; + + +/** + An HCDescription that is stored as a string. + + @ingroup core + */ +@interface HCStringDescription : HCBaseDescription +{ + NSMutableString *accumulator; +} + +/** + Returns the description of an HCSelfDescribing object as a string. + + @param selfDescribing The object to be described. + @return The description of the object. + */ ++ (NSString *)stringFrom:(id)selfDescribing; + +/** + Returns an empty description. + */ ++ (instancetype)stringDescription; + +/** + Returns an initialized HCStringDescription object that is empty. + */ +- (instancetype)init; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringEndsWith.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringEndsWith.h new file mode 100644 index 0000000..bdaac4c --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringEndsWith.h @@ -0,0 +1,45 @@ +// +// OCHamcrest - HCStringEndsWith.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCStringEndsWith : HCSubstringMatcher + ++ (id)stringEndsWith:(NSString *)aSubstring; + +@end + + +OBJC_EXPORT id HC_endsWith(NSString *aSubstring); + +/** + endsWith(aString) - + Matches if object is a string ending with a given string. + + @param aString The string to search for. This value must not be @c nil. + + This matcher first checks whether the evaluated object is a string. If so, it checks if + @a aString matches the ending characters of the evaluated object. + + Example: + + @par + @ref endsWith(@"bar") + + will match "foobar". + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_endsWith instead.) + + @ingroup text_matchers + */ +#ifdef HC_SHORTHAND + #define endsWith HC_endsWith +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringStartsWith.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringStartsWith.h new file mode 100644 index 0000000..5332cb3 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringStartsWith.h @@ -0,0 +1,45 @@ +// +// OCHamcrest - HCStringStartsWith.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCStringStartsWith : HCSubstringMatcher + ++ (id)stringStartsWith:(NSString *)aSubstring; + +@end + + +OBJC_EXPORT id HC_startsWith(NSString *aSubstring); + +/** + startsWith(aString) - + Matches if object is a string starting with a given string. + + @param aString The string to search for. This value must not be @c nil. + + This matcher first checks whether the evaluated object is a string. If so, it checks if + @a aString matches the beginning characters of the evaluated object. + + Example: + + @par + @ref endsWith(@"foo") + + will match "foobar". + + (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym + @c HC_startsWith instead.) + + @ingroup text_matchers + */ +#ifdef HC_SHORTHAND + #define startsWith HC_startsWith +#endif diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCSubstringMatcher.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCSubstringMatcher.h new file mode 100644 index 0000000..32ead15 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCSubstringMatcher.h @@ -0,0 +1,20 @@ +// +// OCHamcrest - HCSubstringMatcher.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + + +@interface HCSubstringMatcher : HCBaseMatcher +{ + NSString *substring; +} + +- (instancetype)initWithSubstring:(NSString *)aString; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailure.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailure.h new file mode 100644 index 0000000..f7e125f --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailure.h @@ -0,0 +1,21 @@ +#import + + +/** + Test failure location and reason. + + @ingroup integration + */ +@interface HCTestFailure : NSObject + +@property (nonatomic, readonly) id testCase; +@property (nonatomic, readonly) NSString *fileName; +@property (nonatomic, readonly) NSUInteger lineNumber; +@property (nonatomic, readonly) NSString *reason; + +- (instancetype)initWithTestCase:(id)testCase + fileName:(NSString *)fileName + lineNumber:(NSUInteger)lineNumber + reason:(NSString *)reason; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailureHandler.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailureHandler.h new file mode 100644 index 0000000..5f391b9 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailureHandler.h @@ -0,0 +1,20 @@ +#import + +@class HCTestFailure; + + +/** + Chain-of-responsibility for handling test failures. + + @ingroup integration + */ +@protocol HCTestFailureHandler + +@property (nonatomic, strong) id successor; + +/** + Handle test failure at specific location, or pass to successor. + */ +- (void)handleFailure:(HCTestFailure *)failure; + +@end diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailureHandlerChain.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailureHandlerChain.h new file mode 100644 index 0000000..fc68e23 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailureHandlerChain.h @@ -0,0 +1,12 @@ +#import +#import + +@protocol HCTestFailureHandler; + + +/** + Returns chain of test failure handlers. + + @ingroup integration + */ +OBJC_EXPORT id HC_testFailureHandlerChain(void); diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCWrapInMatcher.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCWrapInMatcher.h new file mode 100644 index 0000000..a991fe4 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/HCWrapInMatcher.h @@ -0,0 +1,22 @@ +// +// OCHamcrest - HCWrapInMatcher.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +#import + +@protocol HCMatcher; + + +/** + Wraps argument in a matcher, if necessary. + + @return The argument as-if if it is already a matcher, otherwise wrapped in an @ref equalTo matcher. + + @ingroup helpers + */ +OBJC_EXPORT id HCWrapInMatcher(id matcherOrValue); diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Headers/OCHamcrest.h b/Frameworks/OCHamcrest.framework/Versions/A/Headers/OCHamcrest.h new file mode 100644 index 0000000..4c64079 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Headers/OCHamcrest.h @@ -0,0 +1,141 @@ +// +// OCHamcrest - OCHamcrest.h +// Copyright 2013 hamcrest.org. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Docs: http://hamcrest.github.com/OCHamcrest/ +// Source: https://github.com/hamcrest/OCHamcrest +// + +/** + @defgroup library Matcher Library + + Library of Matcher implementations. + */ + +/** + @defgroup object_matchers Object Matchers + + Matchers that inspect objects. + + @ingroup library + */ +#import +#import +#import +#import +#import +#import +#import +#import + +/** + @defgroup collection_matchers Collection Matchers + + Matchers of collections. + + @ingroup library + */ +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +/** + @defgroup number_matchers Number Matchers + + Matchers that perform numeric comparisons. + + @ingroup library + */ +#import +#import + +/** + @defgroup primitive_number_matchers Primitive Number Matchers + + Matchers for testing equality against primitive numeric types. + + @ingroup number_matchers + */ +#import + +/** + @defgroup text_matchers Text Matchers + + Matchers that perform text comparisons. + + @ingroup library + */ +#import +#import +#import +#import +#import +#import + +/** + @defgroup logical_matchers Logical Matchers + + Boolean logic using other matchers. + + @ingroup library + */ +#import +#import +#import +#import + +/** + @defgroup decorator_matchers Decorator Matchers + + Matchers that decorate other matchers for better expression. + + @ingroup library + */ +#import +#import + +/** + @defgroup integration Unit Test Integration + */ +#import +#import +#import +#import + +/** + @defgroup integration_numeric Unit Tests of Primitive Numbers + + Unit test integration for primitive numbers. + + The @c assertThat<Type> macros convert the primitive actual value to an @c NSNumber, + passing that to the matcher for evaluation. If the matcher is not satisfied, an exception is + thrown describing the mismatch. + + This family of macros is designed to integrate well with OCUnit and other unit testing + frameworks. Unmet assertions are reported as test failures. In Xcode, they can be clicked to + reveal the line of the assertion. + + @ingroup integration + */ +#import + +/** + @defgroup core Core API + */ + +/** + @defgroup helpers Helpers + + Utilities for writing Matchers. + + @ingroup core + */ diff --git a/Frameworks/OCHamcrest.framework/Versions/A/OCHamcrest b/Frameworks/OCHamcrest.framework/Versions/A/OCHamcrest new file mode 100755 index 0000000..de4e8b1 Binary files /dev/null and b/Frameworks/OCHamcrest.framework/Versions/A/OCHamcrest differ diff --git a/Frameworks/OCHamcrest.framework/Versions/A/Resources/Info.plist b/Frameworks/OCHamcrest.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..24bb11a --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,42 @@ + + + + + BuildMachineOSBuild + 12F45 + CFBundleDevelopmentRegion + English + CFBundleExecutable + OCHamcrest + CFBundleIdentifier + org.hamcrest.OCHamcrest + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OCHamcrest + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.0.1 + CFBundleSignature + ???? + CFBundleVersion + 3.0.1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 5A2053 + DTPlatformVersion + GM + DTSDKBuild + 13A595 + DTSDKName + macosx10.9 + DTXcode + 0501 + DTXcodeBuild + 5A2053 + NSHumanReadableCopyright + Copyright © 2013 hamcrest.org + + diff --git a/Frameworks/OCHamcrest.framework/Versions/Current b/Frameworks/OCHamcrest.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Frameworks/OCHamcrest.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Frameworks/OCMockito.framework/Headers/MKTArgumentCaptor.h b/Frameworks/OCMockito.framework/Headers/MKTArgumentCaptor.h new file mode 100644 index 0000000..b159cab --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/MKTArgumentCaptor.h @@ -0,0 +1,18 @@ +// +// OCMockito - MKTArgumentCaptor.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import + + +@interface MKTArgumentCaptor : NSObject + +- (id)capture; +- (id)value; +- (NSArray *)allValues; + +@end diff --git a/Frameworks/OCMockito.framework/Headers/MKTBaseMockObject.h b/Frameworks/OCMockito.framework/Headers/MKTBaseMockObject.h new file mode 100644 index 0000000..e2f367a --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/MKTBaseMockObject.h @@ -0,0 +1,17 @@ +// +// OCMockito - MKTBaseMockObject.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import +#import "MKTPrimitiveArgumentMatching.h" + + +@interface MKTBaseMockObject : NSProxy + +- (instancetype)init; + +@end diff --git a/Frameworks/OCMockito.framework/Headers/MKTClassObjectMock.h b/Frameworks/OCMockito.framework/Headers/MKTClassObjectMock.h new file mode 100644 index 0000000..ab0cd30 --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/MKTClassObjectMock.h @@ -0,0 +1,22 @@ +// +// OCMockito - MKTClassObjectMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// +// Created by: David Hart +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object of a given class object. + */ +@interface MKTClassObjectMock : MKTBaseMockObject + ++ (instancetype)mockForClass:(Class)aClass; +- (instancetype)initWithClass:(Class)aClass; + +@end diff --git a/Frameworks/OCMockito.framework/Headers/MKTObjectAndProtocolMock.h b/Frameworks/OCMockito.framework/Headers/MKTObjectAndProtocolMock.h new file mode 100644 index 0000000..8688a62 --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/MKTObjectAndProtocolMock.h @@ -0,0 +1,20 @@ +// +// OCMockito - MKTObjectAndProtocolMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Kevin Lundberg +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTProtocolMock.h" + + +/** + Mock object of a given class that also implements a given protocol. + */ +@interface MKTObjectAndProtocolMock : MKTProtocolMock + ++ (instancetype)mockForClass:(Class)aClass protocol:(Protocol *)protocol; +- (instancetype)initWithClass:(Class)aClass protocol:(Protocol *)protocol; + +@end diff --git a/Frameworks/OCMockito.framework/Headers/MKTObjectMock.h b/Frameworks/OCMockito.framework/Headers/MKTObjectMock.h new file mode 100644 index 0000000..4194119 --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/MKTObjectMock.h @@ -0,0 +1,22 @@ +// +// OCMockito - MKTObjectMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object of a given class. + */ +@interface MKTObjectMock : MKTBaseMockObject + +@property (readonly, atomic) Class mockedClass; + ++ (instancetype)mockForClass:(Class)aClass; +- (instancetype)initWithClass:(Class)aClass; + +@end diff --git a/Frameworks/OCMockito.framework/Headers/MKTOngoingStubbing.h b/Frameworks/OCMockito.framework/Headers/MKTOngoingStubbing.h new file mode 100644 index 0000000..196f044 --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/MKTOngoingStubbing.h @@ -0,0 +1,77 @@ +// +// OCMockito - MKTOngoingStubbing.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import +#import "MKTPrimitiveArgumentMatching.h" + +@class MKTInvocationContainer; + + +/** + Methods to invoke on @c given(methodCall) to return stubbed values. + */ +@interface MKTOngoingStubbing : NSObject + +- (instancetype)initWithInvocationContainer:(MKTInvocationContainer *)invocationContainer; + +/// Stubs given object as return value. +- (MKTOngoingStubbing *)willReturn:(id)object; + +/// Stubs given @c BOOL as return value. +- (MKTOngoingStubbing *)willReturnBool:(BOOL)value; + +/// Stubs given @c char as return value. +- (MKTOngoingStubbing *)willReturnChar:(char)value; + +/// Stubs given @c int as return value. +- (MKTOngoingStubbing *)willReturnInt:(int)value; + +/// Stubs given @c short as return value. +- (MKTOngoingStubbing *)willReturnShort:(short)value; + +/// Stubs given @c long as return value. +- (MKTOngoingStubbing *)willReturnLong:(long)value; + +/// Stubs given long long as return value. +- (MKTOngoingStubbing *)willReturnLongLong:(long long)value; + +/// Stubs given @c NSInteger as return value. +- (MKTOngoingStubbing *)willReturnInteger:(NSInteger)value; + +/// Stubs given unsigned char as return value. +- (MKTOngoingStubbing *)willReturnUnsignedChar:(unsigned char)value; + +/// Stubs given unsigned int as return value. +- (MKTOngoingStubbing *)willReturnUnsignedInt:(unsigned int)value; + +/// Stubs given unsigned short as return value. +- (MKTOngoingStubbing *)willReturnUnsignedShort:(unsigned short)value; + +/// Stubs given unsigned long as return value. +- (MKTOngoingStubbing *)willReturnUnsignedLong:(unsigned long)value; + +/// Stubs given unsigned long long as return value. +- (MKTOngoingStubbing *)willReturnUnsignedLongLong:(unsigned long long)value; + +/// Stubs given @c NSUInteger as return value. +- (MKTOngoingStubbing *)willReturnUnsignedInteger:(NSUInteger)value; + +/// Stubs given @c float as return value. +- (MKTOngoingStubbing *)willReturnFloat:(float)value; + +/// Stubs given @c double as return value. +- (MKTOngoingStubbing *)willReturnDouble:(double)value; + +#if TARGET_OS_MAC +- (MKTOngoingStubbing *)willReturnPoint:(NSPoint)value; +- (MKTOngoingStubbing *)willReturnSize:(NSSize)value; +- (MKTOngoingStubbing *)willReturnRect:(NSRect)value; +- (MKTOngoingStubbing *)willReturnRange:(NSRange)value; +#endif + +@end diff --git a/Frameworks/OCMockito.framework/Headers/MKTPrimitiveArgumentMatching.h b/Frameworks/OCMockito.framework/Headers/MKTPrimitiveArgumentMatching.h new file mode 100644 index 0000000..2f9316a --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/MKTPrimitiveArgumentMatching.h @@ -0,0 +1,50 @@ +// +// OCMockito - MKTPrimitiveArgumentMatching.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +@protocol HCMatcher; + + +/** + Ability to specify OCHamcrest matchers for primitive numeric arguments. + */ +@protocol MKTPrimitiveArgumentMatching + +/** + Specifies OCHamcrest matcher for a specific argument of a method. + + For methods arguments that take objects, just pass the matcher directly as a method call. But + for arguments that take primitive numeric types, call this to specify the matcher before passing + in a dummy value. Upon verification, the actual numeric argument received will be converted to + an NSNumber before being checked by the matcher. + + The argument index is 0-based, so the first argument of a method has index 0. + + Example: + @code + [[verify(mockArray) withMatcher:greaterThan([NSNumber numberWithInt:1]) forArgument:0] + removeObjectAtIndex:0]; + @endcode + This verifies that @c removeObjectAtIndex: was called with a number greater than 1. + */ +- (id)withMatcher:(id )matcher forArgument:(NSUInteger)index; + +/** + Specifies OCHamcrest matcher for the first argument of a method. + + Equivalent to withMatcher:matcher forArgument:0. + + Example: + @code + [[verify(mockArray) withMatcher:greaterThan([NSNumber numberWithInt:1]) forArgument:0] + removeObjectAtIndex:0]; + @endcode + This verifies that @c removeObjectAtIndex: was called with a number greater than 1. +*/ +- (id)withMatcher:(id )matcher; + +@end diff --git a/Frameworks/OCMockito.framework/Headers/MKTProtocolMock.h b/Frameworks/OCMockito.framework/Headers/MKTProtocolMock.h new file mode 100644 index 0000000..317e45b --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/MKTProtocolMock.h @@ -0,0 +1,23 @@ +// +// OCMockito - MKTProtocolMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object implementing a given protocol. + */ +@interface MKTProtocolMock : MKTBaseMockObject +{ + Protocol *_mockedProtocol; +} + ++ (instancetype)mockForProtocol:(Protocol *)aProtocol; +- (instancetype)initWithProtocol:(Protocol *)aProtocol; + +@end diff --git a/Frameworks/OCMockito.framework/Headers/OCMockito.h b/Frameworks/OCMockito.framework/Headers/OCMockito.h new file mode 100644 index 0000000..1148b5f --- /dev/null +++ b/Frameworks/OCMockito.framework/Headers/OCMockito.h @@ -0,0 +1,219 @@ +// +// OCMockito - OCMockito.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import + +#import "MKTArgumentCaptor.h" +#import "MKTClassObjectMock.h" +#import "MKTObjectMock.h" +#import "MKTObjectAndProtocolMock.h" +#import "MKTOngoingStubbing.h" +#import "MKTProtocolMock.h" +#import + + +#define MKTMock(aClass) (id)[MKTObjectMock mockForClass:aClass] + +/** + Returns a mock object of a given class. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMock instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mock(aClass) MKTMock(aClass) +#endif + + +#define MKTMockClass(aClass) (id)[MKTClassObjectMock mockForClass:aClass] + +/** + Returns a mock class object of a given class. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockClass instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockClass(aClass) MKTMockClass(aClass) +#endif + + +#define MKTMockProtocol(aProtocol) (id)[MKTProtocolMock mockForProtocol:aProtocol] + +/** + Returns a mock object implementing a given protocol. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockProtocol instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockProtocol(aProtocol) MKTMockProtocol(aProtocol) +#endif + + +#define MKTMockObjectAndProtocol(aClass, aProtocol) (id)[MKTObjectAndProtocolMock mockForClass:aClass protocol:aProtocol] + +/** + Returns a mock object of a given class that also implements a given protocol. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockObjectAndProtocol instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockObjectAndProtocol(aClass, aProtocol) (id)MKTMockObjectAndProtocol(aClass, aProtocol) +#endif + + +OBJC_EXPORT MKTOngoingStubbing *MKTGivenWithLocation(id testCase, const char *fileName, int lineNumber, ...); +#define MKTGiven(methodCall) MKTGivenWithLocation(self, __FILE__, __LINE__, methodCall) + +/** + Enables method stubbing. + + Use @c given when you want the mock to return particular value when particular method is called. + + Example: + @li @ref [given([mockObject methodReturningString]) willReturn:@"foo"]; + + See @ref MKTOngoingStubbing for other methods to stub different types of return values. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTGiven instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define given(methodCall) MKTGiven(methodCall) +#endif + + +OBJC_EXPORT id MKTVerifyWithLocation(id mock, id testCase, const char *fileName, int lineNumber); +#define MKTVerify(mock) MKTVerifyWithLocation(mock, self, __FILE__, __LINE__) + +/** + Verifies certain behavior happened once. + + @c verify checks that a method was invoked once, with arguments that match given OCHamcrest + matchers. If an argument is not a matcher, it is implicitly wrapped in an @c equalTo matcher to + check for equality. + + Examples: + @code + [verify(mockObject) someMethod:startsWith(@"foo")]; + [verify(mockObject) someMethod:@"bar"]; + @endcode + + @c verify(mockObject) is equivalent to + @code + verifyCount(mockObject, times(1)) + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTVerify instead.) + */ +#ifdef MOCKITO_SHORTHAND + #undef verify + #define verify(mock) MKTVerify(mock) +#endif + + +OBJC_EXPORT id MKTVerifyCountWithLocation(id mock, id mode, id testCase, const char *fileName, int lineNumber); +#define MKTVerifyCount(mock, mode) MKTVerifyCountWithLocation(mock, mode, self, __FILE__, __LINE__) + +/** + Verifies certain behavior happened a given number of times. + + Examples: + @code + [verifyCount(mockObject, times(5)) someMethod:@"was called five times"]; + [verifyCount(mockObject, never()) someMethod:@"was never called"]; + @endcode + + @c verifyCount checks that a method was invoked a given number of times, with arguments that + match given OCHamcrest matchers. If an argument is not a matcher, it is implicitly wrapped in an + @c equalTo matcher to check for equality. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTVerifyCount instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define verifyCount(mock, mode) MKTVerifyCount(mock, mode) +#endif + + +OBJC_EXPORT id MKTTimes(NSUInteger wantedNumberOfInvocations); + +/** + Verifies exact number of invocations. + + Example: + @code + [verifyCount(mockObject, times(2)) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTTimes instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define times(wantedNumberOfInvocations) MKTTimes(wantedNumberOfInvocations) +#endif + + +OBJC_EXPORT id MKTNever(void); + +/** + Verifies that interaction did not happen. + + Example: + @code + [verifyCount(mockObject, never()) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTNever instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define never() MKTNever() +#endif + + +OBJC_EXPORT id MKTAtLeast(NSUInteger minimumWantedNumberOfInvocations); + +/** + Verifies minimum number of invocations. + + The verification will succeed if the specified invocation happened the number of times + specified or more. + + Example: + @code + [verifyCount(mockObject, atLeast(2)) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTAtLeast instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define atLeast(minimumWantedNumberOfInvocations) MKTAtLeast(minimumWantedNumberOfInvocations) +#endif + + +OBJC_EXPORT id MKTAtLeastOnce(void); + +/** + Verifies that interaction happened once or more. + + Example: + @code + [verifyCount(mockObject, atLeastOnce()) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTAtLeastOnce instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define atLeastOnce() MKTAtLeastOnce() +#endif diff --git a/Frameworks/OCMockito.framework/OCMockito b/Frameworks/OCMockito.framework/OCMockito new file mode 100755 index 0000000..564eee2 Binary files /dev/null and b/Frameworks/OCMockito.framework/OCMockito differ diff --git a/Frameworks/OCMockito.framework/Resources/Info.plist b/Frameworks/OCMockito.framework/Resources/Info.plist new file mode 100644 index 0000000..c0072e5 --- /dev/null +++ b/Frameworks/OCMockito.framework/Resources/Info.plist @@ -0,0 +1,42 @@ + + + + + BuildMachineOSBuild + 13B42 + CFBundleDevelopmentRegion + English + CFBundleExecutable + OCMockito + CFBundleIdentifier + org.mockito.OCMockito + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OCMockito + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.1.0 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 5A3005 + DTPlatformVersion + GM + DTSDKBuild + 13A595 + DTSDKName + macosx10.9 + DTXcode + 0502 + DTXcodeBuild + 5A3005 + NSHumanReadableCopyright + Copyright © 2013 Jonathan M. Reid + + diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/MKTArgumentCaptor.h b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTArgumentCaptor.h new file mode 100644 index 0000000..b159cab --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTArgumentCaptor.h @@ -0,0 +1,18 @@ +// +// OCMockito - MKTArgumentCaptor.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import + + +@interface MKTArgumentCaptor : NSObject + +- (id)capture; +- (id)value; +- (NSArray *)allValues; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/MKTBaseMockObject.h b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTBaseMockObject.h new file mode 100644 index 0000000..e2f367a --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTBaseMockObject.h @@ -0,0 +1,17 @@ +// +// OCMockito - MKTBaseMockObject.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import +#import "MKTPrimitiveArgumentMatching.h" + + +@interface MKTBaseMockObject : NSProxy + +- (instancetype)init; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/MKTClassObjectMock.h b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTClassObjectMock.h new file mode 100644 index 0000000..ab0cd30 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTClassObjectMock.h @@ -0,0 +1,22 @@ +// +// OCMockito - MKTClassObjectMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// +// Created by: David Hart +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object of a given class object. + */ +@interface MKTClassObjectMock : MKTBaseMockObject + ++ (instancetype)mockForClass:(Class)aClass; +- (instancetype)initWithClass:(Class)aClass; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/MKTObjectAndProtocolMock.h b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTObjectAndProtocolMock.h new file mode 100644 index 0000000..8688a62 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTObjectAndProtocolMock.h @@ -0,0 +1,20 @@ +// +// OCMockito - MKTObjectAndProtocolMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Kevin Lundberg +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTProtocolMock.h" + + +/** + Mock object of a given class that also implements a given protocol. + */ +@interface MKTObjectAndProtocolMock : MKTProtocolMock + ++ (instancetype)mockForClass:(Class)aClass protocol:(Protocol *)protocol; +- (instancetype)initWithClass:(Class)aClass protocol:(Protocol *)protocol; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/MKTObjectMock.h b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTObjectMock.h new file mode 100644 index 0000000..4194119 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTObjectMock.h @@ -0,0 +1,22 @@ +// +// OCMockito - MKTObjectMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object of a given class. + */ +@interface MKTObjectMock : MKTBaseMockObject + +@property (readonly, atomic) Class mockedClass; + ++ (instancetype)mockForClass:(Class)aClass; +- (instancetype)initWithClass:(Class)aClass; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/MKTOngoingStubbing.h b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTOngoingStubbing.h new file mode 100644 index 0000000..196f044 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTOngoingStubbing.h @@ -0,0 +1,77 @@ +// +// OCMockito - MKTOngoingStubbing.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import +#import "MKTPrimitiveArgumentMatching.h" + +@class MKTInvocationContainer; + + +/** + Methods to invoke on @c given(methodCall) to return stubbed values. + */ +@interface MKTOngoingStubbing : NSObject + +- (instancetype)initWithInvocationContainer:(MKTInvocationContainer *)invocationContainer; + +/// Stubs given object as return value. +- (MKTOngoingStubbing *)willReturn:(id)object; + +/// Stubs given @c BOOL as return value. +- (MKTOngoingStubbing *)willReturnBool:(BOOL)value; + +/// Stubs given @c char as return value. +- (MKTOngoingStubbing *)willReturnChar:(char)value; + +/// Stubs given @c int as return value. +- (MKTOngoingStubbing *)willReturnInt:(int)value; + +/// Stubs given @c short as return value. +- (MKTOngoingStubbing *)willReturnShort:(short)value; + +/// Stubs given @c long as return value. +- (MKTOngoingStubbing *)willReturnLong:(long)value; + +/// Stubs given long long as return value. +- (MKTOngoingStubbing *)willReturnLongLong:(long long)value; + +/// Stubs given @c NSInteger as return value. +- (MKTOngoingStubbing *)willReturnInteger:(NSInteger)value; + +/// Stubs given unsigned char as return value. +- (MKTOngoingStubbing *)willReturnUnsignedChar:(unsigned char)value; + +/// Stubs given unsigned int as return value. +- (MKTOngoingStubbing *)willReturnUnsignedInt:(unsigned int)value; + +/// Stubs given unsigned short as return value. +- (MKTOngoingStubbing *)willReturnUnsignedShort:(unsigned short)value; + +/// Stubs given unsigned long as return value. +- (MKTOngoingStubbing *)willReturnUnsignedLong:(unsigned long)value; + +/// Stubs given unsigned long long as return value. +- (MKTOngoingStubbing *)willReturnUnsignedLongLong:(unsigned long long)value; + +/// Stubs given @c NSUInteger as return value. +- (MKTOngoingStubbing *)willReturnUnsignedInteger:(NSUInteger)value; + +/// Stubs given @c float as return value. +- (MKTOngoingStubbing *)willReturnFloat:(float)value; + +/// Stubs given @c double as return value. +- (MKTOngoingStubbing *)willReturnDouble:(double)value; + +#if TARGET_OS_MAC +- (MKTOngoingStubbing *)willReturnPoint:(NSPoint)value; +- (MKTOngoingStubbing *)willReturnSize:(NSSize)value; +- (MKTOngoingStubbing *)willReturnRect:(NSRect)value; +- (MKTOngoingStubbing *)willReturnRange:(NSRange)value; +#endif + +@end diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/MKTPrimitiveArgumentMatching.h b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTPrimitiveArgumentMatching.h new file mode 100644 index 0000000..2f9316a --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTPrimitiveArgumentMatching.h @@ -0,0 +1,50 @@ +// +// OCMockito - MKTPrimitiveArgumentMatching.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +@protocol HCMatcher; + + +/** + Ability to specify OCHamcrest matchers for primitive numeric arguments. + */ +@protocol MKTPrimitiveArgumentMatching + +/** + Specifies OCHamcrest matcher for a specific argument of a method. + + For methods arguments that take objects, just pass the matcher directly as a method call. But + for arguments that take primitive numeric types, call this to specify the matcher before passing + in a dummy value. Upon verification, the actual numeric argument received will be converted to + an NSNumber before being checked by the matcher. + + The argument index is 0-based, so the first argument of a method has index 0. + + Example: + @code + [[verify(mockArray) withMatcher:greaterThan([NSNumber numberWithInt:1]) forArgument:0] + removeObjectAtIndex:0]; + @endcode + This verifies that @c removeObjectAtIndex: was called with a number greater than 1. + */ +- (id)withMatcher:(id )matcher forArgument:(NSUInteger)index; + +/** + Specifies OCHamcrest matcher for the first argument of a method. + + Equivalent to withMatcher:matcher forArgument:0. + + Example: + @code + [[verify(mockArray) withMatcher:greaterThan([NSNumber numberWithInt:1]) forArgument:0] + removeObjectAtIndex:0]; + @endcode + This verifies that @c removeObjectAtIndex: was called with a number greater than 1. +*/ +- (id)withMatcher:(id )matcher; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/MKTProtocolMock.h b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTProtocolMock.h new file mode 100644 index 0000000..317e45b --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/MKTProtocolMock.h @@ -0,0 +1,23 @@ +// +// OCMockito - MKTProtocolMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object implementing a given protocol. + */ +@interface MKTProtocolMock : MKTBaseMockObject +{ + Protocol *_mockedProtocol; +} + ++ (instancetype)mockForProtocol:(Protocol *)aProtocol; +- (instancetype)initWithProtocol:(Protocol *)aProtocol; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/A/Headers/OCMockito.h b/Frameworks/OCMockito.framework/Versions/A/Headers/OCMockito.h new file mode 100644 index 0000000..1148b5f --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Headers/OCMockito.h @@ -0,0 +1,219 @@ +// +// OCMockito - OCMockito.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import + +#import "MKTArgumentCaptor.h" +#import "MKTClassObjectMock.h" +#import "MKTObjectMock.h" +#import "MKTObjectAndProtocolMock.h" +#import "MKTOngoingStubbing.h" +#import "MKTProtocolMock.h" +#import + + +#define MKTMock(aClass) (id)[MKTObjectMock mockForClass:aClass] + +/** + Returns a mock object of a given class. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMock instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mock(aClass) MKTMock(aClass) +#endif + + +#define MKTMockClass(aClass) (id)[MKTClassObjectMock mockForClass:aClass] + +/** + Returns a mock class object of a given class. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockClass instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockClass(aClass) MKTMockClass(aClass) +#endif + + +#define MKTMockProtocol(aProtocol) (id)[MKTProtocolMock mockForProtocol:aProtocol] + +/** + Returns a mock object implementing a given protocol. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockProtocol instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockProtocol(aProtocol) MKTMockProtocol(aProtocol) +#endif + + +#define MKTMockObjectAndProtocol(aClass, aProtocol) (id)[MKTObjectAndProtocolMock mockForClass:aClass protocol:aProtocol] + +/** + Returns a mock object of a given class that also implements a given protocol. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockObjectAndProtocol instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockObjectAndProtocol(aClass, aProtocol) (id)MKTMockObjectAndProtocol(aClass, aProtocol) +#endif + + +OBJC_EXPORT MKTOngoingStubbing *MKTGivenWithLocation(id testCase, const char *fileName, int lineNumber, ...); +#define MKTGiven(methodCall) MKTGivenWithLocation(self, __FILE__, __LINE__, methodCall) + +/** + Enables method stubbing. + + Use @c given when you want the mock to return particular value when particular method is called. + + Example: + @li @ref [given([mockObject methodReturningString]) willReturn:@"foo"]; + + See @ref MKTOngoingStubbing for other methods to stub different types of return values. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTGiven instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define given(methodCall) MKTGiven(methodCall) +#endif + + +OBJC_EXPORT id MKTVerifyWithLocation(id mock, id testCase, const char *fileName, int lineNumber); +#define MKTVerify(mock) MKTVerifyWithLocation(mock, self, __FILE__, __LINE__) + +/** + Verifies certain behavior happened once. + + @c verify checks that a method was invoked once, with arguments that match given OCHamcrest + matchers. If an argument is not a matcher, it is implicitly wrapped in an @c equalTo matcher to + check for equality. + + Examples: + @code + [verify(mockObject) someMethod:startsWith(@"foo")]; + [verify(mockObject) someMethod:@"bar"]; + @endcode + + @c verify(mockObject) is equivalent to + @code + verifyCount(mockObject, times(1)) + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTVerify instead.) + */ +#ifdef MOCKITO_SHORTHAND + #undef verify + #define verify(mock) MKTVerify(mock) +#endif + + +OBJC_EXPORT id MKTVerifyCountWithLocation(id mock, id mode, id testCase, const char *fileName, int lineNumber); +#define MKTVerifyCount(mock, mode) MKTVerifyCountWithLocation(mock, mode, self, __FILE__, __LINE__) + +/** + Verifies certain behavior happened a given number of times. + + Examples: + @code + [verifyCount(mockObject, times(5)) someMethod:@"was called five times"]; + [verifyCount(mockObject, never()) someMethod:@"was never called"]; + @endcode + + @c verifyCount checks that a method was invoked a given number of times, with arguments that + match given OCHamcrest matchers. If an argument is not a matcher, it is implicitly wrapped in an + @c equalTo matcher to check for equality. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTVerifyCount instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define verifyCount(mock, mode) MKTVerifyCount(mock, mode) +#endif + + +OBJC_EXPORT id MKTTimes(NSUInteger wantedNumberOfInvocations); + +/** + Verifies exact number of invocations. + + Example: + @code + [verifyCount(mockObject, times(2)) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTTimes instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define times(wantedNumberOfInvocations) MKTTimes(wantedNumberOfInvocations) +#endif + + +OBJC_EXPORT id MKTNever(void); + +/** + Verifies that interaction did not happen. + + Example: + @code + [verifyCount(mockObject, never()) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTNever instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define never() MKTNever() +#endif + + +OBJC_EXPORT id MKTAtLeast(NSUInteger minimumWantedNumberOfInvocations); + +/** + Verifies minimum number of invocations. + + The verification will succeed if the specified invocation happened the number of times + specified or more. + + Example: + @code + [verifyCount(mockObject, atLeast(2)) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTAtLeast instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define atLeast(minimumWantedNumberOfInvocations) MKTAtLeast(minimumWantedNumberOfInvocations) +#endif + + +OBJC_EXPORT id MKTAtLeastOnce(void); + +/** + Verifies that interaction happened once or more. + + Example: + @code + [verifyCount(mockObject, atLeastOnce()) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTAtLeastOnce instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define atLeastOnce() MKTAtLeastOnce() +#endif diff --git a/Frameworks/OCMockito.framework/Versions/A/OCMockito b/Frameworks/OCMockito.framework/Versions/A/OCMockito new file mode 100755 index 0000000..564eee2 Binary files /dev/null and b/Frameworks/OCMockito.framework/Versions/A/OCMockito differ diff --git a/Frameworks/OCMockito.framework/Versions/A/Resources/Info.plist b/Frameworks/OCMockito.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..c0072e5 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,42 @@ + + + + + BuildMachineOSBuild + 13B42 + CFBundleDevelopmentRegion + English + CFBundleExecutable + OCMockito + CFBundleIdentifier + org.mockito.OCMockito + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OCMockito + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.1.0 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 5A3005 + DTPlatformVersion + GM + DTSDKBuild + 13A595 + DTSDKName + macosx10.9 + DTXcode + 0502 + DTXcodeBuild + 5A3005 + NSHumanReadableCopyright + Copyright © 2013 Jonathan M. Reid + + diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTArgumentCaptor.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTArgumentCaptor.h new file mode 100644 index 0000000..b159cab --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTArgumentCaptor.h @@ -0,0 +1,18 @@ +// +// OCMockito - MKTArgumentCaptor.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import + + +@interface MKTArgumentCaptor : NSObject + +- (id)capture; +- (id)value; +- (NSArray *)allValues; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTBaseMockObject.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTBaseMockObject.h new file mode 100644 index 0000000..e2f367a --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTBaseMockObject.h @@ -0,0 +1,17 @@ +// +// OCMockito - MKTBaseMockObject.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import +#import "MKTPrimitiveArgumentMatching.h" + + +@interface MKTBaseMockObject : NSProxy + +- (instancetype)init; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTClassObjectMock.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTClassObjectMock.h new file mode 100644 index 0000000..ab0cd30 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTClassObjectMock.h @@ -0,0 +1,22 @@ +// +// OCMockito - MKTClassObjectMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// +// Created by: David Hart +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object of a given class object. + */ +@interface MKTClassObjectMock : MKTBaseMockObject + ++ (instancetype)mockForClass:(Class)aClass; +- (instancetype)initWithClass:(Class)aClass; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTObjectAndProtocolMock.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTObjectAndProtocolMock.h new file mode 100644 index 0000000..8688a62 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTObjectAndProtocolMock.h @@ -0,0 +1,20 @@ +// +// OCMockito - MKTObjectAndProtocolMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Kevin Lundberg +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTProtocolMock.h" + + +/** + Mock object of a given class that also implements a given protocol. + */ +@interface MKTObjectAndProtocolMock : MKTProtocolMock + ++ (instancetype)mockForClass:(Class)aClass protocol:(Protocol *)protocol; +- (instancetype)initWithClass:(Class)aClass protocol:(Protocol *)protocol; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTObjectMock.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTObjectMock.h new file mode 100644 index 0000000..4194119 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTObjectMock.h @@ -0,0 +1,22 @@ +// +// OCMockito - MKTObjectMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object of a given class. + */ +@interface MKTObjectMock : MKTBaseMockObject + +@property (readonly, atomic) Class mockedClass; + ++ (instancetype)mockForClass:(Class)aClass; +- (instancetype)initWithClass:(Class)aClass; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTOngoingStubbing.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTOngoingStubbing.h new file mode 100644 index 0000000..196f044 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTOngoingStubbing.h @@ -0,0 +1,77 @@ +// +// OCMockito - MKTOngoingStubbing.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import +#import "MKTPrimitiveArgumentMatching.h" + +@class MKTInvocationContainer; + + +/** + Methods to invoke on @c given(methodCall) to return stubbed values. + */ +@interface MKTOngoingStubbing : NSObject + +- (instancetype)initWithInvocationContainer:(MKTInvocationContainer *)invocationContainer; + +/// Stubs given object as return value. +- (MKTOngoingStubbing *)willReturn:(id)object; + +/// Stubs given @c BOOL as return value. +- (MKTOngoingStubbing *)willReturnBool:(BOOL)value; + +/// Stubs given @c char as return value. +- (MKTOngoingStubbing *)willReturnChar:(char)value; + +/// Stubs given @c int as return value. +- (MKTOngoingStubbing *)willReturnInt:(int)value; + +/// Stubs given @c short as return value. +- (MKTOngoingStubbing *)willReturnShort:(short)value; + +/// Stubs given @c long as return value. +- (MKTOngoingStubbing *)willReturnLong:(long)value; + +/// Stubs given long long as return value. +- (MKTOngoingStubbing *)willReturnLongLong:(long long)value; + +/// Stubs given @c NSInteger as return value. +- (MKTOngoingStubbing *)willReturnInteger:(NSInteger)value; + +/// Stubs given unsigned char as return value. +- (MKTOngoingStubbing *)willReturnUnsignedChar:(unsigned char)value; + +/// Stubs given unsigned int as return value. +- (MKTOngoingStubbing *)willReturnUnsignedInt:(unsigned int)value; + +/// Stubs given unsigned short as return value. +- (MKTOngoingStubbing *)willReturnUnsignedShort:(unsigned short)value; + +/// Stubs given unsigned long as return value. +- (MKTOngoingStubbing *)willReturnUnsignedLong:(unsigned long)value; + +/// Stubs given unsigned long long as return value. +- (MKTOngoingStubbing *)willReturnUnsignedLongLong:(unsigned long long)value; + +/// Stubs given @c NSUInteger as return value. +- (MKTOngoingStubbing *)willReturnUnsignedInteger:(NSUInteger)value; + +/// Stubs given @c float as return value. +- (MKTOngoingStubbing *)willReturnFloat:(float)value; + +/// Stubs given @c double as return value. +- (MKTOngoingStubbing *)willReturnDouble:(double)value; + +#if TARGET_OS_MAC +- (MKTOngoingStubbing *)willReturnPoint:(NSPoint)value; +- (MKTOngoingStubbing *)willReturnSize:(NSSize)value; +- (MKTOngoingStubbing *)willReturnRect:(NSRect)value; +- (MKTOngoingStubbing *)willReturnRange:(NSRange)value; +#endif + +@end diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTPrimitiveArgumentMatching.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTPrimitiveArgumentMatching.h new file mode 100644 index 0000000..2f9316a --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTPrimitiveArgumentMatching.h @@ -0,0 +1,50 @@ +// +// OCMockito - MKTPrimitiveArgumentMatching.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +@protocol HCMatcher; + + +/** + Ability to specify OCHamcrest matchers for primitive numeric arguments. + */ +@protocol MKTPrimitiveArgumentMatching + +/** + Specifies OCHamcrest matcher for a specific argument of a method. + + For methods arguments that take objects, just pass the matcher directly as a method call. But + for arguments that take primitive numeric types, call this to specify the matcher before passing + in a dummy value. Upon verification, the actual numeric argument received will be converted to + an NSNumber before being checked by the matcher. + + The argument index is 0-based, so the first argument of a method has index 0. + + Example: + @code + [[verify(mockArray) withMatcher:greaterThan([NSNumber numberWithInt:1]) forArgument:0] + removeObjectAtIndex:0]; + @endcode + This verifies that @c removeObjectAtIndex: was called with a number greater than 1. + */ +- (id)withMatcher:(id )matcher forArgument:(NSUInteger)index; + +/** + Specifies OCHamcrest matcher for the first argument of a method. + + Equivalent to withMatcher:matcher forArgument:0. + + Example: + @code + [[verify(mockArray) withMatcher:greaterThan([NSNumber numberWithInt:1]) forArgument:0] + removeObjectAtIndex:0]; + @endcode + This verifies that @c removeObjectAtIndex: was called with a number greater than 1. +*/ +- (id)withMatcher:(id )matcher; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTProtocolMock.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTProtocolMock.h new file mode 100644 index 0000000..317e45b --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/MKTProtocolMock.h @@ -0,0 +1,23 @@ +// +// OCMockito - MKTProtocolMock.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import "MKTBaseMockObject.h" + + +/** + Mock object implementing a given protocol. + */ +@interface MKTProtocolMock : MKTBaseMockObject +{ + Protocol *_mockedProtocol; +} + ++ (instancetype)mockForProtocol:(Protocol *)aProtocol; +- (instancetype)initWithProtocol:(Protocol *)aProtocol; + +@end diff --git a/Frameworks/OCMockito.framework/Versions/Current/Headers/OCMockito.h b/Frameworks/OCMockito.framework/Versions/Current/Headers/OCMockito.h new file mode 100644 index 0000000..1148b5f --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Headers/OCMockito.h @@ -0,0 +1,219 @@ +// +// OCMockito - OCMockito.h +// Copyright 2013 Jonathan M. Reid. See LICENSE.txt +// +// Created by: Jon Reid, http://qualitycoding.org/ +// Source: https://github.com/jonreid/OCMockito +// + +#import + +#import "MKTArgumentCaptor.h" +#import "MKTClassObjectMock.h" +#import "MKTObjectMock.h" +#import "MKTObjectAndProtocolMock.h" +#import "MKTOngoingStubbing.h" +#import "MKTProtocolMock.h" +#import + + +#define MKTMock(aClass) (id)[MKTObjectMock mockForClass:aClass] + +/** + Returns a mock object of a given class. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMock instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mock(aClass) MKTMock(aClass) +#endif + + +#define MKTMockClass(aClass) (id)[MKTClassObjectMock mockForClass:aClass] + +/** + Returns a mock class object of a given class. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockClass instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockClass(aClass) MKTMockClass(aClass) +#endif + + +#define MKTMockProtocol(aProtocol) (id)[MKTProtocolMock mockForProtocol:aProtocol] + +/** + Returns a mock object implementing a given protocol. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockProtocol instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockProtocol(aProtocol) MKTMockProtocol(aProtocol) +#endif + + +#define MKTMockObjectAndProtocol(aClass, aProtocol) (id)[MKTObjectAndProtocolMock mockForClass:aClass protocol:aProtocol] + +/** + Returns a mock object of a given class that also implements a given protocol. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTMockObjectAndProtocol instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define mockObjectAndProtocol(aClass, aProtocol) (id)MKTMockObjectAndProtocol(aClass, aProtocol) +#endif + + +OBJC_EXPORT MKTOngoingStubbing *MKTGivenWithLocation(id testCase, const char *fileName, int lineNumber, ...); +#define MKTGiven(methodCall) MKTGivenWithLocation(self, __FILE__, __LINE__, methodCall) + +/** + Enables method stubbing. + + Use @c given when you want the mock to return particular value when particular method is called. + + Example: + @li @ref [given([mockObject methodReturningString]) willReturn:@"foo"]; + + See @ref MKTOngoingStubbing for other methods to stub different types of return values. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTGiven instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define given(methodCall) MKTGiven(methodCall) +#endif + + +OBJC_EXPORT id MKTVerifyWithLocation(id mock, id testCase, const char *fileName, int lineNumber); +#define MKTVerify(mock) MKTVerifyWithLocation(mock, self, __FILE__, __LINE__) + +/** + Verifies certain behavior happened once. + + @c verify checks that a method was invoked once, with arguments that match given OCHamcrest + matchers. If an argument is not a matcher, it is implicitly wrapped in an @c equalTo matcher to + check for equality. + + Examples: + @code + [verify(mockObject) someMethod:startsWith(@"foo")]; + [verify(mockObject) someMethod:@"bar"]; + @endcode + + @c verify(mockObject) is equivalent to + @code + verifyCount(mockObject, times(1)) + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTVerify instead.) + */ +#ifdef MOCKITO_SHORTHAND + #undef verify + #define verify(mock) MKTVerify(mock) +#endif + + +OBJC_EXPORT id MKTVerifyCountWithLocation(id mock, id mode, id testCase, const char *fileName, int lineNumber); +#define MKTVerifyCount(mock, mode) MKTVerifyCountWithLocation(mock, mode, self, __FILE__, __LINE__) + +/** + Verifies certain behavior happened a given number of times. + + Examples: + @code + [verifyCount(mockObject, times(5)) someMethod:@"was called five times"]; + [verifyCount(mockObject, never()) someMethod:@"was never called"]; + @endcode + + @c verifyCount checks that a method was invoked a given number of times, with arguments that + match given OCHamcrest matchers. If an argument is not a matcher, it is implicitly wrapped in an + @c equalTo matcher to check for equality. + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTVerifyCount instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define verifyCount(mock, mode) MKTVerifyCount(mock, mode) +#endif + + +OBJC_EXPORT id MKTTimes(NSUInteger wantedNumberOfInvocations); + +/** + Verifies exact number of invocations. + + Example: + @code + [verifyCount(mockObject, times(2)) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTTimes instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define times(wantedNumberOfInvocations) MKTTimes(wantedNumberOfInvocations) +#endif + + +OBJC_EXPORT id MKTNever(void); + +/** + Verifies that interaction did not happen. + + Example: + @code + [verifyCount(mockObject, never()) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTNever instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define never() MKTNever() +#endif + + +OBJC_EXPORT id MKTAtLeast(NSUInteger minimumWantedNumberOfInvocations); + +/** + Verifies minimum number of invocations. + + The verification will succeed if the specified invocation happened the number of times + specified or more. + + Example: + @code + [verifyCount(mockObject, atLeast(2)) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTAtLeast instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define atLeast(minimumWantedNumberOfInvocations) MKTAtLeast(minimumWantedNumberOfInvocations) +#endif + + +OBJC_EXPORT id MKTAtLeastOnce(void); + +/** + Verifies that interaction happened once or more. + + Example: + @code + [verifyCount(mockObject, atLeastOnce()) someMethod:@"some arg"]; + @endcode + + (In the event of a name clash, don't \#define @c MOCKITO_SHORTHAND and use the synonym + @c MKTAtLeastOnce instead.) + */ +#ifdef MOCKITO_SHORTHAND + #define atLeastOnce() MKTAtLeastOnce() +#endif diff --git a/Frameworks/OCMockito.framework/Versions/Current/OCMockito b/Frameworks/OCMockito.framework/Versions/Current/OCMockito new file mode 100755 index 0000000..564eee2 Binary files /dev/null and b/Frameworks/OCMockito.framework/Versions/Current/OCMockito differ diff --git a/Frameworks/OCMockito.framework/Versions/Current/Resources/Info.plist b/Frameworks/OCMockito.framework/Versions/Current/Resources/Info.plist new file mode 100644 index 0000000..c0072e5 --- /dev/null +++ b/Frameworks/OCMockito.framework/Versions/Current/Resources/Info.plist @@ -0,0 +1,42 @@ + + + + + BuildMachineOSBuild + 13B42 + CFBundleDevelopmentRegion + English + CFBundleExecutable + OCMockito + CFBundleIdentifier + org.mockito.OCMockito + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + OCMockito + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.1.0 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 5A3005 + DTPlatformVersion + GM + DTSDKBuild + 13A595 + DTSDKName + macosx10.9 + DTXcode + 0502 + DTXcodeBuild + 5A3005 + NSHumanReadableCopyright + Copyright © 2013 Jonathan M. Reid + + diff --git a/Meta/Cell Layout.graffle b/Meta/Cell Layout.graffle index 748dd42..20b54e0 100644 --- a/Meta/Cell Layout.graffle +++ b/Meta/Cell Layout.graffle @@ -7,14 +7,14 @@ ApplicationVersion com.omnigroup.OmniGrafflePro - 139.16.0.171715 + 139.18.0.187838 AutoAdjust BackgroundGraphic Bounds - {{0, 0}, {1339, 1040}} + {{0, 0}, {1306, 1040}} Class SolidGraphic ID @@ -38,7 +38,7 @@ CanvasOrigin {0, 0} CanvasSize - {1339, 1040} + {1306, 1040} ColumnAlign 1 ColumnSpacing @@ -80,7 +80,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -275,12 +275,12 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc -\f0\fs24 \cf0 Icon 2} +\f0\fs24 \cf0 Link Icon} @@ -310,7 +310,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -515,7 +515,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -710,7 +710,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -745,12 +745,12 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc -\f0\fs24 \cf0 Icon 1} +\f0\fs24 \cf0 Link Icon} @@ -980,7 +980,7 @@ MasterSheets ModificationDate - 2012-12-22 21:27:42 +0000 + 2013-07-28 14:40:48 +0000 Modifier Tae Won Ha NotesVisible @@ -1054,14 +1054,9 @@ CurrentSheet 0 ExpandedCanvases - - - name - Canvas 1 - - + Frame - {{28, 71}, {1473, 1087}} + {{0, 4}, {1440, 874}} ListView OutlineWidth @@ -1075,7 +1070,7 @@ SidebarWidth 120 VisibleRegion - {{0, 65}, {1338, 948}} + {{0, 77}, {1305, 735}} Zoom 1 ZoomValues diff --git a/Meta/Cell Test Cases.graffle b/Meta/Cell Test Cases.graffle index d4c0dc4..8b02c49 100644 --- a/Meta/Cell Test Cases.graffle +++ b/Meta/Cell Test Cases.graffle @@ -5,7 +5,7 @@ ApplicationVersion com.omnigroup.OmniGrafflePro - 139.16.0.171715 + 139.18.0.187838 CreationDate 2012-12-20 16:59:04 +0000 @@ -26,7 +26,7 @@ MasterSheets ModificationDate - 2012-12-27 16:08:17 +0000 + 2013-07-28 14:47:32 +0000 Modifier Tae Won Ha NotesVisible @@ -85,7 +85,7 @@ BackgroundGraphic Bounds - {{0, 0}, {1010, 1160}} + {{0, 0}, {1306, 1470}} Class SolidGraphic ID @@ -109,7 +109,7 @@ CanvasOrigin {0, 0} CanvasSize - {1010, 1160} + {1306, 1470} ColumnAlign 1 ColumnSpacing @@ -118,6 +118,236 @@ 1 pt = 1 px GraphicsList + + Bounds + {{310, 1210}, {140, 20}} + Class + ShapedGraphic + ID + 178 + Shape + Rectangle + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 icons} + + + + Bounds + {{220, 1360}, {170, 20}} + Class + ShapedGraphic + ID + 177 + Shape + Rectangle + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 text} + + + + Bounds + {{410, 1340}, {70, 60}} + Class + ShapedGraphic + ID + 176 + Shape + Rectangle + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 link} + + + + Bounds + {{200, 1320}, {300, 100}} + Class + ShapedGraphic + ID + 175 + Shape + Rectangle + + + Bounds + {{102, 1360}, {8, 17}} + Class + ShapedGraphic + FitText + YES + Flow + Resize + FontInfo + + Font + Helvetica-Bold + Size + 14 + + ID + 174 + Shape + Rectangle + Style + + fill + + Draws + NO + + shadow + + Draws + NO + + stroke + + Draws + NO + + + Text + + Pad + 0 + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\b\fs28 \cf0 9} + VerticalPad + 0 + + Wrap + NO + + + Bounds + {{470, 1190}, {170, 60}} + Class + ShapedGraphic + ID + 173 + Shape + Rectangle + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 text} + + + + Bounds + {{220, 1210}, {70, 20}} + Class + ShapedGraphic + ID + 172 + Shape + Rectangle + Text + + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 link} + + + + Bounds + {{200, 1170}, {460, 100}} + Class + ShapedGraphic + ID + 171 + Shape + Rectangle + + + Bounds + {{102, 1210}, {8, 17}} + Class + ShapedGraphic + FitText + YES + Flow + Resize + FontInfo + + Font + Helvetica-Bold + Size + 14 + + ID + 167 + Shape + Rectangle + Style + + fill + + Draws + NO + + shadow + + Draws + NO + + stroke + + Draws + NO + + + Text + + Pad + 0 + Text + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\b\fs28 \cf0 8} + VerticalPad + 0 + + Wrap + NO + Bounds {{260, 890}, {50, 50}} @@ -130,7 +360,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -150,7 +380,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -170,7 +400,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -190,7 +420,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -241,7 +471,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -265,7 +495,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -316,7 +546,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -340,7 +570,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -370,7 +600,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -390,7 +620,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -420,7 +650,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -450,7 +680,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -480,7 +710,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -500,7 +730,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -561,7 +791,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -616,7 +846,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -671,7 +901,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -726,7 +956,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -781,7 +1011,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -836,7 +1066,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -885,7 +1115,7 @@ YES HPages - 2 + 3 KeepToScale Layers @@ -1015,7 +1245,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1079,7 +1309,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1139,7 +1369,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1166,7 +1396,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1217,7 +1447,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1281,7 +1511,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1341,7 +1571,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1368,7 +1598,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1428,7 +1658,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1488,7 +1718,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1515,7 +1745,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1566,7 +1796,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1597,7 +1827,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1657,7 +1887,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1717,7 +1947,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1744,7 +1974,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1804,7 +2034,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1864,7 +2094,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1891,7 +2121,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1942,7 +2172,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -1997,7 +2227,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -2052,7 +2282,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -2107,7 +2337,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -2320,7 +2550,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -2371,7 +2601,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -2437,7 +2667,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -2497,7 +2727,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -2524,7 +2754,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -2666,7 +2896,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -2732,7 +2962,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -2792,7 +3022,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -2819,7 +3049,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -2870,7 +3100,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -2936,7 +3166,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -2996,7 +3226,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3023,7 +3253,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3074,7 +3304,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3145,8 +3375,8 @@ 164 Points - {500.49999996314045, 300.01807437761948} - {599.50000029434557, 300.0535073160674} + {500.5, 300.00023532284666} + {599.5, 300.00069664882318} Style @@ -3178,7 +3408,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3231,8 +3461,8 @@ 161 Points - {858.67228137654183, 104} - {699.98833888874901, 138.90000514129241} + {858.6698168775356, 104} + {699.98833229862055, 138.89676242086139} Style @@ -3299,7 +3529,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3323,7 +3553,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3409,7 +3639,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3429,7 +3659,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3482,7 +3712,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3535,7 +3765,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3595,7 +3825,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3655,7 +3885,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3682,7 +3912,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3742,7 +3972,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3802,7 +4032,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3829,7 +4059,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3849,8 +4079,8 @@ 139 Points - {399.50000007335507, 899.97232339783943} - {300.4999993388758, 899.91806629609289} + {399.5, 899.99963965913844} + {300.5, 899.99893324834045} Style @@ -3882,7 +4112,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3902,7 +4132,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3955,7 +4185,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -3975,7 +4205,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4026,7 +4256,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4081,7 +4311,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4136,7 +4366,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4191,7 +4421,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4222,7 +4452,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4282,7 +4512,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4342,7 +4572,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4369,7 +4599,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4429,7 +4659,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4489,7 +4719,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4516,7 +4746,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4569,7 +4799,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4589,7 +4819,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4642,7 +4872,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4662,7 +4892,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4713,7 +4943,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4768,7 +4998,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4823,7 +5053,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4878,7 +5108,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4933,7 +5163,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -4988,7 +5218,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -5067,7 +5297,7 @@ BackgroundGraphic Bounds - {{0, 0}, {1306, 940}} + {{0, 0}, {1227, 940}} Class SolidGraphic ID @@ -5091,7 +5321,7 @@ CanvasOrigin {0, 0} CanvasSize - {1306, 940} + {1227, 940} ColumnAlign 1 ColumnSpacing @@ -5475,7 +5705,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -5528,7 +5758,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -5967,7 +6197,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -6354,7 +6584,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -6633,7 +6863,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -6688,7 +6918,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -6743,7 +6973,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -6798,7 +7028,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -6853,7 +7083,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -6921,7 +7151,7 @@ Points {320.50000999227069, 739.99998000190931} - {379.49999000773226, 739.99998000190931} + {379.49999000773221, 739.99998000190931} Style @@ -7004,7 +7234,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -7094,7 +7324,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -7133,7 +7363,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -7236,7 +7466,7 @@ Points {219.03853235430472, 142.3845870582781} - {280.96146764569528, 117.61541294172187} + {280.96146764569528, 117.61541294172189} Style @@ -7335,7 +7565,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -7414,7 +7644,7 @@ BackgroundGraphic Bounds - {{0, 0}, {1306, 940}} + {{0, 0}, {1215, 940}} Class SolidGraphic ID @@ -7438,7 +7668,7 @@ CanvasOrigin {0, 0} CanvasSize - {1306, 940} + {1215, 940} ColumnAlign 1 ColumnSpacing @@ -7820,7 +8050,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -7873,7 +8103,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -8312,7 +8542,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -8699,7 +8929,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -8978,7 +9208,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -9033,7 +9263,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -9088,7 +9318,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -9143,7 +9373,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -9198,7 +9428,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -9265,8 +9495,8 @@ 62 Points - {320.50000999227206, 739.99998000190931} - {379.49999000785175, 739.99992244647603} + {320.50000999227069, 739.99998000190931} + {379.49999000773221, 739.99998000190931} Style @@ -9313,7 +9543,7 @@ Points {220.50000999227385, 739.99998391705083} - {279.49999000772851, 739.99998391705083} + {279.49999000772846, 739.99998391705083} Style @@ -9349,7 +9579,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -9439,7 +9669,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -9478,7 +9708,7 @@ Text Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -9547,8 +9777,8 @@ 10 Points - {219.03853119794053, 157.6154124791762} - {280.96146880205953, 182.38458752082377} + {219.0385311979405, 157.6154124791762} + {280.96146880205953, 182.3845875208238} Style @@ -9580,8 +9810,8 @@ 9 Points - {219.03853235430472, 142.38458705827807} - {280.96146764569522, 117.6154129417218} + {219.03853235430472, 142.3845870582781} + {280.96146764569528, 117.61541294172189} Style @@ -9680,7 +9910,7 @@ Pad 0 Text - {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340 + {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390 \cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc @@ -9761,11 +9991,11 @@ WindowInfo CurrentSheet - 4 + 0 ExpandedCanvases Frame - {{-1440, 0}, {1440, 900}} + {{0, 4}, {1440, 874}} ListView OutlineWidth @@ -9779,9 +10009,9 @@ SidebarWidth 120 VisibleRegion - {{0, 179}, {1305, 761}} + {{-40.999999999999993, 76.595744875126044}, {1388.2978758616596, 781.91489560024513}} Zoom - 1 + 0.93999999761581421 ZoomValues @@ -9801,7 +10031,7 @@ Cell Sizing - 1 + 0.93999999761581421 1 diff --git a/Qmind.xcodeproj/project.pbxproj b/Qmind.xcodeproj/project.pbxproj index de667ac..b0a83bd 100644 --- a/Qmind.xcodeproj/project.pbxproj +++ b/Qmind.xcodeproj/project.pbxproj @@ -9,6 +9,7 @@ /* Begin PBXBuildFile section */ 1929B057FE485599D1E5D1C6 /* QMCellPropertiesManagerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B918241E1ACDCDC89AA2 /* QMCellPropertiesManagerTest.m */; }; 1929B059162A10744EF02985 /* QMIconsPaneView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B2FCB4A407CCC68D9D45 /* QMIconsPaneView.m */; }; + 1929B0840D140F224C35878C /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1929BF92908230239CB415EA /* XCTest.framework */; }; 1929B0EDA68642C93FA1B352 /* QMLookUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B3AAAFA6CF293F45F812 /* QMLookUtil.m */; }; 1929B194FE5529B11EAFE7DA /* QMCellSizeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B353C299640D7D91AA9D /* QMCellSizeManager.m */; }; 1929B24EA8328150C669DA66 /* QMCellSizeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B353C299640D7D91AA9D /* QMCellSizeManager.m */; }; @@ -19,6 +20,7 @@ 1929B36A99C420734C86E3CE /* QMCellPropertiesManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929BBD6539D9FDEC76E6137 /* QMCellPropertiesManager.m */; }; 1929B3A02CC1561045BF1FEC /* QMCellPropertiesManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929BBD6539D9FDEC76E6137 /* QMCellPropertiesManager.m */; }; 1929B3DBFDDCED6A832EBA6B /* ToolbarZoomOutTemplate@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1929B38391793C25EF358118 /* ToolbarZoomOutTemplate@2x.png */; }; + 1929B4013A5FFD5A6E6DF6F9 /* QMBorderedView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B5877760CCBAFC69427F /* QMBorderedView.m */; }; 1929B502755E4F47D5612FA2 /* ToolbarDeleteNodeTemplate@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1929B7F07C814229B2270D34 /* ToolbarDeleteNodeTemplate@2x.png */; }; 1929B5884D28A022A0F52F48 /* QMIdGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929BB6573724B1C6F3E369C /* QMIdGenerator.m */; }; 1929B676F4A74F9E9F96AB42 /* QMIcon.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929BA02C47D9D0A43F49EFA /* QMIcon.m */; }; @@ -29,10 +31,7 @@ 1929B92CBF92FC4F2EFCAF0E /* QMLookUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 1929B07398BED585370DE664 /* QMLookUtil.h */; }; 1929BB168680A05751E3F4C4 /* QMIcon.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929BA02C47D9D0A43F49EFA /* QMIcon.m */; }; 1929BB6FEB32F64962B24562 /* QMManualBeanProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B43F698543362E51BAB9 /* QMManualBeanProvider.m */; }; - 1929BC2EF2C7437963725958 /* fontawesome-webfont.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1929B797593F08F349F11820 /* fontawesome-webfont.ttf */; }; 1929BCAC65EC1249AD11F2C3 /* ToolbarZoomActualSizeTemplate@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1929B7ECDA57AFF5C1F1B27F /* ToolbarZoomActualSizeTemplate@2x.png */; }; - 1929BCFE3C344BEBB39D5A5B /* fontawesome-webfont.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1929B797593F08F349F11820 /* fontawesome-webfont.ttf */; }; - 1929BDFA98377A72564FBF0A /* fontawesome-webfont.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1929B797593F08F349F11820 /* fontawesome-webfont.ttf */; }; 1929BF0203FEF5FAAC4C4C25 /* QMIconsPaneView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B2FCB4A407CCC68D9D45 /* QMIconsPaneView.m */; }; 1929BFD7B74324D2B8724842 /* IconGridViewTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B83740C95CACCC412474 /* IconGridViewTest.m */; }; 1929BFFB89F8FFD850719385 /* QMCacaoTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B03F77F02BDFB060054E /* QMCacaoTestCase.m */; }; @@ -42,7 +41,7 @@ 4B03B2521628726E00E5ECA2 /* TBCacao.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B03B2481628724000E5ECA2 /* TBCacao.framework */; }; 4B10DDA2174F96E000B58F6E /* mindmap-reader-no-id-test.mm in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1929B0345B0EF35021CB20DF /* mindmap-reader-no-id-test.mm */; }; 4B10DDAA174FA0DB00B58F6E /* QMIdGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929BB6573724B1C6F3E369C /* QMIdGenerator.m */; }; - 4B12E236168CC34900D972BE /* IconTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929BC2901D96DABE95AE4BB /* IconTest.m */; }; + 4B12E236168CC34900D972BE /* QMIconTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929BC2901D96DABE95AE4BB /* QMIconTest.m */; }; 4B15777416A2EFFE0048480E /* QTestKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B15777116A2EFEF0048480E /* QTestKit.framework */; }; 4B15777516A2F0000048480E /* Qkit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B15776F16A2EFEF0048480E /* Qkit.framework */; }; 4B15777616A2F0160048480E /* Qkit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B15776F16A2EFEF0048480E /* Qkit.framework */; }; @@ -53,6 +52,8 @@ 4B2A00F2159F489C00582EA5 /* document-test-fail-open.mm in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A008509BD /* document-test-fail-open.mm */; }; 4B39307A14EC418900A9D541 /* QMMindmapView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B39307914EC418900A9D541 /* QMMindmapView.m */; }; 4B396DD614F7E446000C7B36 /* dummy.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A00850936 /* dummy.pdf */; }; + 4B521D9C17A54EB600153278 /* fontawesome-webfont.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 4B521D9B17A54EB600153278 /* fontawesome-webfont.ttf */; }; + 4B551D8B1882A448007A16D6 /* QMBorderedView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B5877760CCBAFC69427F /* QMBorderedView.m */; }; 4B5CB60A15E1187500E05BD7 /* QMAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFCD74E14F3D33600850924 /* QMAppDelegate.m */; }; 4B5CB60B15E1187500E05BD7 /* QMAppSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF26 /* QMAppSettings.m */; }; 4B5CB60C15E1187500E05BD7 /* QMUiDrawer.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B20B51839B9482813969 /* QMUiDrawer.m */; }; @@ -85,7 +86,7 @@ 4B5CB65615E11B6200E05BD7 /* DocumentTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF34 /* DocumentTest.m */; }; 4B5CB65715E11B6B00E05BD7 /* MindmapWriterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF1F /* MindmapWriterTest.m */; }; 4B5CB65815E11C1000E05BD7 /* RootNodeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A00850958 /* RootNodeTest.m */; }; - 4B5CB65915E11C1000E05BD7 /* NodeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85651514E468C100C6FF1A /* NodeTest.m */; }; + 4B5CB65915E11C1000E05BD7 /* QMNodeTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85651514E468C100C6FF1A /* QMNodeTest.m */; }; 4B5CB65A15E11C2F00E05BD7 /* DummyObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B5CB56E15E10F5D00E05BD7 /* DummyObserver.m */; }; 4B5CB65C15E11C9600E05BD7 /* MindmapViewDraggingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B0594A00B0CBF7573BD1 /* MindmapViewDraggingTest.m */; }; 4B5CB65D15E11C9600E05BD7 /* CellEditorTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A00850997 /* CellEditorTest.m */; }; @@ -96,7 +97,7 @@ 4B5CB66215E11C9600E05BD7 /* RootCellTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A00850960 /* RootCellTest.m */; }; 4B5CB66315E11C9600E05BD7 /* QMMindmapViewComponentTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A0085094F /* QMMindmapViewComponentTest.m */; }; 4B5CB66515E11C9600E05BD7 /* CellLayoutManagerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF78 /* CellLayoutManagerTest.m */; }; - 4B5CB66615E11C9600E05BD7 /* CellTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF65 /* CellTest.m */; }; + 4B5CB66615E11C9600E05BD7 /* QMCellTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF65 /* QMCellTest.m */; }; 4B5CB66715E11C9600E05BD7 /* TextLayoutManagerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF4A /* TextLayoutManagerTest.m */; }; 4B66184D174175C000C6799D /* ToolbarNewNodeTemplate@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4B66184C174175C000C6799D /* ToolbarNewNodeTemplate@2x.png */; }; 4B665F69151D1FA900F161A1 /* ToolbarZoomActualSizeTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = 4B665F66151D1FA900F161A1 /* ToolbarZoomActualSizeTemplate.png */; }; @@ -133,8 +134,9 @@ 4B992F0E1735444E00C5844E /* QmindLook.qlgenerator in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B992EF21735176D00C5844E /* QmindLook.qlgenerator */; }; 4B992F1B173545CD00C5844E /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B992F1A173545CD00C5844E /* Sparkle.framework */; }; 4B992F1E173545DD00C5844E /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B992F1A173545CD00C5844E /* Sparkle.framework */; }; - 4B9D981016878B0F00222D03 /* CellSizeManagerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B209E6C81B9C03DE0505 /* CellSizeManagerTest.m */; }; + 4B9D981016878B0F00222D03 /* QMCellSizeManagerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1929B209E6C81B9C03DE0505 /* QMCellSizeManagerTest.m */; }; 4B9DE3341569367500AAF5C1 /* QmindIcon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4B9DE3331569367500AAF5C1 /* QmindIcon.icns */; }; + 4BA3F92817F8265C00EB5A81 /* fontawesome-webfont.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 4B521D9B17A54EB600153278 /* fontawesome-webfont.ttf */; }; 4BA52C2B14FA52F5000EB8E5 /* cell-population-test.mm in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A00850952 /* cell-population-test.mm */; }; 4BB45FDF173647C400B2B15D /* QMAppSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF26 /* QMAppSettings.m */; }; 4BB45FE0173647C400B2B15D /* QMTextLayoutManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF41 /* QMTextLayoutManager.m */; }; @@ -160,7 +162,10 @@ 4BB460071736A03F00B2B15D /* QMMindmapReader.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF0D /* QMMindmapReader.m */; }; 4BB460081736A03F00B2B15D /* QMMindmapViewDataSourceImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A008509A6 /* QMMindmapViewDataSourceImpl.m */; }; 4BB460091736A03F00B2B15D /* QMDocumentWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF22 /* QMDocumentWindowController.m */; }; - 4BCA0466158CB94B0034CB4A /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BCA0464158CB94B0034CB4A /* SenTestingKit.framework */; }; + 4BBFA3CE1880278700DAE6B8 /* OCHamcrest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BBFA3CC1880278700DAE6B8 /* OCHamcrest.framework */; }; + 4BBFA3CF1880278700DAE6B8 /* OCMockito.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BBFA3CD1880278700DAE6B8 /* OCMockito.framework */; }; + 4BBFA3D1188027B300DAE6B8 /* OCHamcrest.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BBFA3CC1880278700DAE6B8 /* OCHamcrest.framework */; }; + 4BBFA3D2188027B300DAE6B8 /* OCMockito.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BBFA3CD1880278700DAE6B8 /* OCMockito.framework */; }; 4BD8C1291736F43200DC4B6F /* IconsFreeMindToQmind.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A00850938 /* IconsFreeMindToQmind.plist */; }; 4BDA7813170F80F5000AB84A /* sparkle-pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = 4BDA7812170F80F5000AB84A /* sparkle-pub.pem */; }; 4BDC9D901524EEAD008CEB8E /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4BDC9D8E1524EEAD008CEB8E /* Localizable.strings */; }; @@ -174,8 +179,6 @@ 4BF11362173836DF0029C032 /* dummy.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A00850936 /* dummy.pdf */; }; 4BFCD74F14F3D33600850924 /* QMAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFCD74E14F3D33600850924 /* QMAppDelegate.m */; }; 4BFCD75814F3D34700850924 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B8564C514E461DC00C6FF0A /* Cocoa.framework */; }; - 4BFCD76E14F3D53300850924 /* OCMockito.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF5D /* OCMockito.framework */; }; - 4BFCD76F14F3D53300850924 /* OCHamcrest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF1D /* OCHamcrest.framework */; }; 4BFCD7AB14F3E32A00850924 /* mindmap-writer-test.mm in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B39306914EC2E1500A9D541 /* mindmap-writer-test.mm */; }; 4BFCD7AC14F3E32A00850924 /* mindmap-reader-test.mm in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B85653514E46D6800C6FF1C /* mindmap-reader-test.mm */; }; 4BFCD7AC14F3E32A00850926 /* QMCellDrawer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFCD7AC14F3E32A00850925 /* QMCellDrawer.m */; }; @@ -333,6 +336,17 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 4BBFA3D0188027A800DAE6B8 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 16; + files = ( + 4BBFA3D1188027B300DAE6B8 /* OCHamcrest.framework in CopyFiles */, + 4BBFA3D2188027B300DAE6B8 /* OCMockito.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 4BFCD7AA14F3E31F00850924 /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -356,10 +370,11 @@ 1929B0594A00B0CBF7573BD1 /* MindmapViewDraggingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MindmapViewDraggingTest.m; sourceTree = ""; }; 1929B06F15A6BFDDAEF39EE7 /* QMIdGeneratorTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMIdGeneratorTest.m; sourceTree = ""; }; 1929B07398BED585370DE664 /* QMLookUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMLookUtil.h; sourceTree = ""; }; - 1929B209E6C81B9C03DE0505 /* CellSizeManagerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CellSizeManagerTest.m; sourceTree = ""; }; + 1929B209E6C81B9C03DE0505 /* QMCellSizeManagerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMCellSizeManagerTest.m; sourceTree = ""; }; 1929B20B51839B9482813969 /* QMUiDrawer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMUiDrawer.m; sourceTree = ""; }; 1929B2B42279F40C0CE08187 /* QMIdGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMIdGenerator.h; sourceTree = ""; }; 1929B2FCB4A407CCC68D9D45 /* QMIconsPaneView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMIconsPaneView.m; sourceTree = ""; }; + 1929B302EBBFF24DFC769829 /* QMBorderedView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMBorderedView.h; sourceTree = ""; }; 1929B353C299640D7D91AA9D /* QMCellSizeManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMCellSizeManager.m; sourceTree = ""; }; 1929B38391793C25EF358118 /* ToolbarZoomOutTemplate@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "ToolbarZoomOutTemplate@2x.png"; path = "Resources/ToolbarZoomOutTemplate@2x.png"; sourceTree = ""; }; 1929B3AAAFA6CF293F45F812 /* QMLookUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMLookUtil.m; sourceTree = ""; }; @@ -367,11 +382,11 @@ 1929B49C1022861E4672965B /* QMCellPropertiesManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMCellPropertiesManager.h; sourceTree = ""; }; 1929B4E814EA183B1791462A /* QMUiDrawer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMUiDrawer.h; sourceTree = ""; }; 1929B5323A40ED9F3A4A04BE /* ToolbarZoomInTemplate@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "ToolbarZoomInTemplate@2x.png"; path = "Resources/ToolbarZoomInTemplate@2x.png"; sourceTree = ""; }; + 1929B5877760CCBAFC69427F /* QMBorderedView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMBorderedView.m; sourceTree = ""; }; 1929B5969C8028EF888FAA7C /* QMIconsPaneView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMIconsPaneView.h; sourceTree = ""; }; 1929B5A9AAEC82B9CE22DFA2 /* QMCellSizeManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMCellSizeManager.h; sourceTree = ""; }; 1929B743A0D8FAB8C620E299 /* IconCollectionViewItemTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IconCollectionViewItemTest.m; sourceTree = ""; }; 1929B7664B7E4A08B9E7118B /* CellComponentTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CellComponentTest.m; sourceTree = ""; }; - 1929B797593F08F349F11820 /* fontawesome-webfont.ttf */ = {isa = PBXFileReference; lastKnownFileType = file.ttf; name = "fontawesome-webfont.ttf"; path = "Resources/fontawesome-webfont.ttf"; sourceTree = ""; }; 1929B7ECDA57AFF5C1F1B27F /* ToolbarZoomActualSizeTemplate@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "ToolbarZoomActualSizeTemplate@2x.png"; path = "Resources/ToolbarZoomActualSizeTemplate@2x.png"; sourceTree = ""; }; 1929B7F07C814229B2270D34 /* ToolbarDeleteNodeTemplate@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "ToolbarDeleteNodeTemplate@2x.png"; path = "Resources/ToolbarDeleteNodeTemplate@2x.png"; sourceTree = ""; }; 1929B83740C95CACCC412474 /* IconGridViewTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IconGridViewTest.m; sourceTree = ""; }; @@ -380,15 +395,17 @@ 1929BA02C47D9D0A43F49EFA /* QMIcon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMIcon.m; sourceTree = ""; }; 1929BB6573724B1C6F3E369C /* QMIdGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMIdGenerator.m; sourceTree = ""; }; 1929BBD6539D9FDEC76E6137 /* QMCellPropertiesManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMCellPropertiesManager.m; sourceTree = ""; }; - 1929BC2901D96DABE95AE4BB /* IconTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IconTest.m; sourceTree = ""; }; + 1929BC2901D96DABE95AE4BB /* QMIconTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMIconTest.m; sourceTree = ""; }; 1929BC9E791535ADC6E79637 /* QMCacaoTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMCacaoTestCase.h; sourceTree = ""; }; 1929BF6379805052FA43883B /* QMTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMTypes.h; sourceTree = ""; }; + 1929BF92908230239CB415EA /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 1929BFC33C586805007B7B9E /* QMManualBeanProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMManualBeanProvider.h; sourceTree = ""; }; 4B03B23F1628724000E5ECA2 /* TBCacao.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = TBCacao.xcodeproj; path = tbcacao/TBCacao.xcodeproj; sourceTree = ""; }; 4B15776516A2EFEF0048480E /* Qkit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Qkit.xcodeproj; path = qkit/Qkit.xcodeproj; sourceTree = ""; }; 4B39306914EC2E1500A9D541 /* mindmap-writer-test.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "mindmap-writer-test.mm"; sourceTree = ""; }; 4B39307814EC418900A9D541 /* QMMindmapView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMMindmapView.h; sourceTree = ""; }; 4B39307914EC418900A9D541 /* QMMindmapView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMMindmapView.m; sourceTree = ""; }; + 4B521D9B17A54EB600153278 /* fontawesome-webfont.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "fontawesome-webfont.ttf"; path = "Resources/Fontawesome/fontawesome-webfont.ttf"; sourceTree = ""; }; 4B5CB56D15E10F5D00E05BD7 /* DummyObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DummyObserver.h; sourceTree = ""; }; 4B5CB56E15E10F5D00E05BD7 /* DummyObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DummyObserver.m; sourceTree = ""; }; 4B5CB58115E110B300E05BD7 /* QMBaseTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMBaseTestCase.h; sourceTree = ""; }; @@ -401,9 +418,6 @@ 4B6B790F151F114600E4C968 /* ToolbarNewNodeTemplate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ToolbarNewNodeTemplate.png; path = Resources/ToolbarNewNodeTemplate.png; sourceTree = ""; }; 4B8564C114E461DC00C6FF0A /* Qmind.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Qmind.app; sourceTree = BUILT_PRODUCTS_DIR; }; 4B8564C514E461DC00C6FF0A /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - 4B8564C814E461DC00C6FF0A /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - 4B8564C914E461DC00C6FF0A /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; - 4B8564CA14E461DC00C6FF0A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 4B8564CD14E461DC00C6FF0A /* Qmind-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Qmind-Info.plist"; sourceTree = ""; }; 4B8564CF14E461DC00C6FF0A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 4B8564D114E461DC00C6FF0A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -417,7 +431,7 @@ 4B8564F414E4643A00C6FF0A /* QMNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMNode.m; sourceTree = ""; }; 4B8564FF14E4688900C6FF0A /* QmindTest-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "QmindTest-Info.plist"; sourceTree = ""; }; 4B85650114E4688900C6FF0A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 4B85651514E468C100C6FF1A /* NodeTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NodeTest.m; sourceTree = ""; }; + 4B85651514E468C100C6FF1A /* QMNodeTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMNodeTest.m; sourceTree = ""; }; 4B85653514E46D6800C6FF0C /* QMMindmapReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMMindmapReader.h; sourceTree = ""; }; 4B85653514E46D6800C6FF0D /* QMMindmapReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMMindmapReader.m; sourceTree = ""; }; 4B85653514E46D6800C6FF10 /* QMMindmapWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMMindmapWriter.h; sourceTree = ""; }; @@ -426,7 +440,6 @@ 4B85653514E46D6800C6FF15 /* QMProxyNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMProxyNode.m; sourceTree = ""; }; 4B85653514E46D6800C6FF19 /* MindmapReaderTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MindmapReaderTest.m; sourceTree = ""; }; 4B85653514E46D6800C6FF1C /* mindmap-reader-test.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "mindmap-reader-test.mm"; sourceTree = ""; }; - 4B85653514E46D6800C6FF1D /* OCHamcrest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OCHamcrest.framework; path = /Library/Frameworks/OCHamcrest.framework; sourceTree = ""; }; 4B85653514E46D6800C6FF1F /* MindmapWriterTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MindmapWriterTest.m; sourceTree = ""; }; 4B85653514E46D6800C6FF22 /* QMDocumentWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMDocumentWindowController.m; sourceTree = ""; }; 4B85653514E46D6800C6FF25 /* QMDocumentWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMDocumentWindowController.h; sourceTree = ""; }; @@ -440,10 +453,9 @@ 4B85653514E46D6800C6FF44 /* QMTextLayoutManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMTextLayoutManager.h; sourceTree = ""; }; 4B85653514E46D6800C6FF4A /* TextLayoutManagerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TextLayoutManagerTest.m; sourceTree = ""; }; 4B85653514E46D6800C6FF5B /* DocumentWindowControllerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocumentWindowControllerTest.m; sourceTree = ""; }; - 4B85653514E46D6800C6FF5D /* OCMockito.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OCMockito.framework; path = /Library/Frameworks/OCMockito.framework; sourceTree = ""; }; 4B85653514E46D6800C6FF5F /* QMTextDrawer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMTextDrawer.m; sourceTree = ""; }; 4B85653514E46D6800C6FF62 /* QMTextDrawer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMTextDrawer.h; sourceTree = ""; }; - 4B85653514E46D6800C6FF65 /* CellTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CellTest.m; sourceTree = ""; }; + 4B85653514E46D6800C6FF65 /* QMCellTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMCellTest.m; sourceTree = ""; }; 4B85653514E46D6800C6FF68 /* QMCellLayoutManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMCellLayoutManager.m; sourceTree = ""; }; 4B85653514E46D6800C6FF6B /* QMCellLayoutManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMCellLayoutManager.h; sourceTree = ""; }; 4B85653514E46D6800C6FF78 /* CellLayoutManagerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CellLayoutManagerTest.m; sourceTree = ""; }; @@ -460,7 +472,8 @@ 4B992F071735176D00C5844E /* QmindLook-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "QmindLook-Prefix.pch"; sourceTree = ""; }; 4B992F1A173545CD00C5844E /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = Frameworks/Sparkle.framework; sourceTree = ""; }; 4B9DE3331569367500AAF5C1 /* QmindIcon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = QmindIcon.icns; path = Resources/QmindIcon.icns; sourceTree = ""; }; - 4BCA0464158CB94B0034CB4A /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = /Applications/Xcode.app/Contents/Developer/Library/Frameworks/SenTestingKit.framework; sourceTree = ""; }; + 4BBFA3CC1880278700DAE6B8 /* OCHamcrest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OCHamcrest.framework; path = Frameworks/OCHamcrest.framework; sourceTree = ""; }; + 4BBFA3CD1880278700DAE6B8 /* OCMockito.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OCMockito.framework; path = Frameworks/OCMockito.framework; sourceTree = ""; }; 4BDA7812170F80F5000AB84A /* sparkle-pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "sparkle-pub.pem"; path = "Resources/sparkle-pub.pem"; sourceTree = ""; }; 4BDC9D8F1524EEAD008CEB8E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 4BE684AA16922E9000789892 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/IconCollectionViewItem.xib; sourceTree = ""; }; @@ -470,7 +483,7 @@ 4BE684B616922F6D00789892 /* QMIconGridView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMIconGridView.m; sourceTree = ""; }; 4BFCD74D14F3D33600850924 /* QMAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QMAppDelegate.h; path = Qmind/QMAppDelegate.h; sourceTree = ""; }; 4BFCD74E14F3D33600850924 /* QMAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QMAppDelegate.m; path = Qmind/QMAppDelegate.m; sourceTree = ""; }; - 4BFCD75614F3D34700850924 /* QmindSenTesting.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QmindSenTesting.octest; sourceTree = BUILT_PRODUCTS_DIR; }; + 4BFCD75614F3D34700850924 /* QmindSenTesting.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QmindSenTesting.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 4BFCD7AC14F3E32A00850925 /* QMCellDrawer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QMCellDrawer.m; sourceTree = ""; }; 4BFCD7AC14F3E32A00850929 /* QMCellDrawer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QMCellDrawer.h; sourceTree = ""; }; 4BFCD7AC14F3E32A0085092D /* cell-layout-test.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "cell-layout-test.mm"; sourceTree = ""; }; @@ -542,12 +555,12 @@ buildActionMask = 2147483647; files = ( 4B15777516A2F0000048480E /* Qkit.framework in Frameworks */, + 4BBFA3CF1880278700DAE6B8 /* OCMockito.framework in Frameworks */, 4B15777416A2EFFE0048480E /* QTestKit.framework in Frameworks */, 4B03B2511628726500E5ECA2 /* TBCacao.framework in Frameworks */, 4BFCD75814F3D34700850924 /* Cocoa.framework in Frameworks */, - 4BCA0466158CB94B0034CB4A /* SenTestingKit.framework in Frameworks */, - 4BFCD76E14F3D53300850924 /* OCMockito.framework in Frameworks */, - 4BFCD76F14F3D53300850924 /* OCHamcrest.framework in Frameworks */, + 1929B0840D140F224C35878C /* XCTest.framework in Frameworks */, + 4BBFA3CE1880278700DAE6B8 /* OCHamcrest.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -558,7 +571,7 @@ isa = PBXGroup; children = ( 4B03B2481628724000E5ECA2 /* TBCacao.framework */, - 4B03B24A1628724000E5ECA2 /* TBCacaoTests.octest */, + 4B03B24A1628724000E5ECA2 /* TBCacaoTests.xctest */, ); name = Products; sourceTree = ""; @@ -588,15 +601,15 @@ 4B39307C14EC41A400A9D541 /* Resources */ = { isa = PBXGroup; children = ( - 4BDA7812170F80F5000AB84A /* sparkle-pub.pem */, - 4B9DE3331569367500AAF5C1 /* QmindIcon.icns */, - 4BDC9D8E1524EEAD008CEB8E /* Localizable.strings */, + 4B521D9B17A54EB600153278 /* fontawesome-webfont.ttf */, + 4B8564DA14E461DC00C6FF0A /* Document.xib */, + 4BE684A916922E9000789892 /* IconCollectionViewItem.xib */, 4BFCD7AC14F3E32A00850938 /* IconsFreeMindToQmind.plist */, 4B39307F14EC41C400A9D541 /* Images */, - 4B8564DA14E461DC00C6FF0A /* Document.xib */, + 4BDC9D8E1524EEAD008CEB8E /* Localizable.strings */, 4B8564DD14E461DC00C6FF0A /* MainMenu.xib */, - 4BE684A916922E9000789892 /* IconCollectionViewItem.xib */, - 1929B797593F08F349F11820 /* fontawesome-webfont.ttf */, + 4B9DE3331569367500AAF5C1 /* QmindIcon.icns */, + 4BDA7812170F80F5000AB84A /* sparkle-pub.pem */, ); name = Resources; sourceTree = ""; @@ -631,6 +644,8 @@ 4B85653514E46D6800C6FF39 /* QMMindmapViewDataSource.h */, 4B39307814EC418900A9D541 /* QMMindmapView.h */, 4B39307914EC418900A9D541 /* QMMindmapView.m */, + 1929B5877760CCBAFC69427F /* QMBorderedView.m */, + 1929B302EBBFF24DFC769829 /* QMBorderedView.h */, ); name = View; sourceTree = ""; @@ -652,7 +667,7 @@ isa = PBXGroup; children = ( 4B8564C114E461DC00C6FF0A /* Qmind.app */, - 4BFCD75614F3D34700850924 /* QmindSenTesting.octest */, + 4BFCD75614F3D34700850924 /* QmindSenTesting.xctest */, 4B992EF21735176D00C5844E /* QmindLook.qlgenerator */, ); name = Products; @@ -661,30 +676,19 @@ 4B8564C414E461DC00C6FF0A /* Frameworks */ = { isa = PBXGroup; children = ( + 4BBFA3CC1880278700DAE6B8 /* OCHamcrest.framework */, + 4BBFA3CD1880278700DAE6B8 /* OCMockito.framework */, 4B992F1A173545CD00C5844E /* Sparkle.framework */, - 4BCA0464158CB94B0034CB4A /* SenTestingKit.framework */, - 4B85653514E46D6800C6FF5D /* OCMockito.framework */, - 4B85653514E46D6800C6FF1D /* OCHamcrest.framework */, 4B8564C514E461DC00C6FF0A /* Cocoa.framework */, 4B992EF31735176D00C5844E /* QuickLook.framework */, 4B992EF51735176D00C5844E /* ApplicationServices.framework */, 4B992EF71735176D00C5844E /* CoreServices.framework */, 4B992EF91735176D00C5844E /* CoreFoundation.framework */, - 4B8564C714E461DC00C6FF0A /* Other Frameworks */, + 1929BF92908230239CB415EA /* XCTest.framework */, ); name = Frameworks; sourceTree = ""; }; - 4B8564C714E461DC00C6FF0A /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 4B8564C814E461DC00C6FF0A /* AppKit.framework */, - 4B8564C914E461DC00C6FF0A /* CoreData.framework */, - 4B8564CA14E461DC00C6FF0A /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; 4B8564CB14E461DC00C6FF0A /* Qmind */ = { isa = PBXGroup; children = ( @@ -754,7 +758,7 @@ isa = PBXGroup; children = ( 4BFCD7AC14F3E32A00850958 /* RootNodeTest.m */, - 4B85651514E468C100C6FF1A /* NodeTest.m */, + 4B85651514E468C100C6FF1A /* QMNodeTest.m */, 1929B06F15A6BFDDAEF39EE7 /* QMIdGeneratorTest.m */, ); name = Models; @@ -870,10 +874,10 @@ 4BFCD7AC14F3E32A00850960 /* RootCellTest.m */, 4BFCD7AC14F3E32A0085094F /* QMMindmapViewComponentTest.m */, 4B85653514E46D6800C6FF78 /* CellLayoutManagerTest.m */, - 4B85653514E46D6800C6FF65 /* CellTest.m */, + 4B85653514E46D6800C6FF65 /* QMCellTest.m */, 4B85653514E46D6800C6FF4A /* TextLayoutManagerTest.m */, - 1929B209E6C81B9C03DE0505 /* CellSizeManagerTest.m */, - 1929BC2901D96DABE95AE4BB /* IconTest.m */, + 1929B209E6C81B9C03DE0505 /* QMCellSizeManagerTest.m */, + 1929BC2901D96DABE95AE4BB /* QMIconTest.m */, 1929B7664B7E4A08B9E7118B /* CellComponentTest.m */, 1929B83740C95CACCC412474 /* IconGridViewTest.m */, 1929B743A0D8FAB8C620E299 /* IconCollectionViewItemTest.m */, @@ -1023,6 +1027,7 @@ 4BFCD75314F3D34700850924 /* Resources */, 4B5CB44115E0E88300E05BD7 /* CopyFiles */, 4BFCD75414F3D34700850924 /* ShellScript */, + 4BBFA3D0188027A800DAE6B8 /* CopyFiles */, ); buildRules = ( ); @@ -1033,8 +1038,8 @@ ); name = QmindSenTesting; productName = QmindTesting; - productReference = 4BFCD75614F3D34700850924 /* QmindSenTesting.octest */; - productType = "com.apple.product-type.bundle"; + productReference = 4BFCD75614F3D34700850924 /* QmindSenTesting.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ @@ -1042,7 +1047,7 @@ 4B8564B814E461DC00C6FF0A /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0460; + LastUpgradeCheck = 0500; }; buildConfigurationList = 4B8564BB14E461DC00C6FF0A /* Build configuration list for PBXProject "Qmind" */; compatibilityVersion = "Xcode 3.2"; @@ -1081,10 +1086,10 @@ remoteRef = 4B03B2471628724000E5ECA2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 4B03B24A1628724000E5ECA2 /* TBCacaoTests.octest */ = { + 4B03B24A1628724000E5ECA2 /* TBCacaoTests.xctest */ = { isa = PBXReferenceProxy; fileType = wrapper.cfbundle; - path = TBCacaoTests.octest; + path = TBCacaoTests.xctest; remoteRef = 4B03B2491628724000E5ECA2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1137,7 +1142,7 @@ 1929BCAC65EC1249AD11F2C3 /* ToolbarZoomActualSizeTemplate@2x.png in Resources */, 1929B344520B8E78047CA7B2 /* ToolbarZoomInTemplate@2x.png in Resources */, 1929B3DBFDDCED6A832EBA6B /* ToolbarZoomOutTemplate@2x.png in Resources */, - 1929BCFE3C344BEBB39D5A5B /* fontawesome-webfont.ttf in Resources */, + 4B521D9C17A54EB600153278 /* fontawesome-webfont.ttf in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1148,7 +1153,6 @@ 4BF11362173836DF0029C032 /* dummy.pdf in Resources */, 4BD8C1291736F43200DC4B6F /* IconsFreeMindToQmind.plist in Resources */, 4B992F001735176D00C5844E /* InfoPlist.strings in Resources */, - 1929BDFA98377A72564FBF0A /* fontawesome-webfont.ttf in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1157,9 +1161,9 @@ buildActionMask = 2147483647; files = ( 4B396DD614F7E446000C7B36 /* dummy.pdf in Resources */, + 4BA3F92817F8265C00EB5A81 /* fontawesome-webfont.ttf in Resources */, 4BFCD7AC14F3E32A0085093B /* IconsFreeMindToQmind.plist in Resources */, 4BDC9D921524EEAD008CEB8E /* Localizable.strings in Resources */, - 1929BC2EF2C7437963725958 /* fontawesome-webfont.ttf in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1228,6 +1232,7 @@ 1929BB6FEB32F64962B24562 /* QMManualBeanProvider.m in Sources */, 1929B32033377AB1DF3E6675 /* QMCellPropertiesManager.m in Sources */, 1929B5884D28A022A0F52F48 /* QMIdGenerator.m in Sources */, + 1929B4013A5FFD5A6E6DF6F9 /* QMBorderedView.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1267,10 +1272,11 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 4B551D8B1882A448007A16D6 /* QMBorderedView.m in Sources */, 4B6BC4B516AF303B00F24572 /* QMManualBeanProvider.m in Sources */, 4B1752D416A48B01002FAFC4 /* MindmapReaderTest.m in Sources */, - 4B12E236168CC34900D972BE /* IconTest.m in Sources */, - 4B9D981016878B0F00222D03 /* CellSizeManagerTest.m in Sources */, + 4B12E236168CC34900D972BE /* QMIconTest.m in Sources */, + 4B9D981016878B0F00222D03 /* QMCellSizeManagerTest.m in Sources */, 4B5CB65C15E11C9600E05BD7 /* MindmapViewDraggingTest.m in Sources */, 4B5CB65D15E11C9600E05BD7 /* CellEditorTest.m in Sources */, 4B5CB65E15E11C9600E05BD7 /* MindmapViewTest.m in Sources */, @@ -1280,11 +1286,11 @@ 4B5CB66215E11C9600E05BD7 /* RootCellTest.m in Sources */, 4B5CB66315E11C9600E05BD7 /* QMMindmapViewComponentTest.m in Sources */, 4B5CB66515E11C9600E05BD7 /* CellLayoutManagerTest.m in Sources */, - 4B5CB66615E11C9600E05BD7 /* CellTest.m in Sources */, + 4B5CB66615E11C9600E05BD7 /* QMCellTest.m in Sources */, 4B5CB66715E11C9600E05BD7 /* TextLayoutManagerTest.m in Sources */, 4B5CB65A15E11C2F00E05BD7 /* DummyObserver.m in Sources */, 4B5CB65815E11C1000E05BD7 /* RootNodeTest.m in Sources */, - 4B5CB65915E11C1000E05BD7 /* NodeTest.m in Sources */, + 4B5CB65915E11C1000E05BD7 /* QMNodeTest.m in Sources */, 4B5CB65715E11B6B00E05BD7 /* MindmapWriterTest.m in Sources */, 4B5CB65615E11B6200E05BD7 /* DocumentTest.m in Sources */, 4B5CB65215E11B3D00E05BD7 /* QMFontManagerTest.m in Sources */, @@ -1449,9 +1455,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -1469,7 +1476,9 @@ GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.8; ONLY_ACTIVE_ARCH = YES; @@ -1481,9 +1490,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -1495,7 +1505,9 @@ GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.8; VALID_ARCHS = x86_64; @@ -1589,16 +1601,16 @@ buildSettings = { COMBINE_HIDPI_IMAGES = YES; FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_LIBRARY_DIR)/Frameworks", + "$(DEVELOPER_FRAMEWORKS_DIR)", /Library/Frameworks, + "$(LOCAL_LIBRARY_DIR)/Frameworks", + /Users/hat/Projects/qmind/Frameworks, ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = ""; INFOPLIST_FILE = "QmindTest/QmindTest-Info.plist"; PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_AFTER_BUILD = NO; USER_HEADER_SEARCH_PATHS = "\"${PROJECT_DIR}/qkit\"/** \"${PROJECT_DIR}/tbcacao\"/**"; - WRAPPER_EXTENSION = octest; }; name = Debug; }; @@ -1607,16 +1619,16 @@ buildSettings = { COMBINE_HIDPI_IMAGES = YES; FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_LIBRARY_DIR)/Frameworks", + "$(DEVELOPER_FRAMEWORKS_DIR)", /Library/Frameworks, + "$(LOCAL_LIBRARY_DIR)/Frameworks", + /Users/hat/Projects/qmind/Frameworks, ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = ""; INFOPLIST_FILE = "QmindTest/QmindTest-Info.plist"; PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_AFTER_BUILD = NO; USER_HEADER_SEARCH_PATHS = "\"${PROJECT_DIR}/qkit\"/** \"${PROJECT_DIR}/tbcacao\"/**"; - WRAPPER_EXTENSION = octest; }; name = Release; }; diff --git a/Qmind.xcodeproj/xcshareddata/xcschemes/Qmind.xcscheme b/Qmind.xcodeproj/xcshareddata/xcschemes/Qmind.xcscheme index 73bf6f7..167e3bf 100644 --- a/Qmind.xcodeproj/xcshareddata/xcschemes/Qmind.xcscheme +++ b/Qmind.xcodeproj/xcshareddata/xcschemes/Qmind.xcscheme @@ -1,6 +1,6 @@ + + + + + + + + + + + + diff --git a/Qmind.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme b/Qmind.xcodeproj/xcshareddata/xcschemes/QmindLook.xcscheme similarity index 74% rename from Qmind.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme rename to Qmind.xcodeproj/xcshareddata/xcschemes/QmindLook.xcscheme index 4fcc2b8..0f423d5 100644 --- a/Qmind.xcodeproj/xcshareddata/xcschemes/Tests.xcscheme +++ b/Qmind.xcodeproj/xcshareddata/xcschemes/QmindLook.xcscheme @@ -1,6 +1,6 @@ @@ -28,16 +28,6 @@ shouldUseLaunchSchemeArgsEnv = "YES" buildConfiguration = "Debug"> - - - - #import "QMAppSettings.h" -NSString * const qSettingInternodeHorizontalDistance = @"InternodeHorizontalDistance"; -NSString * const qSettingInternodeVerticalDistance = @"InternodeVerticalDistance"; -NSString * const qSettingInternodeLineWidth = @"InterNodeLineWidth"; -NSString * const qSettingBezierControlPoint1 = @"BezierControlPoint1"; -NSString * const qSettingBezierControlPoint2 = @"BezierControlPoint2"; -NSString * const qSettingMaxTextNodeWidth = @"MaxTextNodeWidth"; -NSString * const qSettingMaxRootCellTextWidth = @"MaxRootCellTextWidth"; -NSString * const qSettingMindMapViewMargin = @"MindMapViewMargin"; -NSString * const qSettingNodeFocusRingMargin = @"NodeFocusRingMargin"; -NSString * const qSettingNodeFocusRingBorderRadius = @"NodeFocusRingBorderRadius"; -NSString * const qSettingBackgroundColor = @"BackgroundColor"; -NSString * const qSettingDefaultNewNodeWidth = @"DefaultNewNodeWidth"; -NSString * const qSettingDefaultFont = @"DefaultFont"; -NSString * const qSettingDefaultStringAttributeDict = @"DefaultStringAttributeDict"; -NSString * const qSettingDefaultParagraphStyle = @"DefaultParagraphStyle"; -NSString * const qSettingEditSelectedNodeChars = @"EditSelectedNodeChars"; -NSString * const qSettingNewChildNodeChars = @"AppendNewChildNodeChars"; -NSString * const qSettingNewLeftChildNodeChars = @"AppendNewLeftChildNodeChars"; -NSString * const qSettingNewSiblingNodeChars = @"AppendNewSiblingNodeChars"; -NSString * const qSettingDeleteNodeChars = @"DeleteNodeChars"; -NSString * const qSettingDeselectCell = @"DeselectCellChars"; -NSString * const qSettingInterIconDistance = @"IntericonDistance"; -NSString * const qSettingLinkIconDrawSize = @"IconDrawSize"; -NSString * const qSettingIconDrawSize = @"IconDrawSize"; -NSString * const qSettingIconFont = @"IconFont"; -NSString * const qSettingNodeEditMinWidth = @"NodeEditMinWidth"; -NSString * const qSettingNodeEditMinHeight = @"NodeEditMinHeight"; -NSString * const qSettingNodeEditMaxWidth = @"NodeEditMaxWidth"; -NSString * const qSettingNodeMinWidth = @"NodeMinWidth"; -NSString * const qSettingNodeMinHeight = @"NodeMinHeight"; -NSString * const qSettingFoldingChars = @"FoldingChars"; -NSString * const qSettingIconTextDistance = @"IconTextDistance"; - -NSString * const qSettingFoldingMarkerRadius = @"FoldingMarkerRadius"; -NSString * const qSettingFoldingMarkerLineWidth = @"FoldingMarkerLindWidth"; - -NSString * const qSettingCellHorizontalPadding = @"CellHorizontalPadding"; -NSString * const qSettingCellVerticalPadding = @"CellVerticalPadding"; + +NSString *const qSettingInternodeHorizontalDistance = @"InternodeHorizontalDistance"; +NSString *const qSettingInternodeVerticalDistance = @"InternodeVerticalDistance"; +NSString *const qSettingInternodeLineWidth = @"InterNodeLineWidth"; +NSString *const qSettingBezierControlPoint1 = @"BezierControlPoint1"; +NSString *const qSettingBezierControlPoint2 = @"BezierControlPoint2"; +NSString *const qSettingMaxTextNodeWidth = @"MaxTextNodeWidth"; +NSString *const qSettingMaxRootCellTextWidth = @"MaxRootCellTextWidth"; +NSString *const qSettingMindMapViewMargin = @"MindMapViewMargin"; +NSString *const qSettingNodeFocusRingMargin = @"NodeFocusRingMargin"; +NSString *const qSettingNodeFocusRingBorderRadius = @"NodeFocusRingBorderRadius"; +NSString *const qSettingBackgroundColor = @"BackgroundColor"; +NSString *const qSettingDefaultNewNodeWidth = @"DefaultNewNodeWidth"; +NSString *const qSettingDefaultFont = @"DefaultFont"; +NSString *const qSettingDefaultStringAttributeDict = @"DefaultStringAttributeDict"; +NSString *const qSettingDefaultParagraphStyle = @"DefaultParagraphStyle"; +NSString *const qSettingEditSelectedNodeChars = @"EditSelectedNodeChars"; +NSString *const qSettingNewChildNodeChars = @"AppendNewChildNodeChars"; +NSString *const qSettingNewLeftChildNodeChars = @"AppendNewLeftChildNodeChars"; +NSString *const qSettingNewSiblingNodeChars = @"AppendNewSiblingNodeChars"; +NSString *const qSettingDeleteNodeChars = @"DeleteNodeChars"; +NSString *const qSettingDeselectCell = @"DeselectCellChars"; +NSString *const qSettingInterIconDistance = @"IntericonDistance"; +NSString *const qSettingLinkIconDrawSize = @"LinkIconDrawSize"; +NSString *const qSettingLinkIconFont = @"LinkIconFont"; +NSString *const qSettingLinkIconHorizontalMargin = @"LinkIconHorizontalMargin"; +NSString *const qSettingIconDrawSize = @"IconDrawSize"; +NSString *const qSettingIconFont = @"IconFont"; +NSString *const qSettingNodeEditMinWidth = @"NodeEditMinWidth"; +NSString *const qSettingNodeEditMinHeight = @"NodeEditMinHeight"; +NSString *const qSettingNodeEditMaxWidth = @"NodeEditMaxWidth"; +NSString *const qSettingNodeMinWidth = @"NodeMinWidth"; +NSString *const qSettingNodeMinHeight = @"NodeMinHeight"; +NSString *const qSettingFoldingChars = @"FoldingChars"; +NSString *const qSettingIconTextDistance = @"IconTextDistance"; + +NSString *const qSettingFoldingMarkerRadius = @"FoldingMarkerRadius"; +NSString *const qSettingFoldingMarkerLineWidth = @"FoldingMarkerLindWidth"; + +NSString *const qSettingCellHorizontalPadding = @"CellHorizontalPadding"; +NSString *const qSettingCellVerticalPadding = @"CellVerticalPadding"; static const NSUInteger qEscCharacter = 27; static const NSUInteger qSpaceCharacter = 0x20; static inline NSCharacterSet *single_key_charset(NSUInteger charCode) { - return [NSCharacterSet characterSetWithRange:NSMakeRange(charCode, 1)]; + return [NSCharacterSet characterSetWithRange:NSMakeRange(charCode, 1)]; } + @interface QMAppSettings () @property NSMutableDictionary *settingsDict; @end + @implementation QMAppSettings #pragma mark Public - (id)settingForKey:(NSString *)key { - return self.settingsDict[key]; + return self.settingsDict[key]; } +- (id)objectForKeyedSubscript:(id)key { + return [self settingForKey:key]; +} + + - (CGFloat)floatForKey:(NSString *)key { - return (CGFloat) [self.settingsDict[key] floatValue]; + return (CGFloat) [self.settingsDict[key] floatValue]; } #pragma mark NSObject - (id)init { - self = [super init]; - if (self) { - [self initSettingsDict]; - } + self = [super init]; + if (self) { + [self initSettingsDict]; + } - return self; + return self; } #pragma mark Private - (void)initSettingsDict { - NSFont *defaultFont = [NSFont fontWithName:@"Helvetica" size:12.0]; - NSMutableDictionary *attrDict = [[NSMutableDictionary alloc] initWithCapacity:2]; - NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init]; + NSFont *defaultFont = [NSFont fontWithName:@"Helvetica" size:12.0]; + NSMutableDictionary *attrDict = [[NSMutableDictionary alloc] initWithCapacity:2]; + NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init]; - [style setParagraphStyle:[NSParagraphStyle defaultParagraphStyle]]; - [style setAlignment:NSLeftTextAlignment]; - [style setLineBreakMode:NSLineBreakByWordWrapping]; + NSFont *fontawesomeFont = [self fontawesomeFont]; - attrDict[NSParagraphStyleAttributeName] = style; - attrDict[NSFontAttributeName] = defaultFont; + [style setParagraphStyle:[NSParagraphStyle defaultParagraphStyle]]; + [style setAlignment:NSLeftTextAlignment]; + [style setLineBreakMode:NSLineBreakByWordWrapping]; - _settingsDict = [[NSMutableDictionary alloc] initWithDictionary:@{ - qSettingDefaultFont : defaultFont, - qSettingDefaultParagraphStyle : style, - qSettingDefaultStringAttributeDict : attrDict, - qSettingIconFont : [NSFont fontWithName:@"Apple Color Emoji" size:14], - qSettingBackgroundColor : [NSColor whiteColor], + attrDict[NSParagraphStyleAttributeName] = style; + attrDict[NSFontAttributeName] = defaultFont; - qSettingInternodeHorizontalDistance : @30, - qSettingInternodeVerticalDistance : @7.5, - qSettingInternodeLineWidth : @1, + _settingsDict = [[NSMutableDictionary alloc] initWithDictionary:@{ + qSettingDefaultFont : defaultFont, + qSettingDefaultParagraphStyle : style, + qSettingDefaultStringAttributeDict : attrDict, + qSettingIconFont : [NSFont fontWithName:@"Apple Color Emoji" size:14], + qSettingBackgroundColor : [NSColor whiteColor], - qSettingNodeEditMinWidth : @200, - qSettingNodeEditMinHeight : @9, - qSettingNodeEditMaxWidth : @640, + qSettingInternodeHorizontalDistance : @30, + qSettingInternodeVerticalDistance : @7.5, + qSettingInternodeLineWidth : @1, - qSettingNodeMinWidth : @100, - qSettingNodeMinHeight : @14, + qSettingNodeEditMinWidth : @200, + qSettingNodeEditMinHeight : @9, + qSettingNodeEditMaxWidth : @640, - qSettingFoldingMarkerRadius : @6, - qSettingFoldingMarkerLineWidth : @1, + qSettingNodeMinWidth : @100, + qSettingNodeMinHeight : @14, - qSettingMaxTextNodeWidth : @640, - qSettingMaxRootCellTextWidth : @400, + qSettingFoldingMarkerRadius : @6, + qSettingFoldingMarkerLineWidth : @1, - qSettingMindMapViewMargin : @20, + qSettingMaxTextNodeWidth : @640, + qSettingMaxRootCellTextWidth : @400, - qSettingNodeFocusRingMargin : @0, - qSettingNodeFocusRingBorderRadius : @2, + qSettingMindMapViewMargin : @20, - qSettingBezierControlPoint1 : @20, - qSettingBezierControlPoint2 : @15, + qSettingNodeFocusRingMargin : @0, + qSettingNodeFocusRingBorderRadius : @2, - qSettingDefaultNewNodeWidth : @100, + qSettingBezierControlPoint1 : @20, + qSettingBezierControlPoint2 : @15, + + qSettingDefaultNewNodeWidth : @100, + + qSettingCellHorizontalPadding : @3, + qSettingCellVerticalPadding : @3, + + qSettingIconTextDistance : @5, + qSettingInterIconDistance : @3, + qSettingIconDrawSize : @16, + + qSettingLinkIconFont : fontawesomeFont, + qSettingLinkIconDrawSize : @16, + qSettingLinkIconHorizontalMargin : @3, + + qSettingNewChildNodeChars : single_key_charset(NSTabCharacter), + qSettingNewLeftChildNodeChars : single_key_charset(NSBackTabCharacter), + qSettingEditSelectedNodeChars : single_key_charset(NSCarriageReturnCharacter), + qSettingNewSiblingNodeChars : single_key_charset(NSCarriageReturnCharacter), + qSettingDeleteNodeChars : single_key_charset(NSDeleteFunctionKey), + qSettingDeselectCell : single_key_charset(qEscCharacter), + qSettingFoldingChars : single_key_charset(qSpaceCharacter), + }]; +} - qSettingCellHorizontalPadding : @3, - qSettingCellVerticalPadding : @3, +- (NSFont *)fontawesomeFont { + NSString *fontPath = [[NSBundle bundleForClass:self.class] pathForResource:@"fontawesome-webfont" ofType:@"ttf"]; + NSData *fontData = [[NSData alloc] initWithContentsOfFile:fontPath]; - qSettingIconTextDistance : @5, - qSettingInterIconDistance : @3, - qSettingIconDrawSize : @16, + CGDataProviderRef fontDataProvider = CGDataProviderCreateWithCFData((__bridge CFDataRef) fontData); + CGFontRef cgFont = CGFontCreateWithDataProvider(fontDataProvider); + CGDataProviderRelease(fontDataProvider); - qSettingLinkIconDrawSize: @16, + // if we pass NULL for attributes, we crash when releasing the font descriptor + CTFontDescriptorRef fontDescriptor = CTFontDescriptorCreateWithAttributes((__bridge CFDictionaryRef) @{}); + CTFontRef ctFont = CTFontCreateWithGraphicsFont(cgFont, 0, NULL, fontDescriptor); + CFRelease(fontDescriptor); + CGFontRelease(cgFont); - qSettingNewChildNodeChars : single_key_charset(NSTabCharacter), - qSettingNewLeftChildNodeChars : single_key_charset(NSBackTabCharacter), - qSettingEditSelectedNodeChars : single_key_charset(NSCarriageReturnCharacter), - qSettingNewSiblingNodeChars : single_key_charset(NSCarriageReturnCharacter), - qSettingDeleteNodeChars : single_key_charset(NSDeleteFunctionKey), - qSettingDeselectCell : single_key_charset(qEscCharacter), - qSettingFoldingChars : single_key_charset(qSpaceCharacter), - }]; + NSFont *fontawesomeFont = (__bridge_transfer NSFont *) ctFont; + return fontawesomeFont; } @end diff --git a/Qmind/QMBorderedView.h b/Qmind/QMBorderedView.h new file mode 100644 index 0000000..5e97e6b --- /dev/null +++ b/Qmind/QMBorderedView.h @@ -0,0 +1,17 @@ +/** + * Tae Won Ha — @hataewon + * + * http://taewon.de + * http://qvacua.com + * + * See LICENSE + */ + +#import + + +@interface QMBorderedView : NSView + +@property CGFloat borderWidth; + +@end diff --git a/Qmind/QMBorderedView.m b/Qmind/QMBorderedView.m new file mode 100644 index 0000000..e63e207 --- /dev/null +++ b/Qmind/QMBorderedView.m @@ -0,0 +1,60 @@ +/** + * Tae Won Ha — @hataewon + * + * http://taewon.de + * http://qvacua.com + * + * See LICENSE + */ + +#import "QMBorderedView.h" +#import + + +@interface QMBorderedView () + +@property NSBezierPath *borderPath; + +@end + +@implementation QMBorderedView + +#pragma mark NSView +- (void)setFrame:(NSRect)frameRect { + self.borderPath = [NSBezierPath bezierPathWithRect:NewRectWithSize(0, 0, frameRect.size)]; + self.borderPath.lineWidth = self.borderWidth; + + [super setFrame:frameRect]; +} + +- (void)drawRect:(NSRect)dirtyRect { + [NSGraphicsContext saveGraphicsState]; + { + [[NSColor grayColor] setStroke]; + [[NSColor whiteColor] setFill]; + + [self.borderPath fill]; + [self.borderPath stroke]; + } + [NSGraphicsContext restoreGraphicsState]; + + [super drawRect:dirtyRect]; +} + +- (id)initWithFrame:(NSRect)frameRect { + self = [super initWithFrame:frameRect]; + if (self) { + _borderWidth = 1; + + _borderPath = [NSBezierPath bezierPathWithRect:frameRect]; + _borderPath.lineWidth = _borderWidth; + } + + return self; +} + +- (BOOL)isFlipped { + return YES; +} + +@end diff --git a/Qmind/QMCell.h b/Qmind/QMCell.h index f3e05ac..759d514 100644 --- a/Qmind/QMCell.h +++ b/Qmind/QMCell.h @@ -67,6 +67,11 @@ typedef enum { */ @property (weak) NSString *stringValue; +/** +* A hyperlink (http://...) or internal link (#ID_...) +*/ +@property (copy) NSURL *link; + /** * The string enriched with the font information */ diff --git a/Qmind/QMCellDrawer.h b/Qmind/QMCellDrawer.h index a448da6..bcc5e17 100644 --- a/Qmind/QMCellDrawer.h +++ b/Qmind/QMCellDrawer.h @@ -1,19 +1,21 @@ /** - * Tae Won Ha + * Tae Won Ha — @hataewon + * + * http://taewon.de * http://qvacua.com - * https://github.com/qvacua * * See LICENSE */ #import +#import + @class QMCell; @class QMAppSettings; @class QMTextLayoutManager; @class QMCellLayoutManager; @class QMTextDrawer; -@protocol TBBean; @interface QMCellDrawer : NSObject @@ -23,6 +25,6 @@ @property (weak) QMTextDrawer *textDrawer; - (void)drawCell:(QMCell *)cell rect:(NSRect)dirtyRect; +- (void)drawContentForCell:(QMCell *)cell rect:(NSRect)dirtyRect; --(void)drawContentForCell:(QMCell *)cell rect:(NSRect)dirtyRect; @end diff --git a/Qmind/QMCellDrawer.m b/Qmind/QMCellDrawer.m index 3ac6a91..47fd981 100644 --- a/Qmind/QMCellDrawer.m +++ b/Qmind/QMCellDrawer.m @@ -1,7 +1,8 @@ /** - * Tae Won Ha + * Tae Won Ha — @hataewon + * + * http://taewon.de * http://qvacua.com - * https://github.com/qvacua * * See LICENSE */ @@ -16,6 +17,7 @@ #import "QMCellLayoutManager.h" #import "QMIcon.h" + @implementation QMCellDrawer TB_AUTOWIRE(textLayoutManager) @@ -25,147 +27,147 @@ @implementation QMCellDrawer #pragma mark Public - (void)drawContentForCell:(QMCell *)cell rect:(NSRect)dirtyRect { - if ([cell isRoot]) { - [self drawRootEllipseForFrame:cell.frame]; - } + if (cell.root) { + [self drawRootEllipseForFrame:cell.frame]; + } - [_textDrawer drawAttributedString:cell.attributedString inRect:cell.textFrame range:cell.rangeOfStringValue]; - [self drawIconsForCell:cell rect:dirtyRect]; + [self.textDrawer drawAttributedString:cell.attributedString inRect:cell.textFrame range:cell.rangeOfStringValue]; + [self drawIconsForCell:cell rect:dirtyRect]; } - (void)drawCell:(QMCell *)cell rect:(NSRect)dirtyRect { - [self drawLineForCell:cell dirtyRect:dirtyRect]; + [self drawLineForCell:cell dirtyRect:dirtyRect]; - [self drawRegionForCell:cell]; + [self drawRegionForCell:cell]; - if (!NSIntersectsRect(dirtyRect, cell.frame)) { - return; - } + if (!NSIntersectsRect(dirtyRect, cell.frame)) { + return; + } - [self drawContentForCell:cell rect:dirtyRect]; + [self drawContentForCell:cell rect:dirtyRect]; - if ([cell.view cellIsCurrentlyEdited:cell]) { - return; - } + if ([cell.view cellIsCurrentlyEdited:cell]) { + return; + } - [self drawMetaInfoForCell:cell]; + [self drawMetaInfoForCell:cell]; } #pragma mark Private - (void)drawRegionForCell:(QMCell *)cell { - if (cell.dragRegion == QMCellRegionNone) { - return; - } + if (cell.dragRegion == QMCellRegionNone) { + return; + } - // TODO: beautify - [[NSColor grayColor] set]; - NSRectFill([_cellLayoutManager regionFrameOfCell:cell ofRegion:cell.dragRegion]); + // TODO: beautify + [[NSColor grayColor] set]; + NSRectFill([self.cellLayoutManager regionFrameOfCell:cell ofRegion:cell.dragRegion]); } - (void)drawFoldingMarkerOfCell:(QMCell *)cell { - if ([cell isLeaf]) { - return; - } - - NSPoint origin = cell.origin; - NSSize size = cell.size; - - CGFloat foldingMarkerRadius = [_settings floatForKey:qSettingFoldingMarkerRadius]; - NSBezierPath *path; - - if (cell.isLeft) { - path = [NSBezierPath bezierPathWithOvalInRect:NewRect( - origin.x - foldingMarkerRadius / 2, - origin.y + size.height - foldingMarkerRadius / 2, - foldingMarkerRadius, - foldingMarkerRadius - )]; - } else { - path = [NSBezierPath bezierPathWithOvalInRect:NewRect( - origin.x + size.width - foldingMarkerRadius / 2, - origin.y + size.height - foldingMarkerRadius / 2, - foldingMarkerRadius, - foldingMarkerRadius - )]; - } - - [[NSColor grayColor] set]; - [path setFlatness:1.0]; - [path setLineWidth:[_settings floatForKey:qSettingFoldingMarkerLineWidth]]; - - [path stroke]; + if (cell.leaf) { + return; + } + + NSPoint origin = cell.origin; + NSSize size = cell.size; + + CGFloat foldingMarkerRadius = [self.settings floatForKey:qSettingFoldingMarkerRadius]; + NSBezierPath *path; + + if (cell.left) { + path = [NSBezierPath bezierPathWithOvalInRect:NewRect( + origin.x - foldingMarkerRadius / 2, + origin.y + size.height - foldingMarkerRadius / 2, + foldingMarkerRadius, + foldingMarkerRadius + )]; + } else { + path = [NSBezierPath bezierPathWithOvalInRect:NewRect( + origin.x + size.width - foldingMarkerRadius / 2, + origin.y + size.height - foldingMarkerRadius / 2, + foldingMarkerRadius, + foldingMarkerRadius + )]; + } + + [[NSColor grayColor] set]; + path.flatness = 1.0; + path.lineWidth = [self.settings floatForKey:qSettingFoldingMarkerLineWidth]; + + [path stroke]; } - (void)drawIconsForCell:(QMCell *)cell rect:(NSRect)dirtyRect { - [cell.icons enumerateObjectsUsingBlock:^(QMIcon *icon, NSUInteger index, BOOL *stop) { - [icon drawRect:dirtyRect]; - }]; + [cell.icons enumerateObjectsUsingBlock:^(QMIcon *icon, NSUInteger index, BOOL *stop) { + [icon drawRect:dirtyRect]; + }]; } - (void)drawRootEllipseForFrame:(NSRect)frame { - NSBezierPath *ellipse = [NSBezierPath bezierPathWithOvalInRect:frame]; + NSBezierPath *ellipse = [NSBezierPath bezierPathWithOvalInRect:frame]; - [ellipse setLineWidth:1]; - [ellipse setFlatness:1]; + ellipse.lineWidth = 1; + ellipse.flatness = 1; - [[NSColor whiteColor] set]; - [ellipse fill]; + [[NSColor whiteColor] set]; + [ellipse fill]; - [[NSColor grayColor] set]; - [ellipse stroke]; + [[NSColor grayColor] set]; + [ellipse stroke]; } - (NSBezierPath *)focusRingPathForCell:(QMCell *)cell { - NSRect frame = cell.frame; + NSRect frame = cell.frame; - if (cell.isRoot) { - CGFloat focusRingMargin = [_settings floatForKey:qSettingNodeFocusRingMargin]; - NSRect outsetRect = NewRectExpanding(frame, focusRingMargin, focusRingMargin); + if (cell.root) { + CGFloat focusRingMargin = [self.settings floatForKey:qSettingNodeFocusRingMargin]; + NSRect outsetRect = NewRectExpanding(frame, focusRingMargin, focusRingMargin); - return [NSBezierPath bezierPathWithOvalInRect:outsetRect]; - } + return [NSBezierPath bezierPathWithOvalInRect:outsetRect]; + } - CGFloat focusRingMargin = [_settings floatForKey:qSettingNodeFocusRingMargin]; - CGFloat borderRadius = [_settings floatForKey:qSettingNodeFocusRingBorderRadius]; - NSRect outsetRect = NewRectExpanding(frame, focusRingMargin, focusRingMargin); + CGFloat focusRingMargin = [self.settings floatForKey:qSettingNodeFocusRingMargin]; + CGFloat borderRadius = [self.settings floatForKey:qSettingNodeFocusRingBorderRadius]; + NSRect outsetRect = NewRectExpanding(frame, focusRingMargin, focusRingMargin); - return [NSBezierPath bezierPathWithRoundedRect:outsetRect xRadius:borderRadius yRadius:borderRadius]; + return [NSBezierPath bezierPathWithRoundedRect:outsetRect xRadius:borderRadius yRadius:borderRadius]; } - (void)drawFocusRingForCell:(QMCell *)cell { - NSBezierPath *path = [self focusRingPathForCell:cell]; + NSBezierPath *path = [self focusRingPathForCell:cell]; - [NSGraphicsContext saveGraphicsState]; + [NSGraphicsContext saveGraphicsState]; - [[NSColor selectedTextBackgroundColor] set]; - NSSetFocusRingStyle(NSFocusRingOnly); - [path fill]; + [[NSColor selectedTextBackgroundColor] set]; + NSSetFocusRingStyle(NSFocusRingOnly); + [path fill]; - [NSGraphicsContext restoreGraphicsState]; + [NSGraphicsContext restoreGraphicsState]; } - (void)drawMetaInfoForCell:(QMCell *)cell { - if (cell.isFolded) { - [self drawFoldingMarkerOfCell:cell]; - } + if (cell.folded) { + [self drawFoldingMarkerOfCell:cell]; + } - if ([cell.view cellIsSelected:cell]) { - [self drawFocusRingForCell:cell]; - } + if ([cell.view cellIsSelected:cell]) { + [self drawFocusRingForCell:cell]; + } } - (void)drawLineForCell:(QMCell *)cell dirtyRect:(NSRect)dirtyRect { - if (cell.line == nil) { - return; - } + if (cell.line == nil) { + return; + } - // if we only have a horizontal line, then the bounds has got 0 height. thus, no intersection. - NSRect lineRect = NewRectExpanding(cell.line.bounds, 1, 1); + // if we only have a horizontal line, then the bounds has got 0 height. thus, no intersection. + NSRect lineRect = NewRectExpanding(cell.line.bounds, 1, 1); - if (NSIntersectsRect(dirtyRect, lineRect)) { - [[NSColor grayColor] set]; - [cell.line stroke]; - } + if (NSIntersectsRect(dirtyRect, lineRect)) { + [[NSColor grayColor] set]; + [cell.line stroke]; + } } @end diff --git a/Qmind/QMCellEditor.h b/Qmind/QMCellEditor.h index a51c98e..d69e774 100644 --- a/Qmind/QMCellEditor.h +++ b/Qmind/QMCellEditor.h @@ -1,7 +1,8 @@ /** - * Tae Won Ha + * Tae Won Ha — @hataewon + * + * http://taewon.de * http://qvacua.com - * https://github.com/qvacua * * See LICENSE */ @@ -12,17 +13,20 @@ @class QMCell; @class QMAppSettings; @protocol QMCellEditorDelegate; +@class QMBorderedView; -@interface QMCellEditor : NSObject +@interface QMCellEditor : NSObject @property (weak) QMAppSettings *settings; -@property (weak) QMMindmapView *view; @property (weak) id delegate; @property (readonly, weak) QMCell *currentlyEditedCell; +@property (readonly, getter=isEditing) BOOL editing; + +@property (weak) QMMindmapView *view; +@property (readonly) QMBorderedView *editorView; - (void)beginEditStringValueForCell:(QMCell *)cellToEdit; -- (BOOL)isEditing; - (void)endEditing; @end diff --git a/Qmind/QMCellEditor.m b/Qmind/QMCellEditor.m index 560bb12..154bb5d 100644 --- a/Qmind/QMCellEditor.m +++ b/Qmind/QMCellEditor.m @@ -1,227 +1,183 @@ /** - * Tae Won Ha + * Tae Won Ha — @hataewon + * + * http://taewon.de * http://qvacua.com - * https://github.com/qvacua * * See LICENSE */ +#import #import "QMCellEditor.h" #import "QMMindmapView.h" #import "QMCell.h" -#import #import "QMAppSettings.h" +#import "QMBorderedView.h" -/** -* FIXME: The following is an evil hack! See -* http://weblog.hataewon.com/2013/02/adding-child-view-to-zoomed-parent-view.html -* -* This hack fixes the issue #7, but it's awful. -*/ -@interface QShadowedView (Bug) @end -@implementation QShadowedView (Bug) +static NSInteger const qEscUnicode = 27; -- (void)setFrame:(NSRect)frameRect { - log4Debug(@"current rect: %@\tfuture rect: %@", [NSValue valueWithRect:[self frame]], [NSValue valueWithRect:frameRect]); -} +static const int qEditBoxBorderWidth = 1; -@end +static inline unichar current_event_char() { + return [[[NSApp currentEvent] characters] characterAtIndex:0]; +} -static NSInteger const qEscUnicode = 27; +@interface QMCellEditor () -@implementation QMCellEditor { - __weak QMMindmapView *_view; - __weak id _delegate; - __weak QMCell *_currentlyEditedCell; +@property (readwrite, weak) QMCell *currentlyEditedCell; +@property BOOL editingCanceled; +@property (readonly) NSTextField *textField; - BOOL _editingCanceled; +@end - NSUndoManager *_undoManager; - NSLayoutManager *_layoutManager; - NSTextStorage *_textStorage; - NSTextContainer *_textContainer; - NSTextView *_textView; - NSScrollView *_scrollView; - QShadowedView *_containerView; -} +@implementation QMCellEditor TB_MANUALWIRE(settings) -@synthesize view = _view; -@synthesize delegate = _delegate; -@synthesize currentlyEditedCell = _currentlyEditedCell; - +#pragma mark Public - (BOOL)isEditing { - return _currentlyEditedCell != nil; + return self.currentlyEditedCell != nil; } -- (NSSize)textViewSizeForCell:(QMCell *)cell { - const NSSize textSize = cell.textSize; +- (void)endEditing { + [self.view.window makeFirstResponder:self.view]; +} - CGFloat defaultCellWidth = [_settings floatForKey:qSettingNodeEditMinWidth]; - CGFloat widthForTextView = MAX(defaultCellWidth, textSize.width); - CGFloat maxWidth = [_settings floatForKey:qSettingNodeEditMaxWidth]; - widthForTextView = MIN(maxWidth, widthForTextView); +- (NSSize)textFieldSizeForCell:(QMCell *)cell { + const NSSize textSize = cell.textSize; - /** - * when the default font size is 14, the text view size was ok, however, now with 12, it's too small, thus + 2 - */ - CGFloat heightForTextView = textSize.height + 2; + CGFloat defaultCellWidth = [self.settings floatForKey:qSettingNodeEditMinWidth]; + CGFloat widthForTextView = MAX(defaultCellWidth, textSize.width); + CGFloat maxWidth = [self.settings floatForKey:qSettingNodeEditMaxWidth]; + widthForTextView = MIN(maxWidth, widthForTextView); - if ([cell.stringValue length] == 0) { - NSFont *font = [_settings settingForKey:qSettingDefaultFont]; - if (cell.font != nil) { - font = cell.font; - } + /** + * when the default font size is 14, the text view size was ok, however, now with 12, it's too small, thus + 2 + */ + CGFloat heightForTextView = textSize.height + 2; - heightForTextView += [font pointSize]; + if (cell.stringValue.length == 0) { + NSFont *font = self.settings[qSettingDefaultFont]; + if (cell.font != nil) { + font = cell.font; } - return NewSize(widthForTextView, heightForTextView); + heightForTextView += font.pointSize; + } + + return NewSize(widthForTextView, heightForTextView); } - (void)beginEditStringValueForCell:(QMCell *)cellToEdit { - _currentlyEditedCell = cellToEdit; + self.currentlyEditedCell = cellToEdit; - [_textStorage setAttributedString:cellToEdit.attributedString]; + NSString *str = cellToEdit.stringValue; + self.textField.stringValue = str; - if (_textStorage.length == 0) { - NSFont *font = [_settings settingForKey:qSettingDefaultFont]; + NSFont *font = self.settings[qSettingDefaultFont]; + if (cellToEdit.font != nil) { + font = cellToEdit.font; + } - if (cellToEdit.font != nil) { - font = cellToEdit.font; - } + self.textField.font = font; - [_textView setFont:font]; - } + NSPoint textOrigin = cellToEdit.textOrigin; + NSSize textFieldSize = [self textFieldSizeForCell:cellToEdit]; + NSPoint containerOrigin = NewPoint( + textOrigin.x - qEditBoxBorderWidth - 2, + textOrigin.y - qEditBoxBorderWidth - 1 + ); // using heuristic such that the text in the text field is at the same position as the node text + NSSize containerSize = NewSize(textFieldSize.width + qEditBoxBorderWidth, textFieldSize.height + qEditBoxBorderWidth); - NSSize textViewSize = [self textViewSizeForCell:cellToEdit]; - NSSize scrollViewSize = [NSScrollView frameSizeForContentSize:textViewSize hasHorizontalScroller:NO hasVerticalScroller:NO borderType:NSNoBorder]; + [self.editorView setFrame:NewRectWithOriginAndSize(containerOrigin, containerSize)]; - [_scrollView setFrame:NewRectWithSize(0, 0, scrollViewSize)]; + self.editorView.hidden = NO; + [self.view scrollRectToVisible:self.editorView.frame]; + [self.view.window makeFirstResponder:self.textField]; - NSPoint textOrigin = cellToEdit.textOrigin; - NSPoint containerOrigin = NewPoint(textOrigin.x - CONTAINER_BORDER_WIDTH, textOrigin.y - CONTAINER_BORDER_WIDTH); + [self.view setNeedsDisplay:YES]; +} - [_containerView setFrameOrigin:containerOrigin]; - [_containerView addOnlySubview:_scrollView]; +#pragma mark NSControlSubclassNotifications +- (void)controlTextDidEndEditing:(NSNotification *)notification { + NSAttributedString *attrString = [[NSAttributedString alloc] initWithAttributedString:self.textField.attributedStringValue]; - [_view addSubview:_containerView]; - [_view scrollRectToVisible:_containerView.frame]; - [_view.window makeFirstResponder:_textView]; + if (self.editingCanceled) { - [_view setNeedsDisplay:YES]; -} + [self.delegate editingCancelledWithString:attrString forCell:self.currentlyEditedCell]; -- (void)textDidEndEditing:(NSNotification *)notification { - NSAttributedString *const attrString = [[NSAttributedString alloc] initWithAttributedString:_textStorage]; + } else { - if (_editingCanceled) { - [_delegate editingCancelledWithString:attrString forCell:_currentlyEditedCell]; + unichar character; + NSEventType eventType = [[NSApp currentEvent] type]; + if (eventType == NSKeyDown || eventType == NSKeyUp) { + character = current_event_char(); } else { - NSEventType eventType = [[NSApp currentEvent] type]; - - unichar character; - if (eventType == NSKeyDown || eventType == NSKeyUp) { - character = [[[NSApp currentEvent] characters] characterAtIndex:0]; - } else { - character = NSCarriageReturnCharacter; - } - - [_delegate editingEndedWithString:attrString forCell:_currentlyEditedCell byChar:character]; + character = NSCarriageReturnCharacter; } - _editingCanceled = NO; - _currentlyEditedCell = nil; + [self.delegate editingEndedWithString:attrString forCell:self.currentlyEditedCell byChar:character]; - [_containerView removeFromSuperview]; - [_scrollView removeFromSuperview]; + } - [_undoManager removeAllActions]; + self.editingCanceled = NO; + self.currentlyEditedCell = nil; + self.editorView.hidden = YES; - [_view.window makeFirstResponder:_view]; - [_view setNeedsDisplay:YES]; + [self.view.window makeFirstResponder:self.view]; + [self.view setNeedsDisplay:YES]; } -- (NSArray *)textView:(NSTextView *)textView - completions:(NSArray *)words - forPartialWordRange:(NSRange)charRange - indexOfSelectedItem:(NSInteger *)index { - - unichar character = [[[NSApp currentEvent] characters] characterAtIndex:0]; - - if (character == qEscUnicode) { - _editingCanceled = YES; - [_view.window makeFirstResponder:_view]; - - return nil; - } +#pragma mark NSControlTextEditingDelegate +- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector { + if (commandSelector == @selector(insertNewline:)) { + log4Debug(@"insertNewLine:"); + } - return words; + return NO; } -- (BOOL)textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector { - if (commandSelector == @selector(insertNewline:)) { - log4Debug(@"insertNewLine:"); - } +- (NSArray *)control:(NSControl *)control + textView:(NSTextView *)textView + completions:(NSArray *)words + forPartialWordRange:(NSRange)charRange + indexOfSelectedItem:(NSInteger *)index { - return NO; -} + if (current_event_char() == qEscUnicode) { + self.editingCanceled = YES; + [self.view.window makeFirstResponder:self.view]; + + return nil; + } -- (NSUndoManager *)undoManagerForTextView:(NSTextView *)view { - return _undoManager; + return words; } +#pragma mark NSObject - (id)init { - self = [super init]; - if (self) { - [[TBContext sharedContext] autowireSeed:self]; - - _editingCanceled = NO; - - _undoManager = [[NSUndoManager alloc] init]; - - _layoutManager = [[NSLayoutManager alloc] init]; - _textStorage = [[NSTextStorage alloc] init]; - _textContainer = [[NSTextContainer alloc] init]; - - [_textContainer setLineFragmentPadding:0.0]; - [_textContainer setWidthTracksTextView:YES]; - [_textContainer setContainerSize:NewSize(0, MAX_CGFLOAT)]; - [_textStorage addLayoutManager:_layoutManager]; - [_layoutManager addTextContainer:_textContainer]; - - _textView = [[NSTextView alloc] initWithFrame:NewRect(0, 0, 100, 24) textContainer:_textContainer]; - _scrollView = [[NSScrollView alloc] initWithFrame:NewRect(0, 0, 150, 40)]; - _containerView = [[QShadowedView alloc] initWithFrame:NewRect(0, 0, 200, 100)]; - - [_textView setDelegate:self]; - [_textView setAllowsUndo:YES]; - [_textView setEditable:YES]; - [_textView setTextContainerInset:NSZeroSize]; - [_textView setVerticallyResizable:YES]; - [_textView setHorizontallyResizable:YES]; - [_textView setRichText:NO]; - [_textView setFieldEditor:YES]; - [_textView setContinuousSpellCheckingEnabled:YES]; - [_textView setAutoresizingMask:NSViewWidthSizable]; - [_textView setMaxSize:NSMakeSize(CGFLOAT_MAX, CGFLOAT_MAX)]; - - [_scrollView setDocumentView:_textView]; - [_scrollView setBorderType:NSNoBorder]; - [_scrollView setHasHorizontalScroller:NO]; - [_scrollView setHasVerticalScroller:NO]; - - [_containerView addOnlySubview:_scrollView]; - } + self = [super init]; + if (self) { + [[TBContext sharedContext] autowireSeed:self]; - return self; -} + _editingCanceled = NO; -- (void)endEditing { - [_view.window makeFirstResponder:_view]; + _textField = [[NSTextField alloc] initWithFrame:NewRect(1, 1, 20, 20)]; + _textField.delegate = self; +// _textField.allowsEditingTextAttributes = YES; + _textField.focusRingType = NSFocusRingTypeNone; + _textField.bordered = NO; + _textField.bezeled = NO; + _textField.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable; + + _editorView = [[QMBorderedView alloc] initWithFrame:NewRect(0, 0, 22, 22)]; + _editorView.borderWidth = qEditBoxBorderWidth; + _editorView.autoresizesSubviews = YES; + [_editorView addSubview:_textField]; + } + + return self; } @end diff --git a/Qmind/QMCellEditorDelegate.h b/Qmind/QMCellEditorDelegate.h index 065a559..f7968c9 100644 --- a/Qmind/QMCellEditorDelegate.h +++ b/Qmind/QMCellEditorDelegate.h @@ -1,7 +1,8 @@ /** - * Tae Won Ha + * Tae Won Ha — @hataewon + * + * http://taewon.de * http://qvacua.com - * https://github.com/qvacua * * See LICENSE */ diff --git a/Qmind/QMCellSelector.h b/Qmind/QMCellSelector.h index f0e5e34..9e95a35 100644 --- a/Qmind/QMCellSelector.h +++ b/Qmind/QMCellSelector.h @@ -7,16 +7,14 @@ */ #import +#import @class QMCell; -@protocol TBBean; @interface QMCellSelector : NSObject - (QMCell *)cellWithIdentifier:(id)identifier fromParentCell:(QMCell *)parentCell; - - (QMCell *)traverseCell:(QMCell *)parentCell usingBlock:(void (^)(QMCell *, BOOL *))block; - - (QMCell *)cellContainingPoint:(NSPoint)point inCell:(QMCell *)startingCell; @end diff --git a/Qmind/QMCellSizeManager.h b/Qmind/QMCellSizeManager.h index 53eb86c..44a701a 100644 --- a/Qmind/QMCellSizeManager.h +++ b/Qmind/QMCellSizeManager.h @@ -7,11 +7,11 @@ */ #import +#import @class QMCell; @class QMTextLayoutManager; @class QMAppSettings; -@protocol TBBean; @interface QMCellSizeManager : NSObject @@ -35,5 +35,6 @@ - (NSSize)sizeOfChildrenFamily:(NSArray *)children; --(NSSize)sizeOfFamilyOfCell:(QMCell *)cell; +- (NSSize)sizeOfFamilyOfCell:(QMCell *)cell; + @end diff --git a/Qmind/QMCellSizeManager.m b/Qmind/QMCellSizeManager.m index bdf5b53..71b0f2b 100644 --- a/Qmind/QMCellSizeManager.m +++ b/Qmind/QMCellSizeManager.m @@ -14,6 +14,7 @@ #import "QMAppSettings.h" #import "QMRootCell.h" + @implementation QMCellSizeManager TB_AUTOWIRE(textLayoutManager) @@ -36,6 +37,12 @@ - (NSSize)sizeOfCell:(QMCell *)cell { } } + if (cell.link != nil) { + CGFloat linkIconSize = [self.settings floatForKey:qSettingLinkIconDrawSize]; + result.width += linkIconSize + [self.settings floatForKey:qSettingLinkIconHorizontalMargin]; + result.height = MAX(linkIconSize, result.height); + } + if (trivialStringValue && countOfIcons == 0) { result.width = [self.settings floatForKey:qSettingNodeMinWidth]; result.height = [self.settings floatForKey:qSettingNodeMinHeight]; diff --git a/Qmind/QMFontManager.m b/Qmind/QMFontManager.m index 51284ff..92f1912 100644 --- a/Qmind/QMFontManager.m +++ b/Qmind/QMFontManager.m @@ -17,7 +17,7 @@ static NSString *const qItalicKey = @"ITALIC"; static NSString *const qTrueValue = @"true"; static NSString *const qDefaultSansSerifFontName = @"SansSerif"; -static NSString *const qDefaultSerifFondName = @"Serif"; +static NSString *const qDefaultSerifFontName = @"Serif"; static NSString *const qTimesFontName = @"Times"; @interface QMFontManager () @@ -44,7 +44,7 @@ - (NSFont *)fontFromFontAttrDict:(NSDictionary *)fontAttrDict { fontName = self.defaultFont.familyName; } - if ([fontName isEqualToString:qDefaultSerifFondName]) { + if ([fontName isEqualToString:qDefaultSerifFontName]) { fontName = qTimesFontName; } @@ -100,21 +100,8 @@ - (NSDictionary *)fontAttrDictFromFont:(NSFont *)font { #pragma mark TBInitializingBean - (void)postConstruct { _defaultFont = [self.settings settingForKey:qSettingDefaultFont]; + _fontawesomeFont = [self.settings settingForKey:qSettingLinkIconFont]; - NSString *fontPath = [[NSBundle bundleForClass:self.class] pathForResource:@"fontawesome-webfont" ofType:@"ttf"]; - NSData *fontData = [[NSData alloc] initWithContentsOfFile:fontPath]; - - CGDataProviderRef fontDataProvider = CGDataProviderCreateWithCFData((__bridge CFDataRef) fontData); - CGFontRef cgFont = CGFontCreateWithDataProvider(fontDataProvider); - CGDataProviderRelease(fontDataProvider); - - // if we pass NULL for attributes, we crash when releasing the font descriptor - CTFontDescriptorRef fontDescriptor = CTFontDescriptorCreateWithAttributes((__bridge CFDictionaryRef) @{}); - CTFontRef ctFont = CTFontCreateWithGraphicsFont(cgFont, 0, NULL, fontDescriptor); - CFRelease(fontDescriptor); - CGFontRelease(cgFont); - - _fontawesomeFont = (__bridge_transfer NSFont *)ctFont; } @end diff --git a/Qmind/QMIcon.h b/Qmind/QMIcon.h index 64588a1..ae8887c 100644 --- a/Qmind/QMIcon.h +++ b/Qmind/QMIcon.h @@ -13,6 +13,7 @@ @class QMAppSettings; @class QMTextDrawer; @class QMTextLayoutManager; +@class QMFontManager; @interface QMIcon : NSObject @@ -20,6 +21,8 @@ @property (weak) QMAppSettings *settings; @property (weak) QMTextDrawer *textDrawer; @property (weak) QMTextLayoutManager *textLayoutManager; +@property (weak) QMFontManager *fontManager; +@property (assign) NSFontManager *systemFontManager; // it is not allowed to weakly reference to NSFontManager? @property (readonly) QMIconKind kind; @property (readonly) NSString *code; @@ -40,6 +43,7 @@ @property (readonly) NSRect frame; - (id)initWithCode:(NSString *)aCode; +- (id)initAsLink; - (void)drawRect:(NSRect)dirtyRect; @end diff --git a/Qmind/QMIcon.m b/Qmind/QMIcon.m index 86e7f9c..d193080 100644 --- a/Qmind/QMIcon.m +++ b/Qmind/QMIcon.m @@ -13,50 +13,31 @@ #import "QMAppSettings.h" #import "QMTextDrawer.h" #import "QMTextLayoutManager.h" +#import "QMFontManager.h" -@implementation QMIcon { - __weak QMIconManager *_iconManager; - __weak QMAppSettings *_settings; - __weak QMTextDrawer *_textDrawer; - __weak QMTextLayoutManager *_textLayoutManager; - QMIconKind _kind; +@interface QMIcon () + +@property NSAttributedString *attrStr; - NSPoint _origin; - NSSize _size; +@end - NSString *_code; - NSString *_unicode; - NSImage *_image; - NSImage *_flippedImage; +@implementation QMIcon { } @dynamic frame; -@synthesize iconManager = _iconManager; -@synthesize settings = _settings; -@synthesize textDrawer = _textDrawer; -@synthesize textLayoutManager = _textLayoutManager; - -@synthesize kind = _kind; -@synthesize origin = _origin; -@synthesize size = _size; -@synthesize code = _code; -@synthesize unicode = _unicode; -@synthesize image = _image; -@synthesize flippedImage = _flippedImage; - #pragma mark Public - (NSRect)frame { - return NewRectWithOriginAndSize(_origin, _size); + return NewRectWithOriginAndSize(self.origin, self.size); } #pragma mark NSCopying - (id)copyWithZone:(NSZone *)zone { - QMIcon *copy = [[QMIcon alloc] initWithCode:_code]; - copy.origin = _origin; - copy.size = _size; + QMIcon *copy = [[QMIcon alloc] initWithCode:self.code]; + copy.origin = self.origin; + copy.size = self.size; return copy; } @@ -65,18 +46,17 @@ - (id)copyWithZone:(NSZone *)zone { - (id)initWithCode:(NSString *)aCode { self = [super init]; if (self) { - TBContext *context = [TBContext sharedContext]; - - _iconManager = [context beanWithClass:[QMIconManager class]]; - _settings = [context beanWithClass:[QMAppSettings class]]; - _textDrawer = [context beanWithClass:[QMTextDrawer class]]; - _textLayoutManager = [context beanWithClass:[QMTextLayoutManager class]]; + [self initBeans]; _code = aCode; _kind = [_iconManager kindForCode:_code]; if (_kind == QMIconKindString) { _unicode = [_iconManager iconRepresentationForCode:_code]; + + NSFont *iconFont = [self.settings settingForKey:qSettingIconFont]; + NSDictionary *attrDict = [self.textLayoutManager stringAttributesDictWithFont:iconFont]; + _attrStr = [[NSAttributedString alloc] initWithString:self.unicode attributes:attrDict]; } else if (_kind == QMIconKindImage) { _image = [_iconManager iconRepresentationForCode:_code]; [self initFlippedImage]; @@ -89,32 +69,70 @@ - (id)initWithCode:(NSString *)aCode { return self; } +- (id)initAsLink { + self = [super init]; + if (self) { + [self initBeans]; + + _unicode = @"\\u%f023"; + _kind = QMIconKindFontawesome; + + NSFont *fontawesome = [[self.fontManager fontawesomeFont] copy]; + // TODO: we should set the font for links in app settings and use it here + [self.systemFontManager convertFont:fontawesome toSize:16]; + NSDictionary *attrDict = [self.textLayoutManager stringAttributesDictWithFont:fontawesome]; + _attrStr = [[NSAttributedString alloc] initWithString:self.unicode attributes:attrDict]; + + CGFloat iconSize = [_settings floatForKey:qSettingLinkIconDrawSize]; + _size = NewSize(iconSize, iconSize); + } + + return self; +} + - (void)drawRect:(NSRect)dirtyRect { NSRect frame = NewRectWithOriginAndSize(self.origin, self.size); if (!NSIntersectsRect(dirtyRect, frame)) { return; } - if (_kind == QMIconKindString) { + if (self.kind == QMIconKindString) { [self drawStringIconInRect:frame]; + return; + } + if (self.kind == QMIconKindImage) { + [self.image drawInRect:frame fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1]; return; } - if (_kind == QMIconKindImage) { - [_image drawInRect:frame fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1]; + if (self.kind == QMIconKindFontawesome) { + [self drawFontawesomeInRect:frame]; + return; } } #pragma mark Private -- (void)drawStringIconInRect:(NSRect)frame { - NSFont *iconFont = [_settings settingForKey:qSettingIconFont]; - NSDictionary *attrDict = [_textLayoutManager stringAttributesDictWithFont:iconFont]; - NSAttributedString *attrStr = [[NSAttributedString alloc] initWithString:_unicode attributes:attrDict]; +- (void)drawFontawesomeInRect:(NSRect)rect { + [self.textDrawer drawAttributedString:self.attrStr inRect:rect range:NSMakeRange(0, 1)]; +} +- (void)initBeans { + TBContext *context = [TBContext sharedContext]; + + _iconManager = [context beanWithClass:[QMIconManager class]]; + _settings = [context beanWithClass:[QMAppSettings class]]; + _textDrawer = [context beanWithClass:[QMTextDrawer class]]; + _textLayoutManager = [context beanWithClass:[QMTextLayoutManager class]]; + _fontManager = [context beanWithClass:[QMFontManager class]]; + _systemFontManager = [context beanWithClass:[NSFontManager class]]; +} + +- (void)drawStringIconInRect:(NSRect)frame { NSRect tempRect = frame; tempRect.origin.y -= 4; - [_textDrawer drawAttributedString:attrStr inRect:tempRect range:NSMakeRange(0, 1)]; + + [self.textDrawer drawAttributedString:self.attrStr inRect:tempRect range:NSMakeRange(0, 1)]; } - (void)initFlippedImage { diff --git a/Qmind/QMIdGenerator.h b/Qmind/QMIdGenerator.h index 5081cfe..9cb8ee9 100644 --- a/Qmind/QMIdGenerator.h +++ b/Qmind/QMIdGenerator.h @@ -1,14 +1,14 @@ /** - * Tae Won Ha + * Tae Won Ha — @hataewon + * + * http://taewon.de * http://qvacua.com - * https://github.com/qvacua * * See LICENSE */ #import - -@protocol TBBean; +#import @interface QMIdGenerator : NSObject diff --git a/Qmind/QMIdGenerator.m b/Qmind/QMIdGenerator.m index 8f10a2b..adb8d5f 100644 --- a/Qmind/QMIdGenerator.m +++ b/Qmind/QMIdGenerator.m @@ -1,7 +1,8 @@ /** - * Tae Won Ha + * Tae Won Ha — @hataewon + * + * http://taewon.de * http://qvacua.com - * https://github.com/qvacua * * See LICENSE */ @@ -9,22 +10,23 @@ #import #import "QMIdGenerator.h" + @implementation QMIdGenerator #pragma mark Public - (NSString *)nodeId { - return [NSString stringWithFormat:@"ID_%@", [self uuid]]; + return [@"ID_" stringByAppendingString:self.uuid]; } #pragma mark Private - (NSString *)uuid { - CFUUIDRef cfUuid = CFUUIDCreate(NULL); + CFUUIDRef cfUuid = CFUUIDCreate(NULL); - CFStringRef cfUuidStr = CFUUIDCreateString(NULL, cfUuid); - CFRelease(cfUuid); + CFStringRef cfUuidStr = CFUUIDCreateString(NULL, cfUuid); + CFRelease(cfUuid); - NSString *result = (__bridge_transfer NSString *) cfUuidStr; - return result; + NSString *result = (__bridge_transfer NSString *) cfUuidStr; + return result; } @end diff --git a/Qmind/QMMindmapReader.h b/Qmind/QMMindmapReader.h index ac355ef..ca1f6d0 100644 --- a/Qmind/QMMindmapReader.h +++ b/Qmind/QMMindmapReader.h @@ -7,11 +7,11 @@ */ #import +#import @class QMProxyNode; @class QMDocument; @class QMRootNode; -@protocol TBBean; /** * A mindmap document model which uses the Node class to internally represent the mindmap node. Reads the mindmap XML file diff --git a/Qmind/QMMindmapView.h b/Qmind/QMMindmapView.h index c0c4dc5..72ea3e8 100644 --- a/Qmind/QMMindmapView.h +++ b/Qmind/QMMindmapView.h @@ -1,7 +1,8 @@ /** - * Tae Won Ha + * Tae Won Ha — @hataewon + * + * http://taewon.de * http://qvacua.com - * https://github.com/qvacua * * See LICENSE */ @@ -29,6 +30,8 @@ static const int qDeleteAllIconsMenuItemTag = 1100; @interface QMMindmapView : NSView +@property (readonly) NSSize currentScale; + @property (weak) QMUiDrawer *uiDrawer; @property (weak) QMCellSelector *cellSelector; @property (weak) QMCellLayoutManager *cellLayoutManager; diff --git a/Qmind/QMMindmapView.m b/Qmind/QMMindmapView.m index 82f747a..936d0b4 100644 --- a/Qmind/QMMindmapView.m +++ b/Qmind/QMMindmapView.m @@ -1,7 +1,8 @@ /** - * Tae Won Ha + * Tae Won Ha — @hataewon + * + * http://taewon.de * http://qvacua.com - * https://github.com/qvacua * * See LICENSE */ @@ -21,6 +22,8 @@ #import "QMNode.h" #import "QMIcon.h" #import "QMCellPropertiesManager.h" +#import "QMBorderedView.h" + static const CGFloat qZoomScrollWheelStep = 0.25; @@ -31,20 +34,21 @@ static const NSSize qSizeOfBadgeCircle = {20., 20.}; static inline CGFloat area(NSRect rect) { - return rect.size.width * rect.size.height; + return rect.size.width * rect.size.height; } static inline BOOL sign(CGFloat x) { - return (BOOL) ((x > 0) - (x < 0)); + return (BOOL) ((x > 0) - (x < 0)); } static inline BOOL modifier_check(NSUInteger value, NSUInteger modifier) { - return (value & modifier) == modifier; + return (value & modifier) == modifier; } @interface QMMindmapView () -#pragma mark Private Instance Variables +@property (readwrite) NSSize currentScale; + @property QMCellPropertiesManager *cellPropertiesManager; @property QMCellStateManager *cellStateManager; @property QMCellEditor *cellEditor; @@ -56,292 +60,290 @@ @interface QMMindmapView () @implementation QMMindmapView -TB_MANUALWIRE(cellSelector) TB_MANUALWIRE(cellLayoutManager) TB_MANUALWIRE(settings) TB_MANUALWIRE(uiDrawer) +TB_MANUALWIRE(cellSelector) #pragma mark Public - (void)endEditing { - if ([self.cellEditor isEditing]) { - [self.cellEditor endEditing]; - } + if (self.cellEditor.editing) { + [self.cellEditor endEditing]; + } } - (NSPoint)middlePointOfVisibleRect { - NSRect visibleRect = [self visibleRect]; - CGPoint origin = visibleRect.origin; - CGSize size = visibleRect.size; + NSRect visibleRect = self.visibleRect; + CGPoint origin = visibleRect.origin; + CGSize size = visibleRect.size; - return NewPoint(origin.x + size.width / 2, origin.y + size.height / 2); + return NewPoint(origin.x + size.width / 2, origin.y + size.height / 2); } - (void)insertChild { - NSArray *const selCells = [self.cellStateManager selectedCells]; - if ([selCells count] > 1) { - return; - } + NSArray *const selCells = self.cellStateManager.selectedCells; + if (selCells.count > 1) { + return; + } - QMCell *selCell; - if (![self.cellStateManager hasSelectedCells]) { - selCell = self.rootCell; - } else { - selCell = [selCells lastObject]; - } + QMCell *selCell; + if (!self.cellStateManager.hasSelectedCells) { + selCell = self.rootCell; + } else { + selCell = selCells.lastObject; + } - if ([selCell isFolded]) { - [self toggleFoldingOfSelectedCell]; - } - [self.dataSource mindmapView:self addNewChildToItem:selCell.identifier atIndex:[selCell countOfChildren]]; + if (selCell.folded) { + [self toggleFoldingOfSelectedCell]; + } + [self.dataSource mindmapView:self addNewChildToItem:selCell.identifier atIndex:[selCell countOfChildren]]; } - (void)insertLeftChild { - NSArray *const selCells = [self.cellStateManager selectedCells]; - if ([selCells count] > 1) { - return; - } - - if (![self.cellStateManager hasSelectedCells]) { - [self.dataSource mindmapView:self addNewLeftChildToItem:self.rootCell.identifier atIndex:[self.rootCell countOfLeftChildren]]; - return; - } - - QMCell *const selCell = [selCells lastObject]; - if ([selCell isRoot]) { - [self.dataSource mindmapView:self addNewLeftChildToItem:self.rootCell.identifier atIndex:[self.rootCell countOfLeftChildren]]; - } else { - if ([selCell isFolded]) { - [self toggleFoldingOfSelectedCell]; - } - [self.dataSource mindmapView:self addNewChildToItem:selCell.identifier atIndex:[selCell countOfChildren]]; + NSArray *const selCells = self.cellStateManager.selectedCells; + if (selCells.count > 1) { + return; + } + + if (!self.cellStateManager.hasSelectedCells) { + [self.dataSource mindmapView:self addNewLeftChildToItem:self.rootCell.identifier atIndex:[self.rootCell countOfLeftChildren]]; + return; + } + + QMCell *const selCell = selCells.lastObject; + if (selCell.root) { + [self.dataSource mindmapView:self addNewLeftChildToItem:self.rootCell.identifier atIndex:[self.rootCell countOfLeftChildren]]; + } else { + if (selCell.folded) { + [self toggleFoldingOfSelectedCell]; } + [self.dataSource mindmapView:self addNewChildToItem:selCell.identifier atIndex:[selCell countOfChildren]]; + } } - (void)insertPreviousSibling { - if (![self.cellStateManager hasSelectedCells]) { - return; - } + if (![self.cellStateManager hasSelectedCells]) { + return; + } - NSArray *const selCells = [self.cellStateManager selectedCells]; - if ([selCells count] > 1) { - return; - } + NSArray *const selCells = [self.cellStateManager selectedCells]; + if ([selCells count] > 1) { + return; + } - QMCell *selCell = [selCells lastObject]; - if ([selCell isRoot]) { - return; - } + QMCell *selCell = [selCells lastObject]; + if ([selCell isRoot]) { + return; + } - [self.dataSource mindmapView:self addNewPreviousSiblingToItem:selCell.identifier]; + [self.dataSource mindmapView:self addNewPreviousSiblingToItem:selCell.identifier]; } - (void)insertNextSibling { - if (![self.cellStateManager hasSelectedCells]) { - return; - } + if (![self.cellStateManager hasSelectedCells]) { + return; + } - NSArray *const selCells = [self.cellStateManager selectedCells]; - if ([selCells count] > 1) { - return; - } + NSArray *const selCells = [self.cellStateManager selectedCells]; + if ([selCells count] > 1) { + return; + } - QMCell *selCell = [selCells lastObject]; - if ([selCell isRoot]) { - return; - } + QMCell *selCell = [selCells lastObject]; + if ([selCell isRoot]) { + return; + } - [self.dataSource mindmapView:self addNewNextSiblingToItem:selCell.identifier]; + [self.dataSource mindmapView:self addNewNextSiblingToItem:selCell.identifier]; } - (NSArray *)selectedCells { - return self.cellStateManager.selectedCells; + return self.cellStateManager.selectedCells; } - (void)clearSelection { - [self.cellStateManager clearSelection]; + [self.cellStateManager clearSelection]; } - (BOOL)rootCellSelected { - if (![self.cellStateManager hasSelectedCells]) { - return NO; - } + if (![self.cellStateManager hasSelectedCells]) { + return NO; + } - if ([[[self.cellStateManager selectedCells] lastObject] identifier] == self.rootCell.identifier) { - return YES; - } + if ([[[self.cellStateManager selectedCells] lastObject] identifier] == self.rootCell.identifier) { + return YES; + } - return NO; + return NO; } - (void)zoomToActualSize { - CGFloat currentScale = ([self convertSize:qUnitSize toView:nil]).width; - [self zoomByFactor:1. / currentScale withFixedPoint:[self middlePointOfVisibleRect]]; + CGFloat currentScale = ([self convertSize:qUnitSize toView:nil]).width; + [self zoomByFactor:1. / currentScale withFixedPoint:[self middlePointOfVisibleRect]]; } - (void)updateCanvasSize { - if (self.cellEditor.isEditing) { - [self.cellEditor endEditing]; - } + if (self.cellEditor.isEditing) { + [self.cellEditor endEditing]; + } - [self setFrameSize:[self scaledBoundsSizeWithParentSize:self.superview.frame.size]]; - [self setNeedsDisplay:YES]; + [self setFrameSize:[self scaledBoundsSizeWithParentSize:self.superview.frame.size]]; + [self setNeedsDisplay:YES]; } - (void)updateCanvasWithOldClipViewOrigin:(NSPoint)oldClipViewOrigin oldClipViewSize:(NSSize)oldClipViewSize oldCenterInView:(NSPoint)oldCenterInView { - NSPoint oldMapOrigin = [self rootCellOriginForParentSize:oldClipViewSize]; - NSSize oldDist = NewSize(oldCenterInView.x - oldClipViewOrigin.x, oldCenterInView.y - oldClipViewOrigin.y); + NSPoint oldMapOrigin = [self rootCellOriginForParentSize:oldClipViewSize]; + NSSize oldDist = NewSize(oldCenterInView.x - oldClipViewOrigin.x, oldCenterInView.y - oldClipViewOrigin.y); - [self updateCanvasSize]; + [self updateCanvasSize]; - NSClipView *clipView = self.enclosingScrollView.contentView; - NSSize newParentSize = [self convertSize:clipView.frame.size fromView:clipView]; - NSPoint newMapOrigin = [self rootCellOriginForParentSize:newParentSize]; + NSClipView *clipView = self.enclosingScrollView.contentView; + NSSize newParentSize = [self convertSize:clipView.frame.size fromView:clipView]; + NSPoint newMapOrigin = [self rootCellOriginForParentSize:newParentSize]; - NSSize deltaMapOrigin = NewSize(oldMapOrigin.x - newMapOrigin.x, oldMapOrigin.y - newMapOrigin.y); - NSPoint newScrollPt = NewPoint(oldCenterInView.x - deltaMapOrigin.width - oldDist.width, oldCenterInView.y - deltaMapOrigin.height - oldDist.height); + NSSize deltaMapOrigin = NewSize(oldMapOrigin.x - newMapOrigin.x, oldMapOrigin.y - newMapOrigin.y); + NSPoint newScrollPt = NewPoint(oldCenterInView.x - deltaMapOrigin.width - oldDist.width, oldCenterInView.y - deltaMapOrigin.height - oldDist.height); - [self scrollPoint:newScrollPt]; - [self setNeedsDisplay:YES]; + [self scrollPoint:newScrollPt]; + [self setNeedsDisplay:YES]; } - (void)zoomByFactor:(CGFloat)factor { - [self zoomByFactor:factor withFixedPoint:[self middlePointOfVisibleRect]]; + [self zoomByFactor:factor withFixedPoint:[self middlePointOfVisibleRect]]; } - (void)updateFontOfSelectedCellsToFont:(NSFont *)newFont { - if (!self.cellStateManager.hasSelectedCells) { - return; - } + if (!self.cellStateManager.hasSelectedCells) { + return; + } - for (QMCell *cell in self.cellStateManager.selectedCells) { - cell.font = newFont; - } + for (QMCell *cell in self.cellStateManager.selectedCells) { + cell.font = newFont; + } - [self updateCanvasSize]; - [self setNeedsDisplay:YES]; + [self updateCanvasSize]; + [self setNeedsDisplay:YES]; } - (void)toggleFoldingOfSelectedCell { - [self.dataSource mindmapView:self toggleFoldingForItem:[[self.cellStateManager selectedCells][0] identifier]]; + [self.dataSource mindmapView:self toggleFoldingForItem:[[self.cellStateManager selectedCells][0] identifier]]; } - (BOOL)hasSelectedCells { - return self.cellStateManager.hasSelectedCells; + return self.cellStateManager.hasSelectedCells; } - (BOOL)cellIsSelected:(QMCell *)cell { - return [self.cellStateManager cellIsSelected:cell]; + return [self.cellStateManager cellIsSelected:cell]; } - (BOOL)cellIsCurrentlyEdited:(QMCell *)cell { - return self.cellEditor.currentlyEditedCell == cell; + return self.cellEditor.currentlyEditedCell == cell; } - (void)updateCellWithIdentifier:(id)identifier { - QMCell *cellToUpdate = [self.cellSelector cellWithIdentifier:identifier fromParentCell:self.rootCell]; + QMCell *cellToUpdate = [self.cellSelector cellWithIdentifier:identifier fromParentCell:self.rootCell]; - NSString *const stringValueOfItem = [self.dataSource mindmapView:self stringValueOfItem:identifier]; - if (![cellToUpdate.stringValue isEqualToString:stringValueOfItem]) { - cellToUpdate.stringValue = stringValueOfItem; - } + NSString *const stringValueOfItem = [self.dataSource mindmapView:self stringValueOfItem:identifier]; + if (![cellToUpdate.stringValue isEqualToString:stringValueOfItem]) { + cellToUpdate.stringValue = stringValueOfItem; + } - NSFont *const fontOfItem = [self.dataSource mindmapView:self fontOfItem:identifier]; - if (![cellToUpdate.font isEqual:fontOfItem]) { - cellToUpdate.font = fontOfItem; - } + NSFont *const fontOfItem = [self.dataSource mindmapView:self fontOfItem:identifier]; + if (![cellToUpdate.font isEqual:fontOfItem]) { + cellToUpdate.font = fontOfItem; + } - NSUInteger countOfOldIcons = [cellToUpdate.icons count]; - for (int i = 0; i < countOfOldIcons; i++) { - [cellToUpdate removeObjectFromIconsAtIndex:0]; - } - [self.cellPropertiesManager fillIconsOfCell:cellToUpdate]; + NSUInteger countOfOldIcons = [cellToUpdate.icons count]; + for (int i = 0; i < countOfOldIcons; i++) { + [cellToUpdate removeObjectFromIconsAtIndex:0]; + } + [self.cellPropertiesManager fillIconsOfCell:cellToUpdate]; - [self updateCanvasSize]; - [self setNeedsDisplay:YES]; + [self updateCanvasSize]; + [self setNeedsDisplay:YES]; } - (void)updateCellFoldingWithIdentifier:(id)identifier { - QMCell *cellToUpdate = [self.cellSelector cellWithIdentifier:identifier fromParentCell:self.rootCell]; - BOOL folded = [self.dataSource mindmapView:self isItemFolded:identifier]; - [cellToUpdate setFolded:folded]; - - NSRect visibleRect = [self visibleRect]; - BOOL cellVisible = NO; - if (NSIntersectsRect(visibleRect, cellToUpdate.frame)) { - cellVisible = YES; - } - - if (cellVisible) { - NSPoint cellOrigin = cellToUpdate.origin; - NSPoint visibleOrigin = visibleRect.origin; - NSSize distFromVisibleRect = NewSize(cellOrigin.x - visibleOrigin.x, cellOrigin.y - visibleOrigin.y); + QMCell *cellToUpdate = [self.cellSelector cellWithIdentifier:identifier fromParentCell:self.rootCell]; + BOOL folded = [self.dataSource mindmapView:self isItemFolded:identifier]; + [cellToUpdate setFolded:folded]; - [self updateCanvasSize]; - QMCell *const newCell = [self.cellSelector cellWithIdentifier:identifier fromParentCell:self.rootCell]; + NSRect visibleRect = [self visibleRect]; + BOOL cellVisible = NO; + if (NSIntersectsRect(visibleRect, cellToUpdate.frame)) { + cellVisible = YES; + } - NSPoint newCellOrigin = newCell.origin; - NSPoint newVisibleRectOrigin = NewPoint(newCellOrigin.x - distFromVisibleRect.width, newCellOrigin.y - distFromVisibleRect.height); - - // [self scrollPoint:newVisibleRectOrigin] animates the scrolling, we don't want that - NSPoint newVisibleRectOriginInClipView = [self convertPoint:newVisibleRectOrigin toView:self.superview]; - [self.enclosingScrollView.contentView setBoundsOrigin:newVisibleRectOriginInClipView]; - [self setNeedsDisplay:YES]; - - return; - } + if (cellVisible) { + NSPoint cellOrigin = cellToUpdate.origin; + NSPoint visibleOrigin = visibleRect.origin; + NSSize distFromVisibleRect = NewSize(cellOrigin.x - visibleOrigin.x, cellOrigin.y - visibleOrigin.y); [self updateCanvasSize]; QMCell *const newCell = [self.cellSelector cellWithIdentifier:identifier fromParentCell:self.rootCell]; - [self scrollRectToVisible:newCell.familyFrame]; - [self scrollRectToVisible:newCell.frame]; + NSPoint newCellOrigin = newCell.origin; + NSPoint newVisibleRectOrigin = NewPoint(newCellOrigin.x - distFromVisibleRect.width, newCellOrigin.y - distFromVisibleRect.height); + // [self scrollPoint:newVisibleRectOrigin] animates the scrolling, we don't want that + NSPoint newVisibleRectOriginInClipView = [self convertPoint:newVisibleRectOrigin toView:self.superview]; + [self.enclosingScrollView.contentView setBoundsOrigin:newVisibleRectOriginInClipView]; [self setNeedsDisplay:YES]; + + return; + } + + [self updateCanvasSize]; + QMCell *const newCell = [self.cellSelector cellWithIdentifier:identifier fromParentCell:self.rootCell]; + + [self scrollRectToVisible:newCell.familyFrame]; + [self scrollRectToVisible:newCell.frame]; + + [self setNeedsDisplay:YES]; } - (void)updateCellFamilyForRemovalWithIdentifier:(id)identifier { - log4Debug(@"jo"); - NSArray *idArray = [self allChildrenIdentifierOfIdentifier:identifier]; + NSArray *idArray = [self allChildrenIdentifierOfIdentifier:identifier]; - QMCell *parentCell = [self.cellSelector cellWithIdentifier:identifier fromParentCell:self.rootCell]; - QMCell *cellToDel; - if (idArray.count == 0) { - cellToDel = parentCell.children.lastObject; - } else { - for (QMCell *cell in parentCell.children) { - if (![idArray containsObject:cell.identifier]) { - cellToDel = cell; - break; - } - } + QMCell *parentCell = [self.cellSelector cellWithIdentifier:identifier fromParentCell:self.rootCell]; + QMCell *cellToDel; + if (idArray.count == 0) { + cellToDel = parentCell.children.lastObject; + } else { + for (QMCell *cell in parentCell.children) { + if (![idArray containsObject:cell.identifier]) { + cellToDel = cell; + break; + } } + } - [parentCell removeChild:cellToDel]; + [parentCell removeChild:cellToDel]; - [self updateCanvasSize]; - [self setNeedsDisplay:YES]; + [self updateCanvasSize]; + [self setNeedsDisplay:YES]; } - (void)updateLeftCellFamilyForRemovalWithIdentifier:(id)identifier { - log4Debug(@"jo"); - NSArray *idArray = [self leftChildrenIdentifierOfRootCell]; + NSArray *idArray = [self leftChildrenIdentifierOfRootCell]; - QMCell *cellToDel; - if (idArray.count == 0) { - cellToDel = [self.rootCell.leftChildren lastObject]; - } else { - for (QMCell *cell in self.rootCell.leftChildren) { - if (![idArray containsObject:cell.identifier]) { - cellToDel = cell; - break; - } - } + QMCell *cellToDel; + if (idArray.count == 0) { + cellToDel = [self.rootCell.leftChildren lastObject]; + } else { + for (QMCell *cell in self.rootCell.leftChildren) { + if (![idArray containsObject:cell.identifier]) { + cellToDel = cell; + break; + } } + } - [self.rootCell removeChild:cellToDel]; + [self.rootCell removeChild:cellToDel]; - [self updateCanvasSize]; - [self setNeedsDisplay:YES]; + [self updateCanvasSize]; + [self setNeedsDisplay:YES]; } /* @@ -349,12 +351,12 @@ - (void)updateLeftCellFamilyForRemovalWithIdentifier:(id)identifier { we only test the begin edit part. We are being to lazy here... */ - (void)updateCellFamily:(id)parentId forNewCell:(id)childId { - [self updateCellFamilyForInsertionWithIdentifier:parentId]; - QMCell *cellToEdit = [self.cellSelector cellWithIdentifier:childId fromParentCell:self.rootCell]; + [self updateCellFamilyForInsertionWithIdentifier:parentId]; + QMCell *cellToEdit = [self.cellSelector cellWithIdentifier:childId fromParentCell:self.rootCell]; - [self.cellStateManager clearSelection]; - [self.cellStateManager addCellToSelection:cellToEdit modifier:0]; - [self editCell:cellToEdit]; + [self.cellStateManager clearSelection]; + [self.cellStateManager addCellToSelection:cellToEdit modifier:0]; + [self editCell:cellToEdit]; } /* @@ -362,1093 +364,1103 @@ - (void)updateCellFamily:(id)parentId forNewCell:(id)childId { we only test the begin edit part... We are being to lazy here... */ - (void)updateLeftCellFamily:(id)parentId forNewCell:(id)childId { - [self updateLeftCellFamilyForInsertionWithIdentifier:parentId]; - QMCell *cellToEdit = [self.cellSelector cellWithIdentifier:childId fromParentCell:self.rootCell]; + [self updateLeftCellFamilyForInsertionWithIdentifier:parentId]; + QMCell *cellToEdit = [self.cellSelector cellWithIdentifier:childId fromParentCell:self.rootCell]; - [self.cellStateManager clearSelection]; - [self.cellStateManager addCellToSelection:cellToEdit modifier:0]; - [self editCell:cellToEdit]; + [self.cellStateManager clearSelection]; + [self.cellStateManager addCellToSelection:cellToEdit modifier:0]; + [self editCell:cellToEdit]; } - (void)updateCellFamilyForInsertionWithIdentifier:(id)parentId { - NSArray *idArray = [self leftChildrenIdentifierOfIdentifier:parentId]; - QMCell *parentCell = [self.cellSelector cellWithIdentifier:parentId fromParentCell:self.rootCell]; - NSUInteger maxIndex = [idArray count] - 1; - - __block NSUInteger indexToInsert; - __block id itemToInsert; + NSArray *idArray = [self leftChildrenIdentifierOfIdentifier:parentId]; + QMCell *parentCell = [self.cellSelector cellWithIdentifier:parentId fromParentCell:self.rootCell]; + NSUInteger maxIndex = [idArray count] - 1; + + __block NSUInteger indexToInsert; + __block id itemToInsert; + + if (parentCell.countOfChildren == 0) { + indexToInsert = 0; + itemToInsert = [idArray lastObject]; + } else { + [idArray enumerateObjectsUsingBlock:^(id item, NSUInteger index, BOOL *stop) { + if (index == maxIndex) { + indexToInsert = index; + itemToInsert = item; + *stop = YES; + return; + } - if (parentCell.countOfChildren == 0) { - indexToInsert = 0; - itemToInsert = [idArray lastObject]; - } else { - [idArray enumerateObjectsUsingBlock:^(id item, NSUInteger index, BOOL *stop) { - if (index == maxIndex) { - indexToInsert = index; - itemToInsert = item; - *stop = YES; - return; - } - - if ([[parentCell objectInChildrenAtIndex:index] identifier] != item) { - indexToInsert = index; - itemToInsert = item; - *stop = YES; - return; - } - }]; - } + if ([[parentCell objectInChildrenAtIndex:index] identifier] != item) { + indexToInsert = index; + itemToInsert = item; + *stop = YES; + return; + } + }]; + } - const BOOL parentIsLeft = [self.dataSource mindmapView:self isItemLeft:parentId]; + const BOOL parentIsLeft = [self.dataSource mindmapView:self isItemLeft:parentId]; - QMCell *cellToInsert = [[QMCell alloc] initWithView:self]; - cellToInsert.left = parentIsLeft; - [self.cellPropertiesManager fillCellPropertiesWithIdentifier:itemToInsert cell:cellToInsert]; - [self.cellPropertiesManager fillAllChildrenWithIdentifier:itemToInsert cell:cellToInsert]; + QMCell *cellToInsert = [[QMCell alloc] initWithView:self]; + cellToInsert.left = parentIsLeft; + [self.cellPropertiesManager fillCellPropertiesWithIdentifier:itemToInsert cell:cellToInsert]; + [self.cellPropertiesManager fillAllChildrenWithIdentifier:itemToInsert cell:cellToInsert]; - [parentCell insertObject:cellToInsert inChildrenAtIndex:indexToInsert]; + [parentCell insertObject:cellToInsert inChildrenAtIndex:indexToInsert]; - [self updateCanvasSize]; - [self setNeedsDisplay:YES]; + [self updateCanvasSize]; + [self setNeedsDisplay:YES]; } - (void)updateLeftCellFamilyForInsertionWithIdentifier:(id)identifier { - NSArray *leftIdArray = [self leftChildrenIdentifierOfRootCell]; - - NSUInteger maxIndex = [leftIdArray count] - 1; - - __block NSUInteger indexToInsert; - __block id itemToInsert; + NSArray *leftIdArray = [self leftChildrenIdentifierOfRootCell]; + + NSUInteger maxIndex = [leftIdArray count] - 1; + + __block NSUInteger indexToInsert; + __block id itemToInsert; + + if (self.rootCell.countOfChildren == 0) { + indexToInsert = 0; + itemToInsert = [leftIdArray lastObject]; + } else { + [leftIdArray enumerateObjectsUsingBlock:^(id item, NSUInteger index, BOOL *stop) { + if (index == maxIndex) { + indexToInsert = index; + itemToInsert = item; + *stop = YES; + return; + } - if (self.rootCell.countOfChildren == 0) { - indexToInsert = 0; - itemToInsert = [leftIdArray lastObject]; - } else { - [leftIdArray enumerateObjectsUsingBlock:^(id item, NSUInteger index, BOOL *stop) { - if (index == maxIndex) { - indexToInsert = index; - itemToInsert = item; - *stop = YES; - return; - } - - if ([[self.rootCell objectInLeftChildrenAtIndex:index] identifier] != item) { - indexToInsert = index; - itemToInsert = item; - *stop = YES; - return; - } - }]; - } + if ([[self.rootCell objectInLeftChildrenAtIndex:index] identifier] != item) { + indexToInsert = index; + itemToInsert = item; + *stop = YES; + return; + } + }]; + } - QMCell *cellToInsert = [[QMCell alloc] initWithView:self]; - cellToInsert.left = YES; + QMCell *cellToInsert = [[QMCell alloc] initWithView:self]; + cellToInsert.left = YES; - [self.cellPropertiesManager fillCellPropertiesWithIdentifier:itemToInsert cell:cellToInsert]; - [self.cellPropertiesManager fillAllChildrenWithIdentifier:itemToInsert cell:cellToInsert]; + [self.cellPropertiesManager fillCellPropertiesWithIdentifier:itemToInsert cell:cellToInsert]; + [self.cellPropertiesManager fillAllChildrenWithIdentifier:itemToInsert cell:cellToInsert]; - [self.rootCell insertObject:cellToInsert inLeftChildrenAtIndex:indexToInsert]; + [self.rootCell insertObject:cellToInsert inLeftChildrenAtIndex:indexToInsert]; - [self updateCanvasSize]; - [self setNeedsDisplay:YES]; + [self updateCanvasSize]; + [self setNeedsDisplay:YES]; } - (void)initMindmapViewWithDataSource:(id )aDataSource { - _dataSource = aDataSource; - _cellPropertiesManager = [[QMCellPropertiesManager alloc] initWithMindmapView:self]; + _currentScale = NewSize(1, 1); + _dataSource = aDataSource; + _cellPropertiesManager = [[QMCellPropertiesManager alloc] initWithMindmapView:self]; - _rootCell = (QMRootCell *) [self.cellPropertiesManager cellWithParent:nil itemOfParent:nil]; - [self registerForDraggedTypes:@[qNodeUti]]; + _rootCell = (QMRootCell *) [self.cellPropertiesManager cellWithParent:nil itemOfParent:nil]; + [self registerForDraggedTypes:@[qNodeUti]]; - NSSize parentSize = self.superview.frame.size; + NSSize parentSize = self.superview.frame.size; - [self setFrameSize:[self scaledBoundsSizeWithParentSize:parentSize]]; - [self scrollToCenter]; - [self setNeedsDisplay:YES]; + [self setFrameSize:[self scaledBoundsSizeWithParentSize:parentSize]]; + [self scrollToCenter]; + [self setNeedsDisplay:YES]; } #pragma mark QMCellEditorDelegate - (void)editingEndedWithString:(NSAttributedString *)newAttrStr forCell:(QMCell *)editedCell byChar:(unichar)character { - id identifier = editedCell.identifier; + id identifier = editedCell.identifier; - [self.dataSource mindmapView:self editingEndedForItem:identifier]; + [self.dataSource mindmapView:self editingEndedForItem:identifier]; - NSString *const newString = [newAttrStr string]; - NSFont *const newFont = [newAttrStr fontOfTheBeginning]; - NSFont *oldFont = editedCell.font; + NSString *const newString = [newAttrStr string]; + NSFont *const newFont = [newAttrStr fontOfTheBeginning]; + NSFont *oldFont = editedCell.font; - BOOL stringModified = ![newString isEqualToString:editedCell.stringValue]; - BOOL fontModified; + BOOL stringModified = ![newString isEqualToString:editedCell.stringValue]; + BOOL fontModified; - if (oldFont == nil) { - fontModified = ![newFont isEqual:[self.settings settingForKey:qSettingDefaultFont]]; - } else { - fontModified = ![newFont isEqual:oldFont]; - } + if (oldFont == nil) { + fontModified = ![newFont isEqual:[self.settings settingForKey:qSettingDefaultFont]]; + } else { + fontModified = ![newFont isEqual:oldFont]; + } - if (stringModified) { - [self.dataSource mindmapView:self setStringValue:newString ofItem:identifier]; - } + if (stringModified) { + [self.dataSource mindmapView:self setStringValue:newString ofItem:identifier]; + } - if (fontModified) { - [self.dataSource mindmapView:self setFont:newFont ofItems:[[NSArray alloc] initWithObjects:identifier, nil]]; - } + if (fontModified) { + [self.dataSource mindmapView:self setFont:newFont ofItems:[[NSArray alloc] initWithObjects:identifier, nil]]; + } } - (void)editingCancelledWithString:(NSAttributedString *)newAttrStr forCell:(QMCell *)editedCell { - [self.cellStateManager clearSelection]; + [self.cellStateManager clearSelection]; - [self.dataSource mindmapView:self editingCancelledForItem:editedCell.identifier withAttrString:newAttrStr]; + [self.dataSource mindmapView:self editingCancelledForItem:editedCell.identifier withAttrString:newAttrStr]; } #pragma mark NSDraggingSource - (BOOL)ignoreModifierKeysForDraggingSession:(NSDraggingSession *)session { - return NO; + return NO; } - (NSDragOperation)draggingSession:(NSDraggingSession *)session sourceOperationMaskForDraggingContext:(NSDraggingContext)context { - return NSDragOperationEvery; + return NSDragOperationEvery; } #pragma mark NSDraggingDestination - (NSDragOperation)draggingUpdated:(id )sender { - NSPoint currentMousePosition = [self convertPoint:[sender draggingLocation] fromView:nil]; + NSPoint currentMousePosition = [self convertPoint:[sender draggingLocation] fromView:nil]; - QMCell *oldDragTargetCell = self.cellStateManager.dragTargetCell; - QMCell *newDragTargetCell = [self.cellSelector cellContainingPoint:currentMousePosition inCell:self.rootCell]; + QMCell *oldDragTargetCell = self.cellStateManager.dragTargetCell; + QMCell *newDragTargetCell = [self.cellSelector cellContainingPoint:currentMousePosition inCell:self.rootCell]; - if (oldDragTargetCell != newDragTargetCell) { - oldDragTargetCell.dragRegion = QMCellRegionNone; + if (oldDragTargetCell != newDragTargetCell) { + oldDragTargetCell.dragRegion = QMCellRegionNone; - // We don't do the following, since we scroll during dragging - //[self displayRect:oldDragTargetCell.nodeCellFrame]; - [self setNeedsDisplay:YES]; - } + // We don't do the following, since we scroll during dragging + //[self displayRect:oldDragTargetCell.nodeCellFrame]; + [self setNeedsDisplay:YES]; + } - self.cellStateManager.dragTargetCell = newDragTargetCell; - if (newDragTargetCell != nil && ![self.cellStateManager cellIsBeingDragged:newDragTargetCell]) { - newDragTargetCell.dragRegion = [self.cellLayoutManager regionOfCell:newDragTargetCell atPoint:currentMousePosition]; - [self displayRect:NewRectWithOriginAndSize(newDragTargetCell.origin, newDragTargetCell.size)]; - } + self.cellStateManager.dragTargetCell = newDragTargetCell; + if (newDragTargetCell != nil && ![self.cellStateManager cellIsBeingDragged:newDragTargetCell]) { + newDragTargetCell.dragRegion = [self.cellLayoutManager regionOfCell:newDragTargetCell atPoint:currentMousePosition]; + [self displayRect:NewRectWithOriginAndSize(newDragTargetCell.origin, newDragTargetCell.size)]; + } - return [sender draggingSourceOperationMask]; + return [sender draggingSourceOperationMask]; } - (BOOL)prepareForDragOperation:(id )sender { - return YES; + return YES; } - (BOOL)performDragOperation:(id )sender { - NSPasteboard *pasteboard = [sender draggingPasteboard]; + NSPasteboard *pasteboard = [sender draggingPasteboard]; - // As of now we only accept our own Node as drag & drop item - if ([[pasteboard types] containsObject:qNodeUti] == NO) { - return NO; - } + // As of now we only accept our own Node as drag & drop item + if ([[pasteboard types] containsObject:qNodeUti] == NO) { + return NO; + } - if ([sender draggingSource] != self) { - return NO; - } + if ([sender draggingSource] != self) { + return NO; + } - // we are in the same view, the only supported mode as of now - QMCell *dragTargetCell = self.cellStateManager.dragTargetCell; - if (dragTargetCell == nil) { - return NO; - } + // we are in the same view, the only supported mode as of now + QMCell *dragTargetCell = self.cellStateManager.dragTargetCell; + if (dragTargetCell == nil) { + return NO; + } - if ([self.cellStateManager cellIsBeingDragged:dragTargetCell]) { - return NO; - } + if ([self.cellStateManager cellIsBeingDragged:dragTargetCell]) { + return NO; + } - if ([self.cellStateManager cellIsBeingDragged:self.rootCell]) { - return NO; - } + if ([self.cellStateManager cellIsBeingDragged:self.rootCell]) { + return NO; + } - NSArray *draggedCells = self.cellStateManager.draggedCells; - NSMutableArray *draggedItems = [[NSMutableArray alloc] initWithCapacity:[draggedCells count]]; - for (QMCell *cell in draggedCells) { - [draggedItems addObject:cell.identifier]; - } + NSArray *draggedCells = self.cellStateManager.draggedCells; + NSMutableArray *draggedItems = [[NSMutableArray alloc] initWithCapacity:[draggedCells count]]; + for (QMCell *cell in draggedCells) { + [draggedItems addObject:cell.identifier]; + } - if ([dragTargetCell isFolded]) { - [self.dataSource mindmapView:self toggleFoldingForItem:dragTargetCell.identifier]; - } + if ([dragTargetCell isFolded]) { + [self.dataSource mindmapView:self toggleFoldingForItem:dragTargetCell.identifier]; + } - BOOL isCopying = [self dragIsCopying:[sender draggingSourceOperationMask]]; - if (isCopying) { - [self.dataSource mindmapView:self copyItems:draggedItems toItem:dragTargetCell.identifier inDirection:[self directionFromCellRegion:dragTargetCell.dragRegion]]; - } else { - [self.dataSource mindmapView:self moveItems:draggedItems toItem:dragTargetCell.identifier inDirection:[self directionFromCellRegion:dragTargetCell.dragRegion]]; - } + BOOL isCopying = [self dragIsCopying:[sender draggingSourceOperationMask]]; + if (isCopying) { + [self.dataSource mindmapView:self copyItems:draggedItems toItem:dragTargetCell.identifier inDirection:[self directionFromCellRegion:dragTargetCell.dragRegion]]; + } else { + [self.dataSource mindmapView:self moveItems:draggedItems toItem:dragTargetCell.identifier inDirection:[self directionFromCellRegion:dragTargetCell.dragRegion]]; + } - dragTargetCell.dragRegion = QMCellRegionNone; - [self setNeedsDisplay:YES]; + dragTargetCell.dragRegion = QMCellRegionNone; + [self setNeedsDisplay:YES]; - return YES; + return YES; } - (void)draggingEnded:(id )sender { - /** - * As described in -doMouseUp:, we get out of the mouse-track loop when a drag session is started. Therefore, we have - * to end the mouse-track loop by setting self.keepMouseTrackOn. - */ + /** + * As described in -doMouseUp:, we get out of the mouse-track loop when a drag session is started. Therefore, we have + * to end the mouse-track loop by setting self.keepMouseTrackOn. + */ - [self clearMouseTrackLoopFlags]; + [self clearMouseTrackLoopFlags]; - [self.cellStateManager clearCellsForDrag]; + [self.cellStateManager clearCellsForDrag]; } #pragma mark NSResponder - (void)keyDown:(NSEvent *)theEvent { - // [super keyDown:] cause the app to beep since the super does not implement it + // [super keyDown:] cause the app to beep since the super does not implement it - NSArray *selectedCells = [self.cellStateManager selectedCells]; - if ([selectedCells count] > 1) { - return; - } + NSArray *selectedCells = [self.cellStateManager selectedCells]; + if ([selectedCells count] > 1) { + return; + } - unichar keyChar = [[theEvent charactersIgnoringModifiers] characterAtIndex:0]; - NSUInteger modifierFlags = [theEvent modifierFlags]; - BOOL commandKey = modifier_check(modifierFlags, NSCommandKeyMask); - BOOL shiftKey = modifier_check(modifierFlags, NSShiftKeyMask); - - if (keyChar == qPageUpKeyCode || keyChar == qPageDownKeyCode) { - [self scrollViewOnePageAccordingToKey:keyChar]; - return; - } + unichar keyChar = [[theEvent charactersIgnoringModifiers] characterAtIndex:0]; + NSUInteger modifierFlags = [theEvent modifierFlags]; + BOOL commandKey = modifier_check(modifierFlags, NSCommandKeyMask); + BOOL shiftKey = modifier_check(modifierFlags, NSShiftKeyMask); - if (modifierFlags & NSNumericPadKeyMask) { - [self interpretKeyEvents:@[theEvent]]; - return; - } + if (keyChar == qPageUpKeyCode || keyChar == qPageDownKeyCode) { + [self scrollViewOnePageAccordingToKey:keyChar]; + return; + } - BOOL hasSelectedCells = [self.cellStateManager hasSelectedCells]; - QMCell *selCell = hasSelectedCells ? [selectedCells lastObject] : self.rootCell; - id selIdentifier = selCell.identifier; + if (modifierFlags & NSNumericPadKeyMask) { + [self interpretKeyEvents:@[theEvent]]; + return; + } - if ([[self.settings settingForKey:qSettingNewChildNodeChars] characterIsMember:keyChar]) { - [self insertChild]; - return; - } + BOOL hasSelectedCells = [self.cellStateManager hasSelectedCells]; + QMCell *selCell = hasSelectedCells ? [selectedCells lastObject] : self.rootCell; + id selIdentifier = selCell.identifier; - if ([[self.settings settingForKey:qSettingNewLeftChildNodeChars] characterIsMember:keyChar]) { - [self insertLeftChild]; - return; - } + if ([[self.settings settingForKey:qSettingNewChildNodeChars] characterIsMember:keyChar]) { + [self insertChild]; + return; + } - if (!hasSelectedCells) { - return; - } + if ([[self.settings settingForKey:qSettingNewLeftChildNodeChars] characterIsMember:keyChar]) { + [self insertLeftChild]; + return; + } - if ([[self.settings settingForKey:qSettingEditSelectedNodeChars] characterIsMember:keyChar] - && !commandKey - && !shiftKey) { + if (!hasSelectedCells) { + return; + } - [self editCell:selCell]; + if ([[self.settings settingForKey:qSettingEditSelectedNodeChars] characterIsMember:keyChar] + && !commandKey + && !shiftKey) { - return; - } + [self editCell:selCell]; - if (selCell.isRoot) { - return; - } + return; + } - if ([[self.settings settingForKey:qSettingFoldingChars] characterIsMember:keyChar]) { - [self.dataSource mindmapView:self toggleFoldingForItem:selIdentifier]; - return; - } + if (selCell.isRoot) { + return; + } - if ([[self.settings settingForKey:qSettingNewSiblingNodeChars] characterIsMember:keyChar]) { + if ([[self.settings settingForKey:qSettingFoldingChars] characterIsMember:keyChar]) { + [self.dataSource mindmapView:self toggleFoldingForItem:selIdentifier]; + return; + } - if (!commandKey) { - return; - } + if ([[self.settings settingForKey:qSettingNewSiblingNodeChars] characterIsMember:keyChar]) { - if (shiftKey) { - [self insertPreviousSibling]; - return; - } + if (!commandKey) { + return; + } - [self insertNextSibling]; - return; + if (shiftKey) { + [self insertPreviousSibling]; + return; } + + [self insertNextSibling]; + return; + } } - (void)mouseDown:(NSEvent *)event { - /** - * We're using the mouse-track loop approach to handle mouse dragging and mouse up events - * because of the issue #6: - * - * https://github.com/qvacua/qmind/issues/6 - */ + /** + * We're using the mouse-track loop approach to handle mouse dragging and mouse up events + * because of the issue #6: + * + * https://github.com/qvacua/qmind/issues/6 + */ - /** - * Single click event always precede the double click event, i.e. when the user double-clicks, then: - * - * - mouseDown event with clickCount = 1 - * - mouseDown event with clickCount = 2 - */ + /** + * Single click event always precede the double click event, i.e. when the user double-clicks, then: + * + * - mouseDown event with clickCount = 1 + * - mouseDown event with clickCount = 2 + */ - NSInteger clickCount = [event clickCount]; - NSPoint clickLocation = [self convertPoint:[event locationInWindow] fromView:nil]; - NSUInteger modifier = [event modifierFlags]; + NSInteger clickCount = [event clickCount]; + NSPoint clickLocation = [self convertPoint:[event locationInWindow] fromView:nil]; + NSUInteger modifier = [event modifierFlags]; - if (clickCount == 1) { + if (clickCount == 1) { - [self handleSingleMouseDown:clickLocation modifier:modifier]; + [self handleSingleMouseDown:clickLocation modifier:modifier]; - } else if (clickCount == 2) { - if (modifier_check(modifier, NSCommandKeyMask) || modifier_check(modifier, NSShiftKeyMask)) { - return; - } - - if (![self.cellStateManager hasSelectedCells]) { - return; - } + } else if (clickCount == 2) { + if (modifier_check(modifier, NSCommandKeyMask) || modifier_check(modifier, NSShiftKeyMask)) { + return; + } - NSArray *selCells = [self.cellStateManager selectedCells]; - if ([selCells count] > 1) { - return; - } + if (![self.cellStateManager hasSelectedCells]) { + return; + } - [self.dataSource mindmapView:self toggleFoldingForItem:[selCells.lastObject identifier]]; + NSArray *selCells = [self.cellStateManager selectedCells]; + if ([selCells count] > 1) { + return; } - NSEvent *currentEvent; - self.keepMouseTrackOn = YES; - while (self.keepMouseTrackOn) { - currentEvent = [self.window nextEventMatchingMask:NSLeftMouseUpMask | NSLeftMouseDraggedMask]; + [self.dataSource mindmapView:self toggleFoldingForItem:[selCells.lastObject identifier]]; + } + + NSEvent *currentEvent; + self.keepMouseTrackOn = YES; + while (self.keepMouseTrackOn) { + currentEvent = [self.window nextEventMatchingMask:NSLeftMouseUpMask | NSLeftMouseDraggedMask]; - switch ([currentEvent type]) { - case NSLeftMouseDragged: - [self doMouseDragged:currentEvent]; - break; + switch ([currentEvent type]) { + case NSLeftMouseDragged: + [self doMouseDragged:currentEvent]; + break; - case NSLeftMouseUp: - [[NSCursor arrowCursor] set]; - [self doMouseUp:currentEvent]; + case NSLeftMouseUp: + [[NSCursor arrowCursor] set]; + [self doMouseUp:currentEvent]; - [self clearMouseTrackLoopFlags]; - break; + [self clearMouseTrackLoopFlags]; + break; - default: - break; - } + default: + break; } + } } - (void)scrollWheel:(NSEvent *)event { - NSUInteger modifierFlags = [event modifierFlags]; - BOOL commandKey = modifier_check(modifierFlags, NSCommandKeyMask); + NSUInteger modifierFlags = [event modifierFlags]; + BOOL commandKey = modifier_check(modifierFlags, NSCommandKeyMask); - if (!commandKey) { - [super scrollWheel:event]; - return; - } + if (!commandKey) { + [super scrollWheel:event]; + return; + } - if ([self.cellEditor isEditing]) { - return; - } + if ([self.cellEditor isEditing]) { + return; + } - CGFloat factor = 1.0 + sign([event deltaY]) * qZoomScrollWheelStep; - NSPoint locInView = [self convertPoint:[event locationInWindow] fromView:nil]; + CGFloat factor = 1.0 + sign([event deltaY]) * qZoomScrollWheelStep; + NSPoint locInView = [self convertPoint:[event locationInWindow] fromView:nil]; - [self zoomByFactor:factor withFixedPoint:locInView]; + [self zoomByFactor:factor withFixedPoint:locInView]; } - (void)magnifyWithEvent:(NSEvent *)event { - if ([self.cellEditor isEditing]) { - return; - } + if ([self.cellEditor isEditing]) { + return; + } - CGFloat factor = 1.0 + [event magnification]; - NSPoint locInView = [self convertPoint:[event locationInWindow] fromView:nil]; + CGFloat factor = 1.0 + [event magnification]; + NSPoint locInView = [self convertPoint:[event locationInWindow] fromView:nil]; - [self zoomByFactor:factor withFixedPoint:locInView]; + [self zoomByFactor:factor withFixedPoint:locInView]; } - (BOOL)acceptsFirstResponder { - return YES; + return YES; } - (BOOL)becomeFirstResponder { - return YES; + return YES; } - (void)moveRight:(id)sender { - NSArray *selectedCells = [self.cellStateManager selectedCells]; - if ([selectedCells count] != 1) { - return; - } + NSArray *selectedCells = [self.cellStateManager selectedCells]; + if ([selectedCells count] != 1) { + return; + } - QMCell *selCell = selectedCells[0]; - if ([selCell isLeft]) { - [self replaceSelectionWithCellAndRedisplay:selCell.parent]; - return; - } + QMCell *selCell = selectedCells[0]; + if ([selCell isLeft]) { + [self replaceSelectionWithCellAndRedisplay:selCell.parent]; + return; + } - if ([selCell isLeaf]) { - return; - } + if ([selCell isLeaf]) { + return; + } - if ([selCell isFolded]) { - [self.dataSource mindmapView:self toggleFoldingForItem:selCell.identifier]; - } + if ([selCell isFolded]) { + [self.dataSource mindmapView:self toggleFoldingForItem:selCell.identifier]; + } - NSArray *children = selCell.children; - if ([selCell countOfChildren] == 1) { - [self replaceSelectionWithCellAndRedisplay:children[0]]; - return; - } + NSArray *children = selCell.children; + if ([selCell countOfChildren] == 1) { + [self replaceSelectionWithCellAndRedisplay:children[0]]; + return; + } - QMCell *chosenChildCell = [self verticallyNearestCellFromCells:children withCell:selCell]; - [self replaceSelectionWithCellAndRedisplay:chosenChildCell]; + QMCell *chosenChildCell = [self verticallyNearestCellFromCells:children withCell:selCell]; + [self replaceSelectionWithCellAndRedisplay:chosenChildCell]; } - (void)moveLeft:(id)sender { - NSArray *selectedCells = [self.cellStateManager selectedCells]; - if ([selectedCells count] != 1) { - return; - } + NSArray *selectedCells = [self.cellStateManager selectedCells]; + if ([selectedCells count] != 1) { + return; + } - QMCell *selCell = selectedCells[0]; - BOOL selCellIsRoot = [selCell isRoot]; - NSArray *children = selCellIsRoot ? self.rootCell.leftChildren : selCell.children; + QMCell *selCell = selectedCells[0]; + BOOL selCellIsRoot = [selCell isRoot]; + NSArray *children = selCellIsRoot ? self.rootCell.leftChildren : selCell.children; - if ([selCell isLeft] || selCellIsRoot) { - if ([children count] == 0) { - return; - } - - if ([selCell isFolded]) { - [self.dataSource mindmapView:self toggleFoldingForItem:selCell.identifier]; - } + if ([selCell isLeft] || selCellIsRoot) { + if ([children count] == 0) { + return; + } - if ([children count] == 1) { - [self replaceSelectionWithCellAndRedisplay:children[0]]; - return; - } + if ([selCell isFolded]) { + [self.dataSource mindmapView:self toggleFoldingForItem:selCell.identifier]; + } - QMCell *chosenChildCell = [self verticallyNearestCellFromCells:children withCell:selCell]; - [self replaceSelectionWithCellAndRedisplay:chosenChildCell]; - return; + if ([children count] == 1) { + [self replaceSelectionWithCellAndRedisplay:children[0]]; + return; } - [self replaceSelectionWithCellAndRedisplay:selCell.parent]; + QMCell *chosenChildCell = [self verticallyNearestCellFromCells:children withCell:selCell]; + [self replaceSelectionWithCellAndRedisplay:chosenChildCell]; + return; + } + + [self replaceSelectionWithCellAndRedisplay:selCell.parent]; } - (void)moveDown:(id)sender { - NSUInteger (^nextLevelIndexOperation)(NSUInteger) = ^(NSUInteger givenIndex) { - return givenIndex + 1; - }; + NSUInteger (^nextLevelIndexOperation)(NSUInteger) = ^(NSUInteger givenIndex) { + return givenIndex + 1; + }; - QMCell *(^positionOfCell)(NSArray *) = ^(NSArray *cells) { - return [cells lastObject]; - }; + QMCell *(^positionOfCell)(NSArray *) = ^(NSArray *cells) { + return [cells lastObject]; + }; - QMCell *(^cellSelector)(NSArray *) = ^(NSArray *cells) { - return cells[0]; - }; + QMCell *(^cellSelector)(NSArray *) = ^(NSArray *cells) { + return cells[0]; + }; - [self moveUpOrDownUsingLevelIndexOperation:nextLevelIndexOperation positionOfCell:positionOfCell cellSelector:cellSelector]; + [self moveUpOrDownUsingLevelIndexOperation:nextLevelIndexOperation positionOfCell:positionOfCell cellSelector:cellSelector]; } - (void)moveUp:(id)sender { - NSUInteger (^nextLevelIndexOperation)(NSUInteger) = ^(NSUInteger givenIndex) { - return givenIndex - 1; - }; + NSUInteger (^nextLevelIndexOperation)(NSUInteger) = ^(NSUInteger givenIndex) { + return givenIndex - 1; + }; - QMCell *(^positionOfCell)(NSArray *) = ^(NSArray *cells) { - return cells[0]; - }; + QMCell *(^positionOfCell)(NSArray *) = ^(NSArray *cells) { + return cells[0]; + }; - QMCell *(^cellSelector)(NSArray *) = ^(NSArray *cells) { - return [cells lastObject]; - }; + QMCell *(^cellSelector)(NSArray *) = ^(NSArray *cells) { + return [cells lastObject]; + }; - [self moveUpOrDownUsingLevelIndexOperation:nextLevelIndexOperation positionOfCell:positionOfCell cellSelector:cellSelector]; + [self moveUpOrDownUsingLevelIndexOperation:nextLevelIndexOperation positionOfCell:positionOfCell cellSelector:cellSelector]; } #pragma mark NSView - (id)initWithFrame:(NSRect)frame { - if ((self = [super initWithFrame:frame])) { - [[TBContext sharedContext] autowireSeed:self]; + if ((self = [super initWithFrame:frame])) { + [[TBContext sharedContext] autowireSeed:self]; - _cellStateManager = [[QMCellStateManager alloc] init]; - _cellEditor = [[QMCellEditor alloc] init]; - _cellEditor.view = self; - _cellEditor.delegate = self; - } + _cellStateManager = [[QMCellStateManager alloc] init]; + _cellEditor = [[QMCellEditor alloc] init]; + _cellEditor.view = self; + _cellEditor.delegate = self; + + [self addSubview:_cellEditor.editorView]; + _cellEditor.editorView.hidden = YES; + } - return self; + return self; } - (NSMenu *)menuForEvent:(NSEvent *)event { - if ([event type] != NSRightMouseDown) { - return nil; - } + if ([event type] != NSRightMouseDown) { + return nil; + } - NSPoint clickLocation = [self convertPoint:[event locationInWindow] fromView:nil]; - QMCell *mouseDownHitCell = [self.cellSelector cellContainingPoint:clickLocation inCell:self.rootCell]; + NSPoint clickLocation = [self convertPoint:[event locationInWindow] fromView:nil]; + QMCell *mouseDownHitCell = [self.cellSelector cellContainingPoint:clickLocation inCell:self.rootCell]; - NSMenu *menu = [self menu]; - NSMenuItem *deleteIconMenuItem = [menu itemWithTag:qDeleteIconMenuItemTag]; - NSMenuItem *deleteAllIconsMenuItem = [menu itemWithTag:qDeleteAllIconsMenuItemTag]; + NSMenu *menu = [self menu]; + NSMenuItem *deleteIconMenuItem = [menu itemWithTag:qDeleteIconMenuItemTag]; + NSMenuItem *deleteAllIconsMenuItem = [menu itemWithTag:qDeleteAllIconsMenuItemTag]; - if (mouseDownHitCell == nil || [mouseDownHitCell countOfIcons] == 0) { - [self disableDeleteIconMenuItem:deleteIconMenuItem]; + if (mouseDownHitCell == nil || [mouseDownHitCell countOfIcons] == 0) { + [self disableDeleteIconMenuItem:deleteIconMenuItem]; - [deleteAllIconsMenuItem setEnabled:NO]; - [deleteAllIconsMenuItem setBlockAction:nil]; + [deleteAllIconsMenuItem setEnabled:NO]; + [deleteAllIconsMenuItem setBlockAction:nil]; - return menu; - } + return menu; + } - void (^deleteAllIconsBlock)(id) = ^(id sender) { - [self.dataSource mindmapView:self deleteAllIconsOfItem:mouseDownHitCell.identifier]; - }; + void (^deleteAllIconsBlock)(id) = ^(id sender) { + [self.dataSource mindmapView:self deleteAllIconsOfItem:mouseDownHitCell.identifier]; + }; - if (NSPointInRect(clickLocation, mouseDownHitCell.textFrame)) { - [self disableDeleteIconMenuItem:deleteIconMenuItem]; - [self enableDeleteAllIconsMenuItem:deleteAllIconsMenuItem withBlock:deleteAllIconsBlock]; + if (NSPointInRect(clickLocation, mouseDownHitCell.textFrame)) { + [self disableDeleteIconMenuItem:deleteIconMenuItem]; + [self enableDeleteAllIconsMenuItem:deleteAllIconsMenuItem withBlock:deleteAllIconsBlock]; - return menu; - } + return menu; + } - __block QMIcon *hitIcon = nil; - [mouseDownHitCell.icons enumerateObjectsUsingBlock:^(QMIcon *icon, NSUInteger index, BOOL *stop) { - if (NSPointInRect(clickLocation, icon.frame)) { - hitIcon = icon; - *stop = YES; - } - }]; + __block QMIcon *hitIcon = nil; + [mouseDownHitCell.icons enumerateObjectsUsingBlock:^(QMIcon *icon, NSUInteger index, BOOL *stop) { + if (NSPointInRect(clickLocation, icon.frame)) { + hitIcon = icon; + *stop = YES; + } + }]; - if (hitIcon == nil) { - [self disableDeleteIconMenuItem:deleteIconMenuItem]; - [self enableDeleteAllIconsMenuItem:deleteAllIconsMenuItem withBlock:deleteAllIconsBlock]; + if (hitIcon == nil) { + [self disableDeleteIconMenuItem:deleteIconMenuItem]; + [self enableDeleteAllIconsMenuItem:deleteAllIconsMenuItem withBlock:deleteAllIconsBlock]; - return menu; - } + return menu; + } - NSString *unicode = hitIcon.unicode; - if (unicode == nil) { - unicode = NSLocalizedString(@"delete.node.unsupported.icon", @"Unsupported Icon"); - } + NSString *unicode = hitIcon.unicode; + if (unicode == nil) { + unicode = NSLocalizedString(@"delete.node.unsupported.icon", @"Unsupported Icon"); + } - [deleteIconMenuItem setTitle:[NSString stringWithFormat:NSLocalizedString(@"delete.node.icon", @"Delete %@"), unicode]]; - [deleteIconMenuItem setEnabled:YES]; - [deleteIconMenuItem setBlockAction:^(id sender) { - NSUInteger indexOfHitIcon = [mouseDownHitCell.icons indexOfObject:hitIcon]; - [self.dataSource mindmapView:self deleteIconOfItem:mouseDownHitCell.identifier atIndex:indexOfHitIcon]; - }]; + [deleteIconMenuItem setTitle:[NSString stringWithFormat:NSLocalizedString(@"delete.node.icon", @"Delete %@"), unicode]]; + [deleteIconMenuItem setEnabled:YES]; + [deleteIconMenuItem setBlockAction:^(id sender) { + NSUInteger indexOfHitIcon = [mouseDownHitCell.icons indexOfObject:hitIcon]; + [self.dataSource mindmapView:self deleteIconOfItem:mouseDownHitCell.identifier atIndex:indexOfHitIcon]; + }]; - [self enableDeleteAllIconsMenuItem:deleteAllIconsMenuItem withBlock:deleteAllIconsBlock]; + [self enableDeleteAllIconsMenuItem:deleteAllIconsMenuItem withBlock:deleteAllIconsBlock]; - return menu; + return menu; } - (void)drawRect:(NSRect)dirtyRect { - [super drawRect:dirtyRect]; + [super drawRect:dirtyRect]; - [self.rootCell drawRect:dirtyRect]; + [self.rootCell drawRect:dirtyRect]; } - (BOOL)isFlipped { - return YES; + return YES; } #pragma mark Private - (void)enableDeleteAllIconsMenuItem:(NSMenuItem *)deleteAllIconsMenuItem withBlock:(void (^)(id))deleteAllIconsBlock { - [deleteAllIconsMenuItem setEnabled:YES]; - [deleteAllIconsMenuItem setBlockAction:deleteAllIconsBlock]; + [deleteAllIconsMenuItem setEnabled:YES]; + [deleteAllIconsMenuItem setBlockAction:deleteAllIconsBlock]; } - (void)disableDeleteIconMenuItem:(NSMenuItem *)deleteIconItem { - [deleteIconItem setTitle:NSLocalizedString(@"delete.node.icon.generic", @"Delete Icon")]; - [deleteIconItem setEnabled:NO]; - [deleteIconItem setBlockAction:nil]; + [deleteIconItem setTitle:NSLocalizedString(@"delete.node.icon.generic", @"Delete Icon")]; + [deleteIconItem setEnabled:NO]; + [deleteIconItem setBlockAction:nil]; } - (void)clearMouseTrackLoopFlags { - self.dragging = NO; - self.keepMouseTrackOn = NO; + self.dragging = NO; + self.keepMouseTrackOn = NO; } - (void)doMouseDragged:(NSEvent *)event { - // drag scrolling - QMCell *mouseDownHitCell = self.cellStateManager.mouseDownHitCell; - - if (mouseDownHitCell == nil) { - log4Debug(@"starting to drag scroll"); - [[NSCursor closedHandCursor] set]; - [self dragScrollViewWithEvent:event]; - - return; - } - - // already dragging cells - if (self.dragging) { - [[self superview] autoscroll:event]; - return; - } - - // starting to dragging cells - log4Debug(@"starting to drag a cell"); - self.dragging = YES; - - /** - * The user can drag: - * - selected cells - * - a non-selected cell - */ - NSArray *selCells = [self.cellStateManager selectedCells]; - NSMutableArray *toBeDraggedCells = [[NSMutableArray alloc] init]; - if ([selCells containsObject:mouseDownHitCell]) { - [toBeDraggedCells addObjectsFromArray:selCells]; - } else { - [toBeDraggedCells addObject:mouseDownHitCell]; - } - - [self.dataSource mindmapView:self prepareDragAndDropWithCells:toBeDraggedCells]; - - NSPoint origin = [self convertPoint:NewPoint(mouseDownHitCell.origin.x, mouseDownHitCell.origin.y + mouseDownHitCell.size.height) - fromView:self]; - - [self dragImage:[self dragImageForHitCell:mouseDownHitCell numberOfSelectedCells:[toBeDraggedCells count]] - at:origin - offset:NSZeroSize - event:event - pasteboard:[NSPasteboard pasteboardWithName:NSDragPboard] - source:self - slideBack:YES]; + // drag scrolling + QMCell *mouseDownHitCell = self.cellStateManager.mouseDownHitCell; + + if (mouseDownHitCell == nil) { + log4Debug(@"starting to drag scroll"); + [[NSCursor closedHandCursor] set]; + [self dragScrollViewWithEvent:event]; + + return; + } + + // already dragging cells + if (self.dragging) { + [[self superview] autoscroll:event]; + return; + } + + // starting to dragging cells + log4Debug(@"starting to drag a cell"); + self.dragging = YES; + + /** + * The user can drag: + * - selected cells + * - a non-selected cell + */ + NSArray *selCells = [self.cellStateManager selectedCells]; + NSMutableArray *toBeDraggedCells = [[NSMutableArray alloc] init]; + if ([selCells containsObject:mouseDownHitCell]) { + [toBeDraggedCells addObjectsFromArray:selCells]; + } else { + [toBeDraggedCells addObject:mouseDownHitCell]; + } + + [self.dataSource mindmapView:self prepareDragAndDropWithCells:toBeDraggedCells]; + + NSPoint origin = [self convertPoint:NewPoint(mouseDownHitCell.origin.x, mouseDownHitCell.origin.y + mouseDownHitCell.size.height) + fromView:self]; + + [self dragImage:[self dragImageForHitCell:mouseDownHitCell numberOfSelectedCells:[toBeDraggedCells count]] + at:origin + offset:NSZeroSize + event:event + pasteboard:[NSPasteboard pasteboardWithName:NSDragPboard] + source:self + slideBack:YES]; } - (void)doMouseUp:(NSEvent *)event { - /** - * NOTE: -mouseUp does not get invoked when a drag and drop session is initiated in -mouseDragged:, - * even when we use the mouse-track loop approach, after a drag session started and ended. - */ + /** + * NOTE: -mouseUp does not get invoked when a drag and drop session is initiated in -mouseDragged:, + * even when we use the mouse-track loop approach, after a drag session started and ended. + */ - NSInteger clickCount = [event clickCount]; + NSInteger clickCount = [event clickCount]; - if (clickCount == 1) { - [self handleSingleMouseUp]; - } + if (clickCount == 1) { + [self handleSingleMouseUp]; + } - self.cellStateManager.mouseDownHitCell = nil; + self.cellStateManager.mouseDownHitCell = nil; } - (QMDirection)directionFromCellRegion:(QMCellRegion)cellRegion { - switch (cellRegion) { - case QMCellRegionNone: - return QMDirectionNone; - case QMCellRegionEast: - return QMDirectionRight; - case QMCellRegionWest: - return QMDirectionLeft; - case QMCellRegionSouth: - return QMDirectionBottom; - case QMCellRegionNorth: - return QMDirectionTop; - } - - return QMDirectionNone; + switch (cellRegion) { + case QMCellRegionNone: + return QMDirectionNone; + case QMCellRegionEast: + return QMDirectionRight; + case QMCellRegionWest: + return QMDirectionLeft; + case QMCellRegionSouth: + return QMDirectionBottom; + case QMCellRegionNorth: + return QMDirectionTop; + } + + return QMDirectionNone; } - (BOOL)dragIsCopying:(NSDragOperation)dragOperationMask { - // strangely, when no modifier key is pressed, ie moving, NSDragOperationCopy and NSDragOperationMove are set - // if copying, ie option pressed, only NSDragOperationCopy is set - if (dragOperationMask & NSDragOperationCopy && dragOperationMask & NSDragOperationMove) { - return NO; - } + // strangely, when no modifier key is pressed, ie moving, NSDragOperationCopy and NSDragOperationMove are set + // if copying, ie option pressed, only NSDragOperationCopy is set + if (dragOperationMask & NSDragOperationCopy && dragOperationMask & NSDragOperationMove) { + return NO; + } - return YES; + return YES; } - (void)dragScrollViewWithEvent:(NSEvent *)theEvent { - const CGFloat dx = [theEvent deltaX]; - const CGFloat dy = [theEvent deltaY]; + const CGFloat dx = [theEvent deltaX]; + const CGFloat dy = [theEvent deltaY]; - NSClipView *const clipView = [[self enclosingScrollView] contentView]; + NSClipView *const clipView = [[self enclosingScrollView] contentView]; - NSPoint oldScrollPt = [clipView bounds].origin; - NSPoint newScrollPt = NewPoint(oldScrollPt.x - dx, oldScrollPt.y - dy); + NSPoint oldScrollPt = [clipView bounds].origin; + NSPoint newScrollPt = NewPoint(oldScrollPt.x - dx, oldScrollPt.y - dy); - [clipView setBoundsOrigin:newScrollPt]; + [clipView setBoundsOrigin:newScrollPt]; } - (NSImage *)dragImageForHitCell:(QMCell *)hitCell numberOfSelectedCells:(NSUInteger)numberOfSelCells { - NSImage *hitCellImg = [hitCell image]; + NSImage *hitCellImg = [hitCell image]; - CGFloat margin = 2.5; - CGFloat width = qSizeOfBadge.width + hitCell.size.width + margin; - CGFloat height = MAX(qSizeOfBadge.height, hitCell.size.height); - NSSize sizeOfFinalImg = NewSize(width, height); + CGFloat margin = 2.5; + CGFloat width = qSizeOfBadge.width + hitCell.size.width + margin; + CGFloat height = MAX(qSizeOfBadge.height, hitCell.size.height); + NSSize sizeOfFinalImg = NewSize(width, height); - NSImage *badgeImg = [[NSImage alloc] initWithSize:sizeOfFinalImg]; - [badgeImg lockFocusFlipped:NO]; + NSImage *badgeImg = [[NSImage alloc] initWithSize:sizeOfFinalImg]; + [badgeImg lockFocusFlipped:NO]; - [hitCellImg drawAtPoint:NewPoint(qSizeOfBadge.width + margin, sizeOfFinalImg.height - [hitCellImg size].height) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:0.65]; - [self.uiDrawer drawBadgeWithNumber:numberOfSelCells atPoint:NewPoint(4, height - 4 - qSizeOfBadge.height)]; + [hitCellImg drawAtPoint:NewPoint(qSizeOfBadge.width + margin, sizeOfFinalImg.height - [hitCellImg size].height) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:0.65]; + [self.uiDrawer drawBadgeWithNumber:numberOfSelCells atPoint:NewPoint(4, height - 4 - qSizeOfBadge.height)]; - NSDictionary *fontAttr = @{ - NSFontAttributeName : [NSFont fontWithName:@"Helvetica" size:12], - NSForegroundColorAttributeName : [NSColor whiteColor] - }; - NSString *numberStr = numberOfSelCells > 9 ? @"..." : [@(numberOfSelCells) stringValue]; - NSAttributedString *str = [[NSAttributedString alloc] initWithString:numberStr attributes:fontAttr]; - [str drawAtPoint:NewPoint(11, height - 4 - qSizeOfBadge.height + 3)]; + NSDictionary *fontAttr = @{ + NSFontAttributeName : [NSFont fontWithName:@"Helvetica" size:12], + NSForegroundColorAttributeName : [NSColor whiteColor] + }; + NSString *numberStr = numberOfSelCells > 9 ? @"..." : [@(numberOfSelCells) stringValue]; + NSAttributedString *str = [[NSAttributedString alloc] initWithString:numberStr attributes:fontAttr]; + [str drawAtPoint:NewPoint(11, height - 4 - qSizeOfBadge.height + 3)]; - [badgeImg unlockFocus]; + [badgeImg unlockFocus]; #ifdef DEBUG - NSBitmapImageRep *rep = [[NSBitmapImageRep alloc] initWithData:[badgeImg TIFFRepresentation]]; - NSData *data = [rep representationUsingType:NSPNGFileType properties:nil]; - [data writeToFile:@"/tmp/img.png" atomically:NO]; + NSBitmapImageRep *rep = [[NSBitmapImageRep alloc] initWithData:[badgeImg TIFFRepresentation]]; + NSData *data = [rep representationUsingType:NSPNGFileType properties:nil]; + [data writeToFile:@"/tmp/img.png" atomically:NO]; #endif - return badgeImg; + return badgeImg; } - (void)handleSingleMouseDown:(NSPoint)clickLocation modifier:(NSUInteger)modifier { - self.mouseDownModifier = modifier; - QMCell *mouseDownHitCell = [self.cellSelector cellContainingPoint:clickLocation inCell:self.rootCell]; - self.cellStateManager.mouseDownHitCell = mouseDownHitCell; + self.mouseDownModifier = modifier; + QMCell *mouseDownHitCell = [self.cellSelector cellContainingPoint:clickLocation inCell:self.rootCell]; + self.cellStateManager.mouseDownHitCell = mouseDownHitCell; - [self setNeedsDisplay:YES]; + [self setNeedsDisplay:YES]; } - (void)handleSingleMouseUp { - BOOL mouseDownCommandKey = modifier_check(self.mouseDownModifier, NSCommandKeyMask);; - BOOL mouseDownShiftKey = modifier_check(self.mouseDownModifier, NSShiftKeyMask);; - - QMCell *mouseDownHitCell = self.cellStateManager.mouseDownHitCell; - if (mouseDownHitCell == nil) { - /** - * Even if there is no modifier pressed, we get here modifier == 256. Thus, we check whether we have the - * relevant modifiers not pressed. - */ - if (!mouseDownShiftKey && !mouseDownCommandKey) { - [self.cellStateManager clearSelection]; - [self setNeedsDisplay:YES]; - } + BOOL mouseDownCommandKey = modifier_check(self.mouseDownModifier, NSCommandKeyMask);; + BOOL mouseDownShiftKey = modifier_check(self.mouseDownModifier, NSShiftKeyMask);; - return; + QMCell *mouseDownHitCell = self.cellStateManager.mouseDownHitCell; + if (mouseDownHitCell == nil) { + /** + * Even if there is no modifier pressed, we get here modifier == 256. Thus, we check whether we have the + * relevant modifiers not pressed. + */ + if (!mouseDownShiftKey && !mouseDownCommandKey) { + [self.cellStateManager clearSelection]; + [self setNeedsDisplay:YES]; } - if (mouseDownShiftKey || mouseDownCommandKey) { - if ([self.cellStateManager cellIsSelected:mouseDownHitCell]) { - [self.cellStateManager removeCellFromSelection:mouseDownHitCell modifier:self.mouseDownModifier]; - [self setNeedsDisplay:YES]; - - return; - } + return; + } - [self.cellStateManager addCellToSelection:mouseDownHitCell modifier:self.mouseDownModifier]; - [self setNeedsDisplay:YES]; + if (mouseDownShiftKey || mouseDownCommandKey) { + if ([self.cellStateManager cellIsSelected:mouseDownHitCell]) { + [self.cellStateManager removeCellFromSelection:mouseDownHitCell modifier:self.mouseDownModifier]; + [self setNeedsDisplay:YES]; - return; + return; } - // No relevant modifier keys pressed - [self.cellStateManager clearSelection]; - [self.cellStateManager addCellToSelection:mouseDownHitCell modifier:0]; - + [self.cellStateManager addCellToSelection:mouseDownHitCell modifier:self.mouseDownModifier]; [self setNeedsDisplay:YES]; + + return; + } + + // No relevant modifier keys pressed + [self.cellStateManager clearSelection]; + [self.cellStateManager addCellToSelection:mouseDownHitCell modifier:0]; + + [self setNeedsDisplay:YES]; } - (NSPoint)rootCellOriginForParentSize:(NSSize)parentSize { - return NewPoint(parentSize.width, parentSize.height); + return NewPoint(parentSize.width, parentSize.height); } - (void)zoomByFactor:(CGFloat)factor withFixedPoint:(NSPoint)locInView { - if ([self.cellEditor isEditing]) { - return; - } + if ([self.cellEditor isEditing]) { + return; + } - NSSize oldScale = [self convertSize:qUnitSize toView:nil]; - NSSize newScale = NSMakeSize(oldScale.width * factor, oldScale.height * factor); + NSSize oldScale = [self convertSize:qUnitSize toView:nil]; + NSSize newScale = NSMakeSize(oldScale.width * factor, oldScale.height * factor); - if (newScale.width < qMinZoomFactor) { - return; - } + if (newScale.width < qMinZoomFactor) { + return; + } - if (newScale.width > qMaxZoomFactor) { - return; - } + if (newScale.width > qMaxZoomFactor) { + return; + } - NSClipView *clipView = self.enclosingScrollView.contentView; - NSSize clipViewFrameSize = clipView.frame.size; + NSClipView *clipView = self.enclosingScrollView.contentView; + NSSize clipViewFrameSize = clipView.frame.size; - NSSize oldParentSize = [self convertSize:clipViewFrameSize fromView:clipView]; - NSPoint oldMapOrigin = [self rootCellOriginForParentSize:oldParentSize]; + NSSize oldParentSize = [self convertSize:clipViewFrameSize fromView:clipView]; + NSPoint oldMapOrigin = [self rootCellOriginForParentSize:oldParentSize]; - NSPoint oldScrollPtInClipView = clipView.bounds.origin; - NSPoint oldScrollPt = [self convertPoint:oldScrollPtInClipView fromView:clipView]; - NSSize oldDist = NewSize(locInView.x - oldScrollPt.x, locInView.y - oldScrollPt.y); + NSPoint oldScrollPtInClipView = clipView.bounds.origin; + NSPoint oldScrollPt = [self convertPoint:oldScrollPtInClipView fromView:clipView]; + NSSize oldDist = NewSize(locInView.x - oldScrollPt.x, locInView.y - oldScrollPt.y); - [self resetScaling]; - [self scaleUnitSquareToSize:newScale]; + [self resetScaling]; + [self scaleUnitSquareToSize:newScale]; + self.currentScale = newScale; - NSSize newParentSize = [self convertSize:clipViewFrameSize fromView:clipView]; - NSPoint newMapOrigin = [self rootCellOriginForParentSize:newParentSize]; - NSSize deltaMapOrigin = NewSize(oldMapOrigin.x - newMapOrigin.x, oldMapOrigin.y - newMapOrigin.y); + NSSize newParentSize = [self convertSize:clipViewFrameSize fromView:clipView]; + NSPoint newMapOrigin = [self rootCellOriginForParentSize:newParentSize]; + NSSize deltaMapOrigin = NewSize(oldMapOrigin.x - newMapOrigin.x, oldMapOrigin.y - newMapOrigin.y); - NSPoint newScrollPt = NewPoint(locInView.x - deltaMapOrigin.width - oldDist.width / factor, locInView.y - deltaMapOrigin.height - oldDist.height / factor); + NSPoint newScrollPt = NewPoint(locInView.x - deltaMapOrigin.width - oldDist.width / factor, locInView.y - deltaMapOrigin.height - oldDist.height / factor); - [self updateCanvasSize]; - [self scrollPoint:newScrollPt]; - [self setNeedsDisplay:YES]; + [self updateCanvasSize]; + [self scrollPoint:newScrollPt]; + [self setNeedsDisplay:YES]; } - (void)resetScaling { - [self scaleUnitSquareToSize:[self convertSize:qUnitSize fromView:nil]]; + [self scaleUnitSquareToSize:[self convertSize:qUnitSize fromView:nil]]; } - (NSSize)scaledBoundsSizeWithParentSize:(NSSize)unconvertedParentSize { - NSSize rootFamilySize = self.rootCell.familySize; + NSSize rootFamilySize = self.rootCell.familySize; - NSSize parentSize = [self convertSize:unconvertedParentSize fromView:nil]; - NSSize newBoundsSize = NewSize(rootFamilySize.width + 2 * parentSize.width, rootFamilySize.height + 2 * parentSize.height); - NSPoint newMapOrigin = [self rootCellOriginForParentSize:parentSize]; - NSSize newBoundsSizeInParent = [self convertSize:newBoundsSize toView:nil]; + NSSize parentSize = [self convertSize:unconvertedParentSize fromView:nil]; + NSSize newBoundsSize = NewSize(rootFamilySize.width + 2 * parentSize.width, rootFamilySize.height + 2 * parentSize.height); + NSPoint newMapOrigin = [self rootCellOriginForParentSize:parentSize]; + NSSize newBoundsSizeInParent = [self convertSize:newBoundsSize toView:nil]; - // TODO: maybe we only have to shift the origins of all cells and their lines. - self.rootCell.familyOrigin = newMapOrigin; - [self.rootCell computeGeometry]; + // TODO: maybe we only have to shift the origins of all cells and their lines. + self.rootCell.familyOrigin = newMapOrigin; + [self.rootCell computeGeometry]; - return newBoundsSizeInParent; + return newBoundsSizeInParent; } - (NSArray *)allChildrenIdentifierOfIdentifier:(id)identifier { - NSMutableArray *idArray = [[NSMutableArray alloc] init]; - BOOL parentIsRoot = (identifier == self.rootCell.identifier); - - if (parentIsRoot) { - NSUInteger countOfChildren = (NSUInteger) [self.dataSource mindmapView:self numberOfChildrenOfItem:nil]; - for (int i = 0; i < countOfChildren; i++) { - [idArray addObject:[self.dataSource mindmapView:self child:i ofItem:nil]]; - } - - NSUInteger countOfLeftChildren = (NSUInteger) [self.dataSource mindmapView:self numberOfLeftChildrenOfItem:nil]; - for (int i = 0; i < countOfLeftChildren; i++) { - [idArray addObject:[self.dataSource mindmapView:self leftChild:i ofItem:nil]]; - } - } else { - NSUInteger countOfChildren = (NSUInteger) [self.dataSource mindmapView:self numberOfChildrenOfItem:identifier]; - for (int i = 0; i < countOfChildren; i++) { - [idArray addObject:[self.dataSource mindmapView:self child:i ofItem:identifier]]; - } + NSMutableArray *idArray = [[NSMutableArray alloc] init]; + BOOL parentIsRoot = (identifier == self.rootCell.identifier); + + if (parentIsRoot) { + NSUInteger countOfChildren = (NSUInteger) [self.dataSource mindmapView:self numberOfChildrenOfItem:nil]; + for (int i = 0; i < countOfChildren; i++) { + [idArray addObject:[self.dataSource mindmapView:self child:i ofItem:nil]]; } - return idArray; + NSUInteger countOfLeftChildren = (NSUInteger) [self.dataSource mindmapView:self numberOfLeftChildrenOfItem:nil]; + for (int i = 0; i < countOfLeftChildren; i++) { + [idArray addObject:[self.dataSource mindmapView:self leftChild:i ofItem:nil]]; + } + } else { + NSUInteger countOfChildren = (NSUInteger) [self.dataSource mindmapView:self numberOfChildrenOfItem:identifier]; + for (int i = 0; i < countOfChildren; i++) { + [idArray addObject:[self.dataSource mindmapView:self child:i ofItem:identifier]]; + } + } + + return idArray; } - (NSArray *)leftChildrenIdentifierOfIdentifier:(id)identifier { - NSMutableArray *idArray = [[NSMutableArray alloc] init]; + NSMutableArray *idArray = [[NSMutableArray alloc] init]; - NSUInteger countOfChildren = (NSUInteger) [self.dataSource mindmapView:self numberOfChildrenOfItem:identifier]; - for (int i = 0; i < countOfChildren; i++) { - [idArray addObject:[self.dataSource mindmapView:self child:i ofItem:identifier]]; - } + NSUInteger countOfChildren = (NSUInteger) [self.dataSource mindmapView:self numberOfChildrenOfItem:identifier]; + for (int i = 0; i < countOfChildren; i++) { + [idArray addObject:[self.dataSource mindmapView:self child:i ofItem:identifier]]; + } - return idArray; + return idArray; } - (NSArray *)leftChildrenIdentifierOfRootCell { - NSMutableArray *idArray = [[NSMutableArray alloc] init]; + NSMutableArray *idArray = [[NSMutableArray alloc] init]; - NSUInteger countOfChildren = (NSUInteger) [self.dataSource mindmapView:self numberOfLeftChildrenOfItem:nil]; - for (int i = 0; i < countOfChildren; i++) { - [idArray addObject:[self.dataSource mindmapView:self leftChild:i ofItem:nil]]; - } + NSUInteger countOfChildren = (NSUInteger) [self.dataSource mindmapView:self numberOfLeftChildrenOfItem:nil]; + for (int i = 0; i < countOfChildren; i++) { + [idArray addObject:[self.dataSource mindmapView:self leftChild:i ofItem:nil]]; + } - return idArray; + return idArray; } - (void)editCell:(QMCell *)cellToEdit { - [self.cellEditor beginEditStringValueForCell:cellToEdit]; + [self.cellEditor beginEditStringValueForCell:cellToEdit]; +// +// NSRect rect = NewRectWithOriginAndSize(cellToEdit.origin, cellToEdit.size); +// +// self.fieldEditor.frame = rect; +// self.fieldEditor.hidden = NO; } - (void)scrollToCenter { - NSClipView *const clipView = self.enclosingScrollView.contentView; - NSSize parentSize = clipView.frame.size; - NSSize parentSizeInView = [self convertSize:parentSize fromView:nil]; + NSClipView *const clipView = self.enclosingScrollView.contentView; + NSSize parentSize = clipView.frame.size; + NSSize parentSizeInView = [self convertSize:parentSize fromView:nil]; - NSPoint rootOrigin = self.rootCell.origin; - NSSize rootSize = self.rootCell.size; + NSPoint rootOrigin = self.rootCell.origin; + NSSize rootSize = self.rootCell.size; - NSPoint scrollPt = NewPoint(rootOrigin.x - parentSizeInView.width / 2 + rootSize.width / 2, rootOrigin.y - parentSizeInView.height / 2 + rootSize.height / 2); - [self scrollPoint:scrollPt]; + NSPoint scrollPt = NewPoint(rootOrigin.x - parentSizeInView.width / 2 + rootSize.width / 2, rootOrigin.y - parentSizeInView.height / 2 + rootSize.height / 2); + [self scrollPoint:scrollPt]; } - (void)scrollViewOnePageAccordingToKey:(unichar)keyChar { - const NSRect visibleRect = [self visibleRect]; - const CGFloat verticalBuffer = 3 * [[self enclosingScrollView] verticalLineScroll]; + const NSRect visibleRect = [self visibleRect]; + const CGFloat verticalBuffer = 3 * [[self enclosingScrollView] verticalLineScroll]; - if (keyChar == qPageUpKeyCode) { - [self scrollRectToVisible:NSOffsetRect(visibleRect, 0, -visibleRect.size.height + verticalBuffer)]; - return; - } + if (keyChar == qPageUpKeyCode) { + [self scrollRectToVisible:NSOffsetRect(visibleRect, 0, -visibleRect.size.height + verticalBuffer)]; + return; + } - if (keyChar == qPageDownKeyCode) { - [self scrollRectToVisible:NSOffsetRect(visibleRect, 0, visibleRect.size.height - verticalBuffer)]; - return; - } + if (keyChar == qPageDownKeyCode) { + [self scrollRectToVisible:NSOffsetRect(visibleRect, 0, visibleRect.size.height - verticalBuffer)]; + return; + } } - (void)replaceSelectionWithCellAndRedisplay:(QMCell *)cell { - [self.cellStateManager clearSelection]; - [self.cellStateManager addCellToSelection:cell modifier:0]; - [self scrollToMakeVisibleCell:cell]; - [self setNeedsDisplay:YES]; + [self.cellStateManager clearSelection]; + [self.cellStateManager addCellToSelection:cell modifier:0]; + [self scrollToMakeVisibleCell:cell]; + [self setNeedsDisplay:YES]; } - (QMCell *)verticallyNearestCellFromCells:(NSArray *)cellsToChooseFrom withCell:(QMCell *)cellToCompare { - QMCell *chosenChildCell = cellsToChooseFrom[0]; - CGFloat midYToCompare = cellToCompare.middlePoint.y; - CGFloat minVertDist = MAX_CGFLOAT; - - for (QMCell *childCell in cellsToChooseFrom) { - CGFloat vertDist = ABS(childCell.middlePoint.y - midYToCompare); - if (vertDist < minVertDist) { - minVertDist = vertDist; - chosenChildCell = childCell; - } + QMCell *chosenChildCell = cellsToChooseFrom[0]; + CGFloat midYToCompare = cellToCompare.middlePoint.y; + CGFloat minVertDist = MAX_CGFLOAT; + + for (QMCell *childCell in cellsToChooseFrom) { + CGFloat vertDist = ABS(childCell.middlePoint.y - midYToCompare); + if (vertDist < minVertDist) { + minVertDist = vertDist; + chosenChildCell = childCell; } + } - return chosenChildCell; + return chosenChildCell; } - (void)moveUpOrDownUsingLevelIndexOperation:(NSUInteger (^)(NSUInteger))nextLevelIndexOperation positionOfCell:(QMCell * (^)(NSArray *))positionOfCell cellSelector:(QMCell * (^)(NSArray *))cellSelector { - NSArray *selectedCells = [self.cellStateManager selectedCells]; - if ([selectedCells count] != 1) { - return; + NSArray *selectedCells = [self.cellStateManager selectedCells]; + if ([selectedCells count] != 1) { + return; + } + + QMCell *selCell = selectedCells[0]; + if ([selCell isRoot]) { + return; + } + + // case 1 + NSArray *containingArray = [selCell containingArray]; + if (positionOfCell(containingArray) != selCell) { + [self replaceSelectionWithCellAndRedisplay:containingArray[nextLevelIndexOperation([selCell indexWithinParent])]]; + return; + } + + QMCell *cellIterator = selCell.parent; + QMCell *nextLevelRootCell = nil; + while (cellIterator != self.rootCell && nextLevelRootCell == nil) { + if (positionOfCell([cellIterator containingArray]) == cellIterator) { + cellIterator = cellIterator.parent; + continue; + } + + NSUInteger indexOfCell = [cellIterator indexWithinParent]; + nextLevelRootCell = [cellIterator containingArray][nextLevelIndexOperation(indexOfCell)]; + } + + // case 5 + if (cellIterator == self.rootCell || nextLevelRootCell == nil) { + return; + } + + // case 2 + if ([nextLevelRootCell isFolded] || [nextLevelRootCell isLeaf]) { + [self replaceSelectionWithCellAndRedisplay:nextLevelRootCell]; + } + + // case 3 and 4 + NSMutableArray *candidates = [[NSMutableArray alloc] init]; + cellIterator = nextLevelRootCell; + do { + [candidates addObject:cellIterator]; + if ([cellIterator isFolded] || [cellIterator isLeaf]) { + break; + } else { + cellIterator = cellSelector(cellIterator.children); } + } while (1); - QMCell *selCell = selectedCells[0]; - if ([selCell isRoot]) { - return; - } + NSArray *possiblyOverlappingCandidates = [self horizontallyMostOverlappingCellFromCells:candidates withCell:selCell]; + if ([possiblyOverlappingCandidates count] > 0) { + [candidates removeAllObjects]; + [candidates addObjectsFromArray:possiblyOverlappingCandidates]; + } - // case 1 - NSArray *containingArray = [selCell containingArray]; - if (positionOfCell(containingArray) != selCell) { - [self replaceSelectionWithCellAndRedisplay:containingArray[nextLevelIndexOperation([selCell indexWithinParent])]]; - return; - } + QMCell *chosenCell = [self horizontallyNearestCellFromCells:candidates withCell:selCell]; + [self replaceSelectionWithCellAndRedisplay:chosenCell]; +} - QMCell *cellIterator = selCell.parent; - QMCell *nextLevelRootCell = nil; - while (cellIterator != self.rootCell && nextLevelRootCell == nil) { - if (positionOfCell([cellIterator containingArray]) == cellIterator) { - cellIterator = cellIterator.parent; - continue; - } +- (NSArray *)horizontallyMostOverlappingCellFromCells:(NSArray *)candidates withCell:(QMCell *)cellToCompare { + NSMutableArray *result = [[NSMutableArray alloc] init]; - NSUInteger indexOfCell = [cellIterator indexWithinParent]; - nextLevelRootCell = [cellIterator containingArray][nextLevelIndexOperation(indexOfCell)]; - } + NSRect sourceFrame = cellToCompare.frame; + CGFloat maxArea = 0; + for (QMCell *candidate in candidates) { + NSRect shiftedCandidateFrame = candidate.frame; + shiftedCandidateFrame.origin.y = sourceFrame.origin.y; + NSRect intersectionRect = NSIntersectionRect(shiftedCandidateFrame, sourceFrame); - // case 5 - if (cellIterator == self.rootCell || nextLevelRootCell == nil) { - return; + if (NSEqualRects(NSZeroRect, intersectionRect)) { + continue; } - // case 2 - if ([nextLevelRootCell isFolded] || [nextLevelRootCell isLeaf]) { - [self replaceSelectionWithCellAndRedisplay:nextLevelRootCell]; + CGFloat currentArea = area(intersectionRect); + if (currentArea > maxArea) { + maxArea = currentArea; + [result removeAllObjects]; + [result addObject:candidate]; + continue; } - // case 3 and 4 - NSMutableArray *candidates = [[NSMutableArray alloc] init]; - cellIterator = nextLevelRootCell; - do { - [candidates addObject:cellIterator]; - if ([cellIterator isFolded] || [cellIterator isLeaf]) { - break; - } else { - cellIterator = cellSelector(cellIterator.children); - } - } while (1); - - NSArray *possiblyOverlappingCandidates = [self horizontallyMostOverlappingCellFromCells:candidates withCell:selCell]; - if ([possiblyOverlappingCandidates count] > 0) { - [candidates removeAllObjects]; - [candidates addObjectsFromArray:possiblyOverlappingCandidates]; + if (currentArea == maxArea) { + [result addObject:candidate]; } + } - QMCell *chosenCell = [self horizontallyNearestCellFromCells:candidates withCell:selCell]; - [self replaceSelectionWithCellAndRedisplay:chosenCell]; -} - -- (NSArray *)horizontallyMostOverlappingCellFromCells:(NSArray *)candidates withCell:(QMCell *)cellToCompare { - NSMutableArray *result = [[NSMutableArray alloc] init]; - - NSRect sourceFrame = cellToCompare.frame; - CGFloat maxArea = 0; - for (QMCell *candidate in candidates) { - NSRect shiftedCandidateFrame = candidate.frame; - shiftedCandidateFrame.origin.y = sourceFrame.origin.y; - NSRect intersectionRect = NSIntersectionRect(shiftedCandidateFrame, sourceFrame); - - if (NSEqualRects(NSZeroRect, intersectionRect)) { - continue; - } - - CGFloat currentArea = area(intersectionRect); - if (currentArea > maxArea) { - maxArea = currentArea; - [result removeAllObjects]; - [result addObject:candidate]; - continue; - } - - if (currentArea == maxArea) { - [result addObject:candidate]; - } - } - - return result; + return result; } - (QMCell *)horizontallyNearestCellFromCells:(NSArray *)candidates withCell:(QMCell *)cellToCompare { - CGFloat minDist = MAX_CGFLOAT; - - QMCell *chosenCell = candidates[0]; - for (QMCell *candidate in candidates) { - CGFloat dist = [self horizontalDistanceFromCell:cellToCompare toCell:candidate]; - if (dist < minDist) { - minDist = dist; - chosenCell = candidate; - } + CGFloat minDist = MAX_CGFLOAT; + + QMCell *chosenCell = candidates[0]; + for (QMCell *candidate in candidates) { + CGFloat dist = [self horizontalDistanceFromCell:cellToCompare toCell:candidate]; + if (dist < minDist) { + minDist = dist; + chosenCell = candidate; } + } - return chosenCell; + return chosenCell; } - (CGFloat)horizontalDistanceFromCell:(QMCell *)sourceCell toCell:(QMCell *)targetCell { - CGFloat sourceBegin = sourceCell.origin.x; - CGFloat sourceEnd = sourceCell.origin.x + sourceCell.size.width; + CGFloat sourceBegin = sourceCell.origin.x; + CGFloat sourceEnd = sourceCell.origin.x + sourceCell.size.width; - CGFloat targetBegin = targetCell.origin.x; - CGFloat targetEnd = targetCell.origin.x + targetCell.size.width; + CGFloat targetBegin = targetCell.origin.x; + CGFloat targetEnd = targetCell.origin.x + targetCell.size.width; - CGFloat result = ABS(sourceBegin - targetBegin); - result = MIN(result, ABS(sourceBegin - targetEnd)); - result = MIN(result, ABS(sourceEnd - targetBegin)); - return MIN(result, ABS(sourceEnd - targetEnd)); + CGFloat result = ABS(sourceBegin - targetBegin); + result = MIN(result, ABS(sourceBegin - targetEnd)); + result = MIN(result, ABS(sourceEnd - targetBegin)); + return MIN(result, ABS(sourceEnd - targetEnd)); } - (void)scrollToMakeVisibleCell:(QMCell *)cell { - if (NSIntersectsRect([self visibleRect], cell.frame)) { - return; - } + if (NSIntersectsRect(self.visibleRect, cell.frame)) { + return; + } - [self scrollRectToVisible:NewRectWithOrigin(cell.origin, 50, 50)]; + [self scrollRectToVisible:NewRectWithOrigin(cell.origin, 50, 50)]; } @end diff --git a/Qmind/QMNode.h b/Qmind/QMNode.h index 2837c1e..1f9fbce 100644 --- a/Qmind/QMNode.h +++ b/Qmind/QMNode.h @@ -11,6 +11,7 @@ extern NSString *const qNodeIdAttributeKey; extern NSString *const qNodeTextAttributeKey; +extern NSString *const qNodeLinkAttributeKey; extern NSString *const qNodeFoldedAttributeKey; extern NSString *const qNodePositionAttributeKey; @@ -94,6 +95,8 @@ extern NSString *const qNodeFoldingKey; */ @property(readonly) NSArray *icons; +@property(copy) NSString *link; + /** * The initializer used to create a new node */ diff --git a/Qmind/QMNode.m b/Qmind/QMNode.m index 3539a2c..c846670 100644 --- a/Qmind/QMNode.m +++ b/Qmind/QMNode.m @@ -10,6 +10,7 @@ NSString *const qNodeIdAttributeKey = @"ID"; NSString *const qNodeTextAttributeKey = @"TEXT"; +NSString *const qNodeLinkAttributeKey = @"LINK"; NSString *const qNodeFoldedAttributeKey = @"FOLDED"; NSString *const qNodePositionAttributeKey = @"POSITION"; @@ -61,6 +62,7 @@ @implementation QMNode { @dynamic mutableIcons; @dynamic mutableChildren; @dynamic mutableAttributes; +@dynamic link; #pragma mark Public - (NSUndoManager *)undoManager { @@ -84,6 +86,14 @@ - (void)setUndoManager:(NSUndoManager *)anUndoManager { }]; } +- (NSString *)link { + return self.attributes[qNodeLinkAttributeKey]; +} + +- (void)setLink:(NSString *)aLink { + self.mutableAttributes[qNodeLinkAttributeKey] = [aLink copy]; +} + - (BOOL)isRoot { return NO; } diff --git a/Qmind/QMTypes.h b/Qmind/QMTypes.h index bed905d..9d47c07 100644 --- a/Qmind/QMTypes.h +++ b/Qmind/QMTypes.h @@ -18,4 +18,5 @@ typedef enum { QMIconKindNone = 0, QMIconKindString, QMIconKindImage, + QMIconKindFontawesome, } QMIconKind; diff --git a/Qmind/Qmind-Info.plist b/Qmind/Qmind-Info.plist index b9130ce..62ee942 100644 --- a/Qmind/Qmind-Info.plist +++ b/Qmind/Qmind-Info.plist @@ -44,17 +44,17 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.3.3 + 0.3.4 CFBundleSignature ???? CFBundleVersion - 21 + 22 LSApplicationCategoryType public.app-category.productivity LSMinimumSystemVersion ${MACOSX_DEPLOYMENT_TARGET} NSHumanReadableCopyright - Copyright © 2012 - 2013 Tae Won Ha. All rights reserved. + Copyright © 2012 - 2014 Tae Won Ha. All rights reserved. NSMainNibFile MainMenu NSPrincipalClass diff --git a/Qmind/Resources/Fontawesome/fontawesome-ie7.css b/Qmind/Resources/Fontawesome/fontawesome-ie7.css new file mode 100644 index 0000000..2ad7baa --- /dev/null +++ b/Qmind/Resources/Fontawesome/fontawesome-ie7.css @@ -0,0 +1,24 @@ +/*! + * Font Awesome 3.0.2 + * the iconic font designed for use with Twitter Bootstrap + * ------------------------------------------------------- + * The full suite of pictographic icons, examples, and documentation + * can be found at: http://fortawesome.github.com/Font-Awesome/ + * + * License + * ------------------------------------------------------- + * - The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL + * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License - + * http://opensource.org/licenses/mit-license.html + * - The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/ + * - Attribution is no longer required in Font Awesome 3.0, but much appreciated: + * "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome" + + * Contact + * ------------------------------------------------------- + * Email: dave@davegandy.com + * Twitter: http://twitter.com/fortaweso_me + * Work: Lead Product Designer @ http://kyruus.com + */.icon-large{font-size:1.3333333333333333em;margin-top:-4px;padding-top:3px;margin-bottom:-4px;padding-bottom:3px;vertical-align:middle}.nav [class^="icon-"],.nav [class*=" icon-"]{vertical-align:inherit;margin-top:-4px;padding-top:3px;margin-bottom:-4px;padding-bottom:3px}.nav [class^="icon-"].icon-large,.nav [class*=" icon-"].icon-large{vertical-align:-25%}.nav-pills [class^="icon-"].icon-large,.nav-tabs [class^="icon-"].icon-large,.nav-pills [class*=" icon-"].icon-large,.nav-tabs [class*=" icon-"].icon-large{line-height:.75em;margin-top:-7px;padding-top:5px;margin-bottom:-5px;padding-bottom:4px}.btn [class^="icon-"].pull-left,.btn [class*=" icon-"].pull-left,.btn [class^="icon-"].pull-right,.btn [class*=" icon-"].pull-right{vertical-align:inherit}.btn [class^="icon-"].icon-large,.btn [class*=" icon-"].icon-large{margin-top:-0.5em}a [class^="icon-"],a [class*=" icon-"]{cursor:pointer}ul.icons{text-indent:-1.5em;margin-left:3em}.icon-external-link { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '0xf021; '); } +.icon-globe { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '0xf022; '); } +.icon-link { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '0xf023; '); } diff --git a/Qmind/Resources/Fontawesome/fontawesome-ie7.less b/Qmind/Resources/Fontawesome/fontawesome-ie7.less new file mode 100644 index 0000000..39e6708 --- /dev/null +++ b/Qmind/Resources/Fontawesome/fontawesome-ie7.less @@ -0,0 +1,85 @@ +/*! + * Font Awesome 3.0.2 + * the iconic font designed for use with Twitter Bootstrap + * ------------------------------------------------------- + * The full suite of pictographic icons, examples, and documentation + * can be found at: http://fortawesome.github.com/Font-Awesome/ + * + * License + * ------------------------------------------------------- + * - The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL + * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License - + * http://opensource.org/licenses/mit-license.html + * - The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/ + * - Attribution is no longer required in Font Awesome 3.0, but much appreciated: + * "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome" + + * Contact + * ------------------------------------------------------- + * Email: dave@davegandy.com + * Twitter: http://twitter.com/fortaweso_me + * Work: Lead Product Designer @ http://kyruus.com + */ + +.icon-large { + font-size: 4/3em; + margin-top: -4px; + padding-top: 3px; + margin-bottom: -4px; + padding-bottom: 3px; + vertical-align: middle; +} + +.nav { + [class^="icon-"], + [class*=" icon-"] { + vertical-align: inherit; + margin-top: -4px; + padding-top: 3px; + margin-bottom: -4px; + padding-bottom: 3px; + &.icon-large { + vertical-align: -25%; + } + } +} + +.nav-pills, .nav-tabs { + [class^="icon-"], + [class*=" icon-"] { + &.icon-large { + line-height: .75em; + margin-top: -7px; + padding-top: 5px; + margin-bottom: -5px; + padding-bottom: 4px; + } + } +} + +.btn { + [class^="icon-"], + [class*=" icon-"] { + &.pull-left, &.pull-right { vertical-align: inherit; } + &.icon-large { + margin-top: -.5em; + } + } +} + +a [class^="icon-"], +a [class*=" icon-"] { + cursor: pointer; +} + +ul.icons { + text-indent: -1.5em; + margin-left: 3em; +} + + +.ie7icon(@inner) { + *zoom: ~"expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '@{inner}')"; +}.icon-external-link { .ie7icon(''); } +.icon-globe { .ie7icon(''); } +.icon-link { .ie7icon(''); } diff --git a/Qmind/Resources/Fontawesome/fontawesome-webfont.afm b/Qmind/Resources/Fontawesome/fontawesome-webfont.afm new file mode 100644 index 0000000..f091be0 --- /dev/null +++ b/Qmind/Resources/Fontawesome/fontawesome-webfont.afm @@ -0,0 +1,22 @@ +StartFontMetrics 2.0 +Comment Generated by FontForge 20110222 +Comment Creation Date: Sun Jul 28 06:55:26 2013 +FontName fontawesome +FullName fontawesome +FamilyName fontawesome +Weight Book +Notice (Created by root with FontForge 2.0 (http://fontforge.sf.net)) +ItalicAngle 0 +IsFixedPitch false +UnderlinePosition -170.667 +UnderlineThickness 85.3333 +Version 001.000 +EncodingScheme ISO10646-1 +FontBBox 0 -75 1050 900 +Descender -2147483648 +StartCharMetrics 3 +C -1 ; WX 1049 ; N external-link ; B 0 0 1050 900 ; +C -1 ; WX 899 ; N globe ; B 0 -75 900 825 ; +C -1 ; WX 974 ; N link ; B 9 -66 966 891 ; +EndCharMetrics +EndFontMetrics diff --git a/Qmind/Resources/Fontawesome/fontawesome-webfont.eot b/Qmind/Resources/Fontawesome/fontawesome-webfont.eot new file mode 100644 index 0000000..30d1c9d Binary files /dev/null and b/Qmind/Resources/Fontawesome/fontawesome-webfont.eot differ diff --git a/Qmind/Resources/Fontawesome/fontawesome-webfont.ttf b/Qmind/Resources/Fontawesome/fontawesome-webfont.ttf new file mode 100644 index 0000000..efb7929 Binary files /dev/null and b/Qmind/Resources/Fontawesome/fontawesome-webfont.ttf differ diff --git a/Qmind/Resources/Fontawesome/fontawesome-webfont.woff b/Qmind/Resources/Fontawesome/fontawesome-webfont.woff new file mode 100644 index 0000000..63a6712 Binary files /dev/null and b/Qmind/Resources/Fontawesome/fontawesome-webfont.woff differ diff --git a/Qmind/Resources/Fontawesome/fontawesome.css b/Qmind/Resources/Fontawesome/fontawesome.css new file mode 100644 index 0000000..16328ae --- /dev/null +++ b/Qmind/Resources/Fontawesome/fontawesome.css @@ -0,0 +1,273 @@ +/*! + * Font Awesome 3.0.2 + * the iconic font designed for use with Twitter Bootstrap + * ------------------------------------------------------- + * The full suite of pictographic icons, examples, and documentation + * can be found at: http://fortawesome.github.com/Font-Awesome/ + * + * License + * ------------------------------------------------------- + * - The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL + * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License - + * http://opensource.org/licenses/mit-license.html + * - The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/ + * - Attribution is no longer required in Font Awesome 3.0, but much appreciated: + * "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome" + + * Contact + * ------------------------------------------------------- + * Email: dave@davegandy.com + * Twitter: http://twitter.com/fortaweso_me + * Work: Lead Product Designer @ http://kyruus.com + */ +@font-face { + font-family: 'FontAwesome'; + src: url('fontawesome-webfont.eot?v=3.0.1'); + src: url('fontawesome-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'), + url('fontawesome-webfont.woff?v=3.0.1') format('woff'), + url('fontawesome-webfont.ttf?v=3.0.1') format('truetype'); + font-weight: normal; + font-style: normal; +} +/* Font Awesome styles + ------------------------------------------------------- */ +[class^="icon-"], +[class*=" icon-"] { + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + text-decoration: inherit; + -webkit-font-smoothing: antialiased; + + /* sprites.less reset */ + display: inline; + width: auto; + height: auto; + line-height: normal; + vertical-align: baseline; + background-image: none; + background-position: 0% 0%; + background-repeat: repeat; + margin-top: 0; +} +/* more sprites.less reset */ +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"] { + background-image: none; +} +[class^="icon-"]:before, +[class*=" icon-"]:before { + text-decoration: inherit; + display: inline-block; + speak: none; +} +/* makes sure icons active on rollover in links */ +a [class^="icon-"], +a [class*=" icon-"] { + display: inline-block; +} +/* makes the font 33% larger relative to the icon container */ +.icon-large:before { + vertical-align: -10%; + font-size: 1.3333333333333333em; +} +.btn [class^="icon-"], +.nav [class^="icon-"], +.btn [class*=" icon-"], +.nav [class*=" icon-"] { + display: inline; + /* keeps button heights with and without icons the same */ + +} +.btn [class^="icon-"].icon-large, +.nav [class^="icon-"].icon-large, +.btn [class*=" icon-"].icon-large, +.nav [class*=" icon-"].icon-large { + line-height: .9em; +} +.btn [class^="icon-"].icon-spin, +.nav [class^="icon-"].icon-spin, +.btn [class*=" icon-"].icon-spin, +.nav [class*=" icon-"].icon-spin { + display: inline-block; +} +.nav-tabs [class^="icon-"], +.nav-pills [class^="icon-"], +.nav-tabs [class*=" icon-"], +.nav-pills [class*=" icon-"] { + /* keeps button heights with and without icons the same */ + +} +.nav-tabs [class^="icon-"], +.nav-pills [class^="icon-"], +.nav-tabs [class*=" icon-"], +.nav-pills [class*=" icon-"], +.nav-tabs [class^="icon-"].icon-large, +.nav-pills [class^="icon-"].icon-large, +.nav-tabs [class*=" icon-"].icon-large, +.nav-pills [class*=" icon-"].icon-large { + line-height: .9em; +} +li [class^="icon-"], +.nav li [class^="icon-"], +li [class*=" icon-"], +.nav li [class*=" icon-"] { + display: inline-block; + width: 1.25em; + text-align: center; +} +li [class^="icon-"].icon-large, +.nav li [class^="icon-"].icon-large, +li [class*=" icon-"].icon-large, +.nav li [class*=" icon-"].icon-large { + /* increased font size for icon-large */ + + width: 1.5625em; +} +ul.icons { + list-style-type: none; + text-indent: -0.75em; +} +ul.icons li [class^="icon-"], +ul.icons li [class*=" icon-"] { + width: .75em; +} +.icon-muted { + color: #eeeeee; +} +.icon-border { + border: solid 1px #eeeeee; + padding: .2em .25em .15em; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.icon-2x { + font-size: 2em; +} +.icon-2x.icon-border { + border-width: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.icon-3x { + font-size: 3em; +} +.icon-3x.icon-border { + border-width: 3px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.icon-4x { + font-size: 4em; +} +.icon-4x.icon-border { + border-width: 4px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +[class^="icon-"].pull-left, +[class*=" icon-"].pull-left { + margin-right: .3em; +} +[class^="icon-"].pull-right, +[class*=" icon-"].pull-right { + margin-left: .3em; +} +.btn [class^="icon-"].pull-left.icon-2x, +.btn [class*=" icon-"].pull-left.icon-2x, +.btn [class^="icon-"].pull-right.icon-2x, +.btn [class*=" icon-"].pull-right.icon-2x { + margin-top: .18em; +} +.btn [class^="icon-"].icon-spin.icon-large, +.btn [class*=" icon-"].icon-spin.icon-large { + line-height: .8em; +} +.btn.btn-small [class^="icon-"].pull-left.icon-2x, +.btn.btn-small [class*=" icon-"].pull-left.icon-2x, +.btn.btn-small [class^="icon-"].pull-right.icon-2x, +.btn.btn-small [class*=" icon-"].pull-right.icon-2x { + margin-top: .25em; +} +.btn.btn-large [class^="icon-"], +.btn.btn-large [class*=" icon-"] { + margin-top: 0; +} +.btn.btn-large [class^="icon-"].pull-left.icon-2x, +.btn.btn-large [class*=" icon-"].pull-left.icon-2x, +.btn.btn-large [class^="icon-"].pull-right.icon-2x, +.btn.btn-large [class*=" icon-"].pull-right.icon-2x { + margin-top: .05em; +} +.btn.btn-large [class^="icon-"].pull-left.icon-2x, +.btn.btn-large [class*=" icon-"].pull-left.icon-2x { + margin-right: .2em; +} +.btn.btn-large [class^="icon-"].pull-right.icon-2x, +.btn.btn-large [class*=" icon-"].pull-right.icon-2x { + margin-left: .2em; +} +.icon-spin { + display: inline-block; + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + -webkit-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; +} +@-moz-keyframes spin { + 0% { -moz-transform: rotate(0deg); } + 100% { -moz-transform: rotate(359deg); } +} +@-webkit-keyframes spin { + 0% { -webkit-transform: rotate(0deg); } + 100% { -webkit-transform: rotate(359deg); } +} +@-o-keyframes spin { + 0% { -o-transform: rotate(0deg); } + 100% { -o-transform: rotate(359deg); } +} +@-ms-keyframes spin { + 0% { -ms-transform: rotate(0deg); } + 100% { -ms-transform: rotate(359deg); } +} +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(359deg); } +} +@-moz-document url-prefix() { + .icon-spin { + height: .9em; + } + .btn .icon-spin { + height: auto; + } + .icon-spin.icon-large { + height: 1.25em; + } + .btn .icon-spin.icon-large { + height: .75em; + } +}.icon-external-link:before { content: "\f021"; } +.icon-globe:before { content: "\f022"; } +.icon-link:before { content: "\f023"; } diff --git a/Qmind/Resources/Fontawesome/fontawesome.less b/Qmind/Resources/Fontawesome/fontawesome.less new file mode 100644 index 0000000..57620d1 --- /dev/null +++ b/Qmind/Resources/Fontawesome/fontawesome.less @@ -0,0 +1,272 @@ +/*! + * Font Awesome 3.0.2 + * the iconic font designed for use with Twitter Bootstrap + * ------------------------------------------------------- + * The full suite of pictographic icons, examples, and documentation + * can be found at: http://fortawesome.github.com/Font-Awesome/ + * + * License + * ------------------------------------------------------- + * - The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL + * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License - + * http://opensource.org/licenses/mit-license.html + * - The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/ + * - Attribution is no longer required in Font Awesome 3.0, but much appreciated: + * "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome" + + * Contact + * ------------------------------------------------------- + * Email: dave@davegandy.com + * Twitter: http://twitter.com/fortaweso_me + * Work: Lead Product Designer @ http://kyruus.com + */ + +@FontAwesomePath: ""; +@borderColor: #eee; +@iconMuted: #eee; +.border-radius(@radius) { -webkit-border-radius: @radius; -moz-border-radius: @radius; border-radius: @radius; } + +@font-face { + font-family: 'FontAwesome'; + src: url('@{FontAwesomePath}/fontawesome-webfont.eot?v=3.0.1'); + src: url('@{FontAwesomePath}/fontawesome-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'), + url('@{FontAwesomePath}/fontawesome-webfont.woff?v=3.0.1') format('woff'), + url('@{FontAwesomePath}/fontawesome-webfont.ttf?v=3.0.1') format('truetype'); +// url('@{FontAwesomePath}/fontawesome-webfont.svg#fontawesomeregular?v=3.0.1') format('svg'); + +// src: url('@{FontAwesomePath}/FontAwesome.otf') format('opentype'); + + font-weight: normal; + font-style: normal; +} + +/* Font Awesome styles + ------------------------------------------------------- */ +[class^="icon-"], +[class*=" icon-"] { + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + text-decoration: inherit; + -webkit-font-smoothing: antialiased; + +/* sprites.less reset */ + display: inline; + width: auto; + height: auto; + line-height: normal; + vertical-align: baseline; + background-image: none; + background-position: 0% 0%; + background-repeat: repeat; + margin-top: 0; +} + +/* more sprites.less reset */ +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"] { + background-image: none; +} + +[class^="icon-"]:before, +[class*=" icon-"]:before { + text-decoration: inherit; + display: inline-block; + speak: none; +} + +/* makes sure icons active on rollover in links */ +a { + [class^="icon-"], + [class*=" icon-"] { + display: inline-block; + } +} + +/* makes the font 33% larger relative to the icon container */ +.icon-large:before { + vertical-align: -10%; + font-size: 4/3em; +} + +.btn, .nav { + [class^="icon-"], + [class*=" icon-"] { + display: inline; + /* keeps button heights with and without icons the same */ + &.icon-large { line-height: .9em; } + &.icon-spin { display: inline-block; } + } +} + +.nav-tabs, .nav-pills { + [class^="icon-"], + [class*=" icon-"] { + /* keeps button heights with and without icons the same */ + &, &.icon-large { line-height: .9em; } + } +} + +li, .nav li { + [class^="icon-"], + [class*=" icon-"] { + display: inline-block; + width: 1.25em; + text-align: center; + &.icon-large { + /* increased font size for icon-large */ + width: 1.25*1.25em; + } + } +} + +ul.icons { + list-style-type: none; + text-indent: -.75em; + + li { + [class^="icon-"], + [class*=" icon-"] { + width: .75em; + } + } +} + +.icon-muted { + color: @iconMuted; +} + +// Icon Borders +// ------------------------- + +.icon-border { + border: solid 1px @borderColor; + padding: .2em .25em .15em; + .border-radius(3px); +} + +// Icon Sizes +// ------------------------- + +.icon-2x { + font-size: 2em; + &.icon-border { + border-width: 2px; + .border-radius(4px); + } +} +.icon-3x { + font-size: 3em; + &.icon-border { + border-width: 3px; + .border-radius(5px); + } +} +.icon-4x { + font-size: 4em; + &.icon-border { + border-width: 4px; + .border-radius(6px); + } +} + +// Floats +// ------------------------- + +// Quick floats +.pull-right { float: right; } +.pull-left { float: left; } + +[class^="icon-"], +[class*=" icon-"] { + &.pull-left { + margin-right: .3em; + } + &.pull-right { + margin-left: .3em; + } +} + +.btn { + [class^="icon-"], + [class*=" icon-"] { + &.pull-left, &.pull-right { + &.icon-2x { margin-top: .18em; } + } + &.icon-spin.icon-large { line-height: .8em; } + } +} + +.btn.btn-small { + [class^="icon-"], + [class*=" icon-"] { + &.pull-left, &.pull-right { + &.icon-2x { margin-top: .25em; } + } + } +} + +.btn.btn-large { + [class^="icon-"], + [class*=" icon-"] { + margin-top: 0; // overrides bootstrap default + &.pull-left, &.pull-right { + &.icon-2x { margin-top: .05em; } + } + &.pull-left.icon-2x { margin-right: .2em; } + &.pull-right.icon-2x { margin-left: .2em; } + } +} + + +.icon-spin { + display: inline-block; + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + -webkit-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; +} + +@-moz-keyframes spin { + 0% { -moz-transform: rotate(0deg); } + 100% { -moz-transform: rotate(359deg); } +} +@-webkit-keyframes spin { + 0% { -webkit-transform: rotate(0deg); } + 100% { -webkit-transform: rotate(359deg); } +} +@-o-keyframes spin { + 0% { -o-transform: rotate(0deg); } + 100% { -o-transform: rotate(359deg); } +} +@-ms-keyframes spin { + 0% { -ms-transform: rotate(0deg); } + 100% { -ms-transform: rotate(359deg); } +} +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(359deg); } +} + +@-moz-document url-prefix() { + .icon-spin { height: .9em; } + .btn .icon-spin { height: auto; } + .icon-spin.icon-large { height: 1.25em; } + .btn .icon-spin.icon-large { height: .75em; } +} + +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */.icon-external-link:before { content: "\f021"; } +.icon-globe:before { content: "\f022"; } +.icon-link:before { content: "\f023"; } diff --git a/Qmind/Resources/Fontawesome/fontawesome.sass b/Qmind/Resources/Fontawesome/fontawesome.sass new file mode 100644 index 0000000..9720059 --- /dev/null +++ b/Qmind/Resources/Fontawesome/fontawesome.sass @@ -0,0 +1,264 @@ +/*! + * Font Awesome 3.0.2 + * the iconic font designed for use with Twitter Bootstrap + * ------------------------------------------------------- + * The full suite of pictographic icons, examples, and documentation + * can be found at: http://fortawesome.github.com/Font-Awesome/ + * + * License + * ------------------------------------------------------- + * - The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL + * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License - + * http://opensource.org/licenses/mit-license.html + * - The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/ + * - Attribution is no longer required in Font Awesome 3.0, but much appreciated: + * "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome" + * + * Contact + * ------------------------------------------------------- + * Email: dave@davegandy.com + * Twitter: http://twitter.com/fortaweso_me + * Work: Lead Product Designer @ http://kyruus.com + */ + +$fontAwesomePath: "" !default +$borderColor: #eee +$iconMuted: #eee +@mixin border-radius($radius) + -webkit-border-radius: $radius + -moz-border-radius: $radius + border-radius: $radius + + +@font-face + font-family: 'FontAwesome' + src: url('#{$fontAwesomePath}/fontawesome-webfont.eot?v=3.0.1') + src: url('#{$fontAwesomePath}/fontawesome-webfont.eot?#iefix&v=3.0.1') format("embedded-opentype"), url('#{$fontAwesomePath}/fontawesome-webfont.woff?v=3.0.1') format("woff"), url('#{$fontAwesomePath}/fontawesome-webfont.ttf?v=3.0.1') format("truetype") + font-weight: normal + font-style: normal + + +/* Font Awesome styles + * ------------------------------------------------------- + +[class^="icon-"], +[class*=" icon-"] + font-family: FontAwesome + font-weight: normal + font-style: normal + text-decoration: inherit + -webkit-font-smoothing: antialiased + + /* sprites.less reset */ + display: inline + width: auto + height: auto + line-height: normal + vertical-align: baseline + background-image: none + background-position: 0% 0% + background-repeat: repeat + margin-top: 0 + +/* more sprites.less reset */ +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"] + background-image: none + +[class^="icon-"]:before, +[class*=" icon-"]:before + text-decoration: inherit + display: inline-block + speak: none + +/* makes sure icons active on rollover in links */ +a + [class^="icon-"], + [class*=" icon-"] + display: inline-block + +/* makes the font 33% larger relative to the icon container */ +.icon-large:before + vertical-align: -10% + font-size: 1.3333333333333333em + +.btn, .nav + [class^="icon-"], + [class*=" icon-"] + display: inline + /* keeps button heights with and without icons the same */ + &.icon-large + line-height: .9em + &.icon-spin + display: inline-block + +.nav-tabs, .nav-pills + [class^="icon-"], + [class*=" icon-"] + /* keeps button heights with and without icons the same */ + line-height: .9em + &.icon-large + line-height: .9em + +li, .nav li + [class^="icon-"], + [class*=" icon-"] + display: inline-block + width: 1.25em + text-align: center + &.icon-large + /* increased font size for icon-large */ + width: 1.5625em + +ul.icons + list-style-type: none + text-indent: -.75em + li + [class^="icon-"], + [class*=" icon-"] + width: .75em + +.icon-muted + color: $iconMuted + +// Icon Borders +// ------------------------- + +.icon-border + border: solid 1px $borderColor + padding: .2em .25em .15em + @include border-radius(3px) + +// Icon Sizes +// ------------------------- + +.icon-2x + font-size: 2em + &.icon-border + border-width: 2px + @include border-radius(4px) + +.icon-3x + font-size: 3em + &.icon-border + border-width: 3px + @include border-radius(5px) + +.icon-4x + font-size: 4em + &.icon-border + border-width: 4px + @include border-radius(6px) + +// Floats +// ------------------------- + +// Quick floats +.pull-right + float: right +.pull-left + float: left + +[class^="icon-"], +[class*=" icon-"] + &.pull-left + margin-right: .3em + &.pull-right + margin-left: .3em + +.btn + [class^="icon-"], + [class*=" icon-"] + &.pull-left, &.pull-right + &.icon-2x + margin-top: .18em + &.icon-spin.icon-large + line-height: .8em + +.btn.btn-small + [class^="icon-"], + [class*=" icon-"] + &.pull-left, &.pull-right + &.icon-2x + margin-top: .25em + +.btn.btn-large + [class^="icon-"], + [class*=" icon-"] + margin-top: 0 // overrides bootstrap default + &.pull-left, &.pull-right + &.icon-2x + margin-top: .05em + &.pull-left.icon-2x + margin-right: .2em + &.pull-right.icon-2x + margin-left: .2em + + +.icon-spin + display: inline-block + -moz-animation: spin 2s infinite linear + -o-animation: spin 2s infinite linear + -webkit-animation: spin 2s infinite linear + animation: spin 2s infinite linear + +@-moz-keyframes spin + 0% + -moz-transform: rotate(0deg) + 100% + -moz-transform: rotate(359deg) + +@-webkit-keyframes spin + 0% + -webkit-transform: rotate(0deg) + 100% + -webkit-transform: rotate(359deg) + +@-o-keyframes spin + 0% + -o-transform: rotate(0deg) + 100% + -o-transform: rotate(359deg) + +@-ms-keyframes spin + 0% + -ms-transform: rotate(0deg) + 100% + -ms-transform: rotate(359deg) + +@keyframes spin + 0% + transform: rotate(0deg) + 100% + transform: rotate(359deg) + +@-moz-document url-prefix() + .icon-spin + height: .9em + .btn .icon-spin + height: auto + .icon-spin.icon-large + height: 1.25em + .btn .icon-spin.icon-large + height: .75em + +.icon-external-link:before + content: "\f021" + +.icon-globe:before + content: "\f022" + +.icon-link:before + content: "\f023" + diff --git a/Qmind/Resources/Fontawesome/fontawesome.scss b/Qmind/Resources/Fontawesome/fontawesome.scss new file mode 100644 index 0000000..3db98c0 --- /dev/null +++ b/Qmind/Resources/Fontawesome/fontawesome.scss @@ -0,0 +1,266 @@ +/*! + * Font Awesome 3.0.2 + * the iconic font designed for use with Twitter Bootstrap + * ------------------------------------------------------- + * The full suite of pictographic icons, examples, and documentation + * can be found at: http://fortawesome.github.com/Font-Awesome/ + * + * License + * ------------------------------------------------------- + * - The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL + * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License - + * http://opensource.org/licenses/mit-license.html + * - The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/ + * - Attribution is no longer required in Font Awesome 3.0, but much appreciated: + * "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome" + * + * Contact + * ------------------------------------------------------- + * Email: dave@davegandy.com + * Twitter: http://twitter.com/fortaweso_me + * Work: Lead Product Designer @ http://kyruus.com + */ + +$fontAwesomePath: "" !default; +$borderColor: #eee; +$iconMuted: #eee; +@mixin border-radius($radius) { -webkit-border-radius: $radius; -moz-border-radius: $radius; border-radius: $radius; } + + +@font-face { + font-family: 'FontAwesome'; + src: url('#{$fontAwesomePath}/fontawesome-webfont.eot?v=3.0.1'); + src: url('#{$fontAwesomePath}/fontawesome-webfont.eot?#iefix&v=3.0.1') format("embedded-opentype"), + url('#{$fontAwesomePath}/fontawesome-webfont.woff?v=3.0.1') format("woff"), + url('#{$fontAwesomePath}/fontawesome-webfont.ttf?v=3.0.1') format("truetype"); + font-weight: normal; + font-style: normal; +} + +/* Font Awesome styles + ------------------------------------------------------- */ +[class^="icon-"], +[class*=" icon-"] { + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + text-decoration: inherit; + -webkit-font-smoothing: antialiased; + + /* sprites.less reset */ + display: inline; + width: auto; + height: auto; + line-height: normal; + vertical-align: baseline; + background-image: none; + background-position: 0% 0%; + background-repeat: repeat; + margin-top: 0; +} + +/* more sprites.less reset */ +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"] { + background-image: none; +} + +[class^="icon-"]:before, +[class*=" icon-"]:before { + text-decoration: inherit; + display: inline-block; + speak: none; +} + +/* makes sure icons active on rollover in links */ +a { + [class^="icon-"], + [class*=" icon-"] { + display: inline-block; + } +} + +/* makes the font 33% larger relative to the icon container */ +.icon-large:before { + vertical-align: -10%; + font-size: 1.3333333333333333em; +} + +.btn, .nav { + [class^="icon-"], + [class*=" icon-"] { + display: inline; + /* keeps button heights with and without icons the same */ + &.icon-large { line-height: .9em; } + &.icon-spin { display: inline-block; } + } +} + +.nav-tabs, .nav-pills { + [class^="icon-"], + [class*=" icon-"] { + /* keeps button heights with and without icons the same */ + &, &.icon-large { line-height: .9em; } + } +} + +li, .nav li { + [class^="icon-"], + [class*=" icon-"] { + display: inline-block; + width: 1.25em; + text-align: center; + &.icon-large { + /* increased font size for icon-large */ + width: 1.5625em; + } + } +} + +ul.icons { + list-style-type: none; + text-indent: -.75em; + + li { + [class^="icon-"], + [class*=" icon-"] { + width: .75em; + } + } +} + +.icon-muted { + color: $iconMuted; +} + +// Icon Borders +// ------------------------- + +.icon-border { + border: solid 1px $borderColor; + padding: .2em .25em .15em; + @include border-radius(3px); +} + +// Icon Sizes +// ------------------------- + +.icon-2x { + font-size: 2em; + &.icon-border { + border-width: 2px; + @include border-radius(4px); + } +} +.icon-3x { + font-size: 3em; + &.icon-border { + border-width: 3px; + @include border-radius(5px); + } +} +.icon-4x { + font-size: 4em; + &.icon-border { + border-width: 4px; + @include border-radius(6px); + } +} + +// Floats +// ------------------------- + +// Quick floats +.pull-right { float: right; } +.pull-left { float: left; } + +[class^="icon-"], +[class*=" icon-"] { + &.pull-left { + margin-right: .3em; + } + &.pull-right { + margin-left: .3em; + } +} + +.btn { + [class^="icon-"], + [class*=" icon-"] { + &.pull-left, &.pull-right { + &.icon-2x { margin-top: .18em; } + } + &.icon-spin.icon-large { line-height: .8em; } + } +} + +.btn.btn-small { + [class^="icon-"], + [class*=" icon-"] { + &.pull-left, &.pull-right { + &.icon-2x { margin-top: .25em; } + } + } +} + +.btn.btn-large { + [class^="icon-"], + [class*=" icon-"] { + margin-top: 0; // overrides bootstrap default + &.pull-left, &.pull-right { + &.icon-2x { margin-top: .05em; } + } + &.pull-left.icon-2x { margin-right: .2em; } + &.pull-right.icon-2x { margin-left: .2em; } + } +} + + +.icon-spin { + display: inline-block; + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + -webkit-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; +} + +@-moz-keyframes spin { + 0% { -moz-transform: rotate(0deg); } + 100% { -moz-transform: rotate(359deg); } +} +@-webkit-keyframes spin { + 0% { -webkit-transform: rotate(0deg); } + 100% { -webkit-transform: rotate(359deg); } +} +@-o-keyframes spin { + 0% { -o-transform: rotate(0deg); } + 100% { -o-transform: rotate(359deg); } +} +@-ms-keyframes spin { + 0% { -ms-transform: rotate(0deg); } + 100% { -ms-transform: rotate(359deg); } +} +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(359deg); } +} + +@-moz-document url-prefix() { + .icon-spin { height: .9em; } + .btn .icon-spin { height: auto; } + .icon-spin.icon-large { height: 1.25em; } + .btn .icon-spin.icon-large { height: .75em; } +}.icon-external-link:before { content: "\f021"; } +.icon-globe:before { content: "\f022"; } +.icon-link:before { content: "\f023"; } diff --git a/Qmind/Resources/Fontawesome/icon-reference.html b/Qmind/Resources/Fontawesome/icon-reference.html new file mode 100644 index 0000000..9870501 --- /dev/null +++ b/Qmind/Resources/Fontawesome/icon-reference.html @@ -0,0 +1,31 @@ + + + + + icnfnt generated subset of FontAwesome 3.0.2 + + + + + + +
.icon-external-link
.icon-globe
.icon-link
\ No newline at end of file diff --git a/Qmind/Resources/fontawesome-webfont.ttf b/Qmind/Resources/fontawesome-webfont.ttf deleted file mode 100644 index 780d3d5..0000000 Binary files a/Qmind/Resources/fontawesome-webfont.ttf and /dev/null differ diff --git a/Qmind/en.lproj/Document.xib b/Qmind/en.lproj/Document.xib index 3cd6f80..ceaa45f 100644 --- a/Qmind/en.lproj/Document.xib +++ b/Qmind/en.lproj/Document.xib @@ -1,1451 +1,249 @@ - - - - 1070 - 12C60 - 3084 - 1187.34 - 625.00 - - com.apple.InterfaceBuilder.CocoaPlugin - 3084 - - - NSArrayController - NSButton - NSButtonCell - NSCollectionView - NSCollectionViewItem - NSCustomObject - NSCustomView - NSMenu - NSMenuItem - NSPopUpButton - NSPopUpButtonCell - NSScrollView - NSScroller - NSSegmentedCell - NSSegmentedControl - NSSplitView - NSToolbar - NSToolbarFlexibleSpaceItem - NSToolbarItem - NSToolbarSeparatorItem - NSToolbarSpaceItem - NSView - NSWindowTemplate - - - com.apple.InterfaceBuilder.CocoaPlugin - - - PluginDependencyRecalculationVersion - - - - - QMDocumentWindowController - - - FirstResponder - - - 15 - 2 - {{91, 641}, {658, 480}} - 1886912512 - Window - NSWindow - - - B2218652-02BF-40A9-9C0F-E6868E77F9F6 - - - YES - YES - YES - NO - 2 - 1 - - - - 1E86F6F5-03DD-46EE-8149-D304804FDFBA - - Delete Node - Delete Node - - - - 268 - {{21, 14}, {32, 28}} - _NS:9 - YES - - 67108864 - 134217728 - - - LucidaGrande - 13 - 1044 - - _NS:9 - - -2033958912 - 35 - - NSImage - ToolbarDeleteNodeTemplate - - - - 200 - 25 - - NO - - - - - {32, 25} - {32, 28} - YES - YES - 0 - YES - 0 - - - - 756DF150-E14F-467B-A301-62A7F345D3F4 - - New Node - New Node - - - - 268 - {{11, 14}, {40, 28}} - _NS:9 - YES - - -2080374720 - 2048 - - _NS:9 - - -2034221056 - 35 - - - 400 - 75 - - - YES - - - 1048576 - 2147483647 - 1 - - NSImage - ToolbarNewNodeTemplate - - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - _popUpItemAction: - - - YES - - OtherViews - - - - - New Child - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - New Left Child - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - New Next Sibling - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - New Previous Sibling - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - - YES - 1 - YES - YES - 2 - - NO - - - - - {40, 25} - {40, 28} - YES - YES - 0 - YES - 0 - - - - D974FF83-A0B2-4CBA-B1FC-24FA81CD7F81 - - Icons - Icons - - - - 268 - {{2, 14}, {32, 28}} - _NS:9 - YES - - 67108864 - 134217728 - :-) - - _NS:9 - - 914505728 - 163 - - - 200 - 25 - - NO - - - - - {32, 25} - {32, 28} - YES - YES - 0 - YES - 0 - - - - DF6C68B1-F59E-4A47-9EEC-BA397D4D3FDA - - Zoom - Zoom - - - - 268 - {{0, 14}, {104, 28}} - _NS:9 - YES - - 67108864 - 0 - - LucidaGrande - 13 - 16 - - _NS:9 - - - - 32 - - NSImage - ToolbarZoomOutTemplate - - 2 - - - 32 - - NSImage - ToolbarZoomActualSizeTemplate - - 1 - 2 - - - 32 - - NSImage - ToolbarZoomInTemplate - - 2 - 2 - - - 1 - 2 - 2 - - NO - - - - - {104, 25} - {104, 28} - YES - YES - 0 - YES - 0 - - - NSToolbarCustomizeToolbarItem - Customize - Customize - Customize Toolbar - - - NSImage - NSToolbarCustomize - - - runToolbarCustomizationPalette: - {0, 0} - {0, 0} - YES - YES - -1 - YES - 0 - - - NSToolbarFlexibleSpaceItem - - Flexible Space - - - - - - {1, 5} - {20000, 32} - YES - YES - -1 - YES - 0 - - YES - YES - - - 1048576 - 2147483647 - - - - - - NSToolbarSeparatorItem - - Separator - - - - - - {12, 5} - {12, 1000} - YES - YES - -1 - YES - 0 - - YES - YES - - - 1048576 - 2147483647 - - - - - - NSToolbarSpaceItem - - Space - - - - - - {32, 5} - {32, 32} - YES - YES - -1 - YES - 0 - - YES - YES - - - 1048576 - 2147483647 - - - - - - - - - - - - - - - - - - - - - - - - - - {300, 200} - - - 256 - - - - 274 - - - - 274 - - - - 2304 - - - - 268 - {163, 96} - - - - _NS:1192 - QMMindmapView - - - {581, 480} - - - - _NS:11 - - - 1 - MSAxIDEAA - - 4 - - - - -2147483392 - {{566, 0}, {15, 465}} - - - - _NS:26 - NO - - _doScroller: - 1 - 0.96363627910614014 - - - - -2147483392 - {{0, 465}, {566, 15}} - - - - _NS:30 - NO - 1 - - _doScroller: - 0.50602412223815918 - - - {581, 480} - - - - _NS:9 - 133680 - - - - 0.25 - 4 - 1 - - - - 256 - - - - 2304 - - - - 274 - {76, 480} - - - - _NS:80 - {0, 0} - {0, 0} - 0 - 0 - - - 6 - System - controlBackgroundColor - - 3 - MC42NjY2NjY2NjY3AA - - - - YES - -1 - 0 - - - {76, 480} - - - - _NS:78 - - - 6 - System - controlColor - - - 4 - - - - -2147483392 - {{61, 0}, {15, 480}} - - - - _NS:82 - NO - - _doScroller: - 1 - 0.89655172824859619 - - - - -2147483392 - {{-100, -100}, {61, 15}} - - - - _NS:91 - NO - 1 - - _doScroller: - 0.63157892227172852 - - - {{582, 0}, {76, 480}} - - - - _NS:76 - 133648 - - - - 0.25 - 4 - 1 - - - {658, 480} - - - - YES - 2 - - - {658, 480} - - - - - {{0, 0}, {1920, 1178}} - {300, 255} - {10000000000000, 10000000000000} - 128 - YES - - - NSApplication - - - IconCollectionViewItem - - - - unicode - image - - QMIcon - - YES - YES - - - - - - - Delete Icon - - 2147483647 - - - 1000 - - - - Delete All Icons - - 2147483647 - - - 1100 - - - - - - - - - window - - - - 18 - - - - availableIconsArrayController - - - - 100192 - - - - mindmapScrollView - - - - 100121 - - - - mindmapView - - - - 100090 - - - - iconsPaneButton - - - - 100196 - - - - splitView - - - - 100198 - - - - iconsPaneToggleAction: - - - - 100199 - - - - iconsPaneView - - - - 100214 - - - - zoomByMode: - - - - 100094 - - - - deleteSelectedNodes: - - - - 100111 - - - - newLeftChildNode: - - - - 100114 - - - - newNextSiblingNode: - - - - 100115 - - - - newChildNode: - - - - 100119 - - - - newPreviousSiblingNode: - - - - 100120 - - - - delegate - - - - 100122 - - - - menu - - - - 100222 - - - - itemPrototype - - - - 100139 - - - - content: arrangedObjects - - - - - - content: arrangedObjects - content - arrangedObjects - 2 - - - 100188 - - - - delegate - - - - 100195 - - - - mindmapView - - - - 100213 - - - - mindmapView - - - - 100211 - - - - contentArray: availableIconsArray - - - - - - contentArray: availableIconsArray - contentArray - availableIconsArray - 2 - - - 100186 - - - - delegate - - - - 100194 - - - - - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - 5 - - - - - - - Mindmap Document Window - - - 6 - - - - - - - - -3 - - - Application - - - 100064 - - - - - - - - - - - - - - - 100068 - - - - - 100069 - - - - - 100070 - - - - - 100071 - - - - - 100093 - - - - - - - - 100091 - - - - - - - - 100092 - - - - - 100105 - - - - - - - - 100099 - - - - - - - - 100100 - - - - - - - - 100101 - - - - - - - - - - - - 100104 - - - - - 100103 - - - - - 100102 - - - - - 100108 - - - - - - - - 100106 - - - - - - - - 100107 - - - - - 100109 - - - - - 100110 - - - - - 100137 - - - Icon Collection View Item - - - 100168 - - - - - - - - 100166 - - - - - - - - 100167 - - - - - 100169 - - - Available Icons Array Controller - - - 100193 - - - - - - - - - 100031 - - - - - - - - - - 100026 - - - - - 100034 - - - - - 100033 - - - - - 100133 - - - - - - - - - - 100136 - - - - - 100135 - - - - - 100134 - - - - - 100215 - - - - - - - - - 100217 - - - - - 100218 - - - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - ZoomToolbarItem - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - NewNodeToolbarItem - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - DeleteNodeToolbarItem - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - QMIconsPaneView - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - QMIconCollectionViewItem - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{133, 170}, {507, 413}} - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - 100222 - - - - - QMDocumentWindowController - NSWindowController - - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - - - - clearSelection: - id - - - collapseNodeAction: - id - - - copy: - id - - - cut: - id - - - deleteSelectedNodes: - id - - - expandNodeAction: - id - - - iconsPaneToggleAction: - id - - - newChildNode: - id - - - newLeftChildNode: - id - - - newNextSiblingNode: - id - - - newPreviousSiblingNode: - id - - - paste: - id - - - pasteAsNextSibling: - id - - - pasteAsPreviousSibling: - id - - - pasteLeft: - id - - - zoomByMode: - id - - - zoomInView: - id - - - zoomOutView: - id - - - zoomToActualSize: - id - - - - NSArrayController - NSButton - QMIconsPaneView - QMMindmapView - NSSplitView - - - - availableIconsArrayController - NSArrayController - - - iconsPaneButton - NSButton - - - iconsPaneView - QMIconsPaneView - - - mindmapView - QMMindmapView - - - splitView - NSSplitView - - - - IBProjectSource - ./Classes/QMDocumentWindowController.h - - - - QMIconCollectionViewItem - NSCollectionViewItem - - IBProjectSource - ./Classes/QMIconCollectionViewItem.h - - - - QMIconsPaneView - NSCollectionView - - mindmapView - QMMindmapView - - - mindmapView - - mindmapView - QMMindmapView - - - - IBProjectSource - ./Classes/QMIconsPaneView.h - - - - QMMindmapView - NSView - - IBProjectSource - ./Classes/QMMindmapView.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - YES - 3 - - {11, 11} - {10, 3} - {32, 32} - {128, 128} - {128, 128} - {128, 128} - {128, 128} - {128, 128} - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + unicode + image + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/QmindTest/CellEditorTest.m b/QmindTest/CellEditorTest.m index 9ef5448..0ebd6ac 100644 --- a/QmindTest/CellEditorTest.m +++ b/QmindTest/CellEditorTest.m @@ -1,7 +1,8 @@ /** - * Tae Won Ha + * Tae Won Ha — @hataewon + * + * http://taewon.de * http://qvacua.com - * https://github.com/qvacua * * See LICENSE */ @@ -9,67 +10,64 @@ #import "QMBaseTestCase.h" #import "QMCellEditor.h" #import "QMBaseTestCase+Util.h" -#import #import "QMMindmapView.h" +#import "QMBorderedView.h" + @interface CellEditorTest : QMBaseTestCase @end @implementation CellEditorTest { - QMCellEditor *editor; + QMCellEditor *editor; - QMMindmapView *view; - NSWindow *window; + QMMindmapView *view; + NSWindow *window; - QMRootCell *rootCell; + QMRootCell *rootCell; } - (void)setUp { - [super setUp]; + [super setUp]; - view = mock([QMMindmapView class]); - window = mock([NSWindow class]); - [given([view window]) willReturn:window]; + view = mock([QMMindmapView class]); + window = mock([NSWindow class]); + [given([view window]) willReturn:window]; - rootCell = [self rootCellForTestWithView:view]; + rootCell = [self rootCellForTestWithView:view]; - editor = [[QMCellEditor alloc] init]; - editor.view = view; - editor.delegate = view; + editor = [[QMCellEditor alloc] init]; + editor.view = view; + editor.delegate = view; } - (void)testBeginEditing { - [editor beginEditStringValueForCell:CELL(4)]; - assertThat(editor.currentlyEditedCell, is(CELL(4))); + [editor beginEditStringValueForCell:CELL(4)]; + assertThat(editor.currentlyEditedCell, is(CELL(4))); - [verify(view) addSubview:instanceOf([QShadowedView class])]; - [verify(window) makeFirstResponder:instanceOf([NSTextView class])]; + assertThat(@(editor.editorView.isHidden), is(@NO)); + [verify(window) makeFirstResponder:instanceOf([NSTextField class])]; } - (void)testEndEditing { - NSUndoManager *const undoManager = [editor undoManagerForTextView:nil]; - [undoManager registerUndoWithTarget:self selector:@selector(testEndEditing) object:self]; - - [editor beginEditStringValueForCell:CELL(4)]; - [editor textDidEndEditing:nil]; - - [verify(view) editingEndedWithString:instanceOf([NSAttributedString class]) forCell:CELL(4) byChar:NSCarriageReturnCharacter]; - assertThat(editor.currentlyEditedCell, nilValue()); - [verify(window) makeFirstResponder:view]; + [editor beginEditStringValueForCell:CELL(4)]; + [editor controlTextDidEndEditing:nil]; - assertThatBool([undoManager canUndo], isFalse); + [verify(view) editingEndedWithString:instanceOf([NSAttributedString class]) forCell:CELL(4) byChar:NSCarriageReturnCharacter]; + assertThat(@(editor.editorView.isHidden), is(@YES)); + assertThat(editor.currentlyEditedCell, nilValue()); + [verify(window) makeFirstResponder:view]; } - (void)testIsEditing { - [editor beginEditStringValueForCell:CELL(4)]; - assertThatBool([editor isEditing], isTrue); + [editor beginEditStringValueForCell:CELL(4)]; + assertThat(@(editor.editing), isYes); - [editor textDidEndEditing:nil]; - assertThatBool([editor isEditing], isFalse); + [editor controlTextDidEndEditing:nil]; + assertThat(@(editor.editing), isNo); } - (void)testCancelEditing { - // TODO ? + // TODO ? } @end diff --git a/QmindTest/DocumentTest.m b/QmindTest/DocumentTest.m index d829883..06d2f37 100644 --- a/QmindTest/DocumentTest.m +++ b/QmindTest/DocumentTest.m @@ -543,7 +543,7 @@ - (void)testDeleteAllIcons { [NODE(1) addObjectInIcons:@"icon3"]; [doc deleteAllIconsOfItem:NODE(1)]; - assertThat([NODE(1) icons], is(empty())); + assertThat([NODE(1) icons], isEmpty()); } - (void)testItemNewlyCreated { diff --git a/QmindTest/MindmapReaderTest.m b/QmindTest/MindmapReaderTest.m index d5ebaa9..d04e831 100644 --- a/QmindTest/MindmapReaderTest.m +++ b/QmindTest/MindmapReaderTest.m @@ -67,34 +67,37 @@ - (void)testRead { [self checkLeftChildren:rootNode]; } -- (void)checkLeftChildren:(QMRootNode *)rootNode { - NSArray *leftChildren = rootNode.leftChildren; +- (void)checkLeftChildren:(QMRootNode *)aRootNode { + NSArray *leftChildren = aRootNode.leftChildren; - QMNode *firstChild = [leftChildren objectAtIndex:0]; + QMNode *firstChild = leftChildren[0]; assertThat(firstChild.stringValue, is(@"A")); assertThat(firstChild.children, hasSize(2)); NSArray *childrenOfA = firstChild.children; - QMNode *firstGrand = [childrenOfA objectAtIndex:0]; + QMNode *firstGrand = childrenOfA[0]; assertThat(firstGrand.stringValue, is(@"A1")); assertThat(firstGrand.children, hasSize(3)); - assertThat([[childrenOfA objectAtIndex:1] stringValue], is(@"A2")); + assertThat([childrenOfA[1] stringValue], is(@"A2")); - QMNode *secondChild = [leftChildren objectAtIndex:1]; - assertThat([secondChild stringValue], is(@"B")); + QMNode *secondChild = leftChildren[1]; + assertThat(firstChild.link, is([NSString stringWithFormat:@"#%@", secondChild.nodeId])); + assertThat(secondChild.stringValue, is(@"B")); - QMNode *thirdChild = [leftChildren objectAtIndex:2]; - assertThat([thirdChild stringValue], is(@"C")); - assertThat([thirdChild children], hasSize(2)); + QMNode *thirdChild = leftChildren[2]; + assertThat(thirdChild.stringValue, is(@"C")); + assertThat(thirdChild.link, is(nilValue())); + assertThat(thirdChild.children, hasSize(2)); } -- (void)checkRightChildren:(QMRootNode *)rootNode { - NSArray *rightChildren = rootNode.children;; +- (void)checkRightChildren:(QMRootNode *)aRootNode { + NSArray *rightChildren = aRootNode.children;; // first child of the root QMNode *firstChild = [rightChildren objectAtIndex:0]; assertThat(firstChild.stringValue, is(@"a")); + assertThat(firstChild.link, is(@"http://google.de")); NSFont *firstFont = firstChild.font; assertThat(firstFont, notNilValue()); @@ -110,6 +113,7 @@ - (void)checkRightChildren:(QMRootNode *)rootNode { // children of the first child QMNode *childOfA = [firstChild objectInChildrenAtIndex:0]; QMNode *grandChildOfA = [childOfA objectInChildrenAtIndex:0]; + assertThat(childOfA.link, is(nilValue())); assertThat(grandChildOfA.stringValue, is(@"a1a")); // second child of the root @@ -121,14 +125,14 @@ - (void)checkRightChildren:(QMRootNode *)rootNode { assertThat(@([secondChild countOfChildren]), is(@(4))); - QMNode *thirdChild = [rootNode objectInChildrenAtIndex:2]; + QMNode *thirdChild = [aRootNode objectInChildrenAtIndex:2]; assertThat(thirdChild.children, hasSize(3)); assertThat(@([thirdChild isLeaf]), isNo); assertThat([[thirdChild objectInChildrenAtIndex:1] icons], consistsOf(@"kmail")); - assertThat(@([[rootNode objectInChildrenAtIndex:3] isLeaf]), isYes); + assertThat(@([[aRootNode objectInChildrenAtIndex:3] isLeaf]), isYes); - QMNode *fifthChild = [rootNode objectInChildrenAtIndex:4]; + QMNode *fifthChild = [aRootNode objectInChildrenAtIndex:4]; assertThat(@([fifthChild isLeaf]), isNo); assertThat(@([fifthChild isFolded]), isYes); assertThat(fifthChild.children, hasSize(2)); diff --git a/QmindTest/MindmapWriterTest.m b/QmindTest/MindmapWriterTest.m index f0df87d..b499adf 100644 --- a/QmindTest/MindmapWriterTest.m +++ b/QmindTest/MindmapWriterTest.m @@ -96,6 +96,7 @@ - (void)checkLeftChildren:(QMRootNode *)aRootNode { assertThat([[childrenOfA objectAtIndex:1] stringValue], is(@"A2")); QMNode *secondChild = [leftChildren objectAtIndex:1]; + assertThat(firstChild.link, is([NSString stringWithFormat:@"#%@", secondChild.nodeId])); assertThat([secondChild stringValue], is(@"B")); QMNode *thirdChild = [leftChildren objectAtIndex:2]; diff --git a/QmindTest/QMBaseTestCase.h b/QmindTest/QMBaseTestCase.h index a5352e6..f9d8670 100644 --- a/QmindTest/QMBaseTestCase.h +++ b/QmindTest/QMBaseTestCase.h @@ -6,7 +6,7 @@ * See LICENSE */ -#import +#import #define HC_SHORTHAND #import @@ -20,7 +20,7 @@ #define consistsOf(...) contains(__VA_ARGS__, nil) #define consistsOfInAnyOrder(...) containsInAnyOrder(__VA_ARGS__, nil) -#define FAIL STFail(@"yet to be implemented") +#define FAIL XCTFail(@"yet to be implemented") -@interface QMBaseTestCase : SenTestCase @end +@interface QMBaseTestCase : XCTestCase @end diff --git a/QmindTest/CellSizeManagerTest.m b/QmindTest/QMCellSizeManagerTest.m similarity index 90% rename from QmindTest/CellSizeManagerTest.m rename to QmindTest/QMCellSizeManagerTest.m index cd19de6..61bc1eb 100644 --- a/QmindTest/CellSizeManagerTest.m +++ b/QmindTest/QMCellSizeManagerTest.m @@ -16,10 +16,10 @@ #import "QMRootCell.h" #import "QMIcon.h" -@interface CellSizeManagerTest : QMBaseTestCase +@interface QMCellSizeManagerTest : QMBaseTestCase @end -@implementation CellSizeManagerTest { +@implementation QMCellSizeManagerTest { QMCellSizeManager *manager; QMTextLayoutManager *textLayoutManager; QMAppSettings *settings; @@ -34,9 +34,11 @@ @implementation CellSizeManagerTest { CGFloat maxWidth; CGFloat sizeOfIcon; + CGFloat sizeOfLinkIcon; CGFloat horPadding; CGFloat vertPadding; CGFloat interIconDist; + CGFloat linkIconMargin; CGFloat minHeight; CGFloat minWidth; CGFloat iconTextDist; @@ -78,7 +80,9 @@ - (void)setUp { rootCellMaxWidth = [settings floatForKey:qSettingMaxRootCellTextWidth]; sizeOfIcon = [settings floatForKey:qSettingIconDrawSize]; + sizeOfLinkIcon = [settings floatForKey:qSettingLinkIconDrawSize]; interIconDist = [settings floatForKey:qSettingInterIconDistance]; + linkIconMargin = [settings floatForKey:qSettingLinkIconHorizontalMargin]; iconTextDist = [settings floatForKey:qSettingIconTextDistance]; horPadding = [settings floatForKey:qSettingCellHorizontalPadding]; @@ -186,6 +190,27 @@ - (void)testSize7 { [verify(textLayoutManager) sizeOfAttributedString:rootCell.attributedString maxWidth:rootCellMaxWidth]; } +- (void)testSize8 { + [given([textLayoutManager sizeOfAttributedString:cell.attributedString maxWidth:maxWidth]) willReturnSize:NewSize(5, 50)]; + + [cell addObjectInIcons:@"1"]; + [cell addObjectInIcons:@"2"]; + [cell addObjectInIcons:@"3"]; + [cell addObjectInIcons:@"4"]; + + cell.link = [NSURL URLWithString:@"http://qvacua.com"]; + + assertThatSize([manager sizeOfCell:cell], equalToSize(NewSize(1 * sizeOfLinkIcon + 1 * linkIconMargin + 4 * sizeOfIcon + 3 * interIconDist + iconTextDist + 2 * horPadding + 5, 50 + 2 * vertPadding))); +} + +- (void)testSize9 { + [given([textLayoutManager sizeOfAttributedString:cell.attributedString maxWidth:maxWidth]) willReturnSize:NewSize(5, 5)]; + + cell.link = [NSURL URLWithString:@"http://qvacua.com"]; + + assertThatSize([manager sizeOfCell:cell], equalToSize(NewSize(1 * sizeOfLinkIcon + 1 * linkIconMargin + 2 * horPadding + 5, sizeOfLinkIcon + 2 * vertPadding))); +} + - (void)testFamilySize1 { [cell addObjectInChildren:childCell1]; [cell addObjectInChildren:childCell2]; diff --git a/QmindTest/CellTest.m b/QmindTest/QMCellTest.m similarity index 99% rename from QmindTest/CellTest.m rename to QmindTest/QMCellTest.m index 6f891a5..bb82039 100644 --- a/QmindTest/CellTest.m +++ b/QmindTest/QMCellTest.m @@ -16,9 +16,9 @@ #import "QMBaseTestCase.h" #import "QMIcon.h" -@interface CellTest : QMBaseTestCase @end +@interface QMCellTest : QMBaseTestCase @end -@implementation CellTest { +@implementation QMCellTest { QMMindmapView *view; QMCell *parentCell; @@ -315,7 +315,7 @@ - (void)testInitAndBasics { assertThat(cell.view, is(view)); assertThat(cell.parent, is(parentCell)); assertThat(cell.children, isNot(nilValue())); - assertThat(cell.children, is(empty())); + assertThat(cell.children, isEmpty()); assertThat(cell.stringValue, is(@"test")); assertThat(@(cell.isLeaf), isYes); assertThat(@(cell.isFolded), isYes); @@ -337,7 +337,7 @@ - (void)testInitAndBasicsLeft { assertThat(cell.view, is(view)); assertThat(cell.parent, is(parentCell)); assertThat(cell.children, isNot(nilValue())); - assertThat(cell.children, is(empty())); + assertThat(cell.children, isEmpty()); assertThat(cell.stringValue, is(@"test")); assertThat(@(cell.isLeaf), isYes); assertThat(@(cell.isFolded), isYes); diff --git a/QmindTest/IconTest.m b/QmindTest/QMIconTest.m similarity index 65% rename from QmindTest/IconTest.m rename to QmindTest/QMIconTest.m index 90a0881..0227b1f 100644 --- a/QmindTest/IconTest.m +++ b/QmindTest/QMIconTest.m @@ -14,11 +14,13 @@ #import "QMIconManager.h" #import "QMTextDrawer.h" #import "QMTextLayoutManager.h" +#import "QMFontManager.h" -@interface IconTest : QMCacaoTestCase + +@interface QMIconTest : QMCacaoTestCase @end -@implementation IconTest { +@implementation QMIconTest { QMAppSettings *settings; } @@ -42,6 +44,23 @@ - (void)testInit { assertThat(stringIcon.iconManager, is([self.context beanWithClass:[QMIconManager class]])); assertThat(stringIcon.textDrawer, is([self.context beanWithClass:[QMTextDrawer class]])); assertThat(stringIcon.textLayoutManager, is([self.context beanWithClass:[QMTextLayoutManager class]])); + assertThat(stringIcon.fontManager, is([self.context beanWithClass:[QMFontManager class]])); + assertThat(stringIcon.systemFontManager, is([self.context beanWithClass:[NSFontManager class]])); +} + +- (void)testInitAsLink { + QMIcon *linkIcon = [[QMIcon alloc] initAsLink]; + + assertThat(@(linkIcon.kind), is(@(QMIconKindFontawesome))); + assertThat(linkIcon.code, is(nilValue())); + assertThat(linkIcon.unicode, is(@"\\u%f023")); + + assertThat(linkIcon.settings, is([self.context beanWithClass:[QMAppSettings class]])); + assertThat(linkIcon.iconManager, is([self.context beanWithClass:[QMIconManager class]])); + assertThat(linkIcon.textDrawer, is([self.context beanWithClass:[QMTextDrawer class]])); + assertThat(linkIcon.textLayoutManager, is([self.context beanWithClass:[QMTextLayoutManager class]])); + assertThat(linkIcon.fontManager, is([self.context beanWithClass:[QMFontManager class]])); + assertThat(linkIcon.systemFontManager, is([self.context beanWithClass:[NSFontManager class]])); } - (void)testCopy { @@ -67,7 +86,6 @@ - (void)testFrame { QMIcon *icon = [[QMIcon alloc] initWithCode:@"list"]; icon.origin = NewPoint(1, 2); assertThatRect(icon.frame, equalToRect(NewRect(1, 2, [settings floatForKey:qSettingIconDrawSize], [settings floatForKey:qSettingIconDrawSize]))); - } @end diff --git a/QmindTest/QMMindmapViewComponentTest.m b/QmindTest/QMMindmapViewComponentTest.m index 364de60..d6f8d0e 100644 --- a/QmindTest/QMMindmapViewComponentTest.m +++ b/QmindTest/QMMindmapViewComponentTest.m @@ -424,8 +424,15 @@ - (void)testCellFamilyUpdateForInsertionOfLastNode { assertThatSize([LCELL(5) familySize], biggerThanSize(oldSize)); // left leaf + child + oldCount = [LNODE(5, 8) countOfChildren]; oldSize = [LCELL(5, 8) familySize]; [LNODE(5, 8) insertObject:[[QMNode alloc] init] inChildrenAtIndex:0]; + + // KVO here not working because doc->windowController and windowController->view are not properly set + [view updateCellFamilyForInsertionWithIdentifier:LNODE(5, 8)]; + rootCell = view.rootCell; + assertThat([LCELL(5, 8) children], hasSize(oldCount + 1)); + assertThatSize([LCELL(5, 8) familySize], biggerThanSize(oldSize)); } /** diff --git a/QmindTest/NodeTest.m b/QmindTest/QMNodeTest.m similarity index 97% rename from QmindTest/NodeTest.m rename to QmindTest/QMNodeTest.m index 8418f17..4f01649 100644 --- a/QmindTest/NodeTest.m +++ b/QmindTest/QMNodeTest.m @@ -12,10 +12,10 @@ #define INITIAL_STRING_VALUE @"initial value" -@interface NodeTest : QMBaseTestCase +@interface QMNodeTest : QMBaseTestCase @end -@implementation NodeTest { +@implementation QMNodeTest { QMNode *node; NSUndoManager *undoManager; @@ -77,6 +77,16 @@ - (void)testIsRoot { assertThat(@([node isRoot]), isNo); } +- (void)testLink { + QMNode *node = [[QMNode alloc] init]; + + node.link = @"http://link"; + assertThat(node.link, is(@"http://link")); + + node.link = @"#ID_..."; + assertThat(node.link, is(@"#ID_...")); +} + - (void)testAttributes { QMNode *node1 = [[QMNode alloc] init]; QMNode *node2 = [[QMNode alloc] init]; diff --git a/QmindTest/Resources/mindmap-reader-test.mm b/QmindTest/Resources/mindmap-reader-test.mm index 378f992..2234e24 100644 --- a/QmindTest/Resources/mindmap-reader-test.mm +++ b/QmindTest/Resources/mindmap-reader-test.mm @@ -14,7 +14,7 @@ - + @@ -60,7 +60,7 @@ - + @@ -68,7 +68,7 @@ - + diff --git a/QmindTest/Resources/mindmap-writer-test.mm b/QmindTest/Resources/mindmap-writer-test.mm index bd92025..cb2b7f4 100644 --- a/QmindTest/Resources/mindmap-writer-test.mm +++ b/QmindTest/Resources/mindmap-writer-test.mm @@ -54,7 +54,7 @@ - + diff --git a/qkit b/qkit index 2dcc92c..049e60c 160000 --- a/qkit +++ b/qkit @@ -1 +1 @@ -Subproject commit 2dcc92c9e9ba62a8bf21b478432287b93cb86e1e +Subproject commit 049e60c3705110079d62ee9078c845337fb1813f diff --git a/tbcacao b/tbcacao index dea2644..0f4ba9d 160000 --- a/tbcacao +++ b/tbcacao @@ -1 +1 @@ -Subproject commit dea2644d03af41e35fe905c124c8ac1578d58556 +Subproject commit 0f4ba9da32ee9223cc11e48b9ca0d3cbfc3e257f