summaryrefslogtreecommitdiff
path: root/tikzit/src/common/NodeStyle.m
diff options
context:
space:
mode:
authorrandomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64>2012-03-14 16:30:17 +0000
committerrandomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64>2012-03-14 16:30:17 +0000
commita1f668bffbea12453ecc330ec243f9f656582c57 (patch)
tree8e733c708109dce593899ef985b418654aa3927e /tikzit/src/common/NodeStyle.m
parentbf911ac87c17599bc07bb25726f1fa332d233a64 (diff)
Use KVO for listening to style changes in the selectors
git-svn-id: https://tikzit.svn.sourceforge.net/svnroot/tikzit/trunk@426 7c02a99a-9b00-45e3-bf44-6f3dd7fddb64
Diffstat (limited to 'tikzit/src/common/NodeStyle.m')
-rw-r--r--tikzit/src/common/NodeStyle.m23
1 files changed, 23 insertions, 0 deletions
diff --git a/tikzit/src/common/NodeStyle.m b/tikzit/src/common/NodeStyle.m
index 8d8b83f..0794b6a 100644
--- a/tikzit/src/common/NodeStyle.m
+++ b/tikzit/src/common/NodeStyle.m
@@ -26,6 +26,29 @@
@implementation NodeStyle
++ (void)initialize {
+ [self setKeys:[NSArray arrayWithObjects:
+ @"fillColorRGB.red",
+ @"fillColorRGB.blue",
+ @"fillColorRGB.green",
+ @"strokeColorRGB.red",
+ @"strokeColorRGB.blue",
+ @"strokeColorRGB.green",
+ @"strokeThickness",
+ @"shapeName",
+ @"name",
+ nil]
+ triggerChangeNotificationsForDependentKey:@"tikz"];
+ [self setKeys:[NSArray arrayWithObjects:
+ @"fillColorRGB.name",
+ nil]
+ triggerChangeNotificationsForDependentKey:@"fillColorIsKnown"];
+ [self setKeys:[NSArray arrayWithObjects:
+ @"strokeColorRGB.name",
+ nil]
+ triggerChangeNotificationsForDependentKey:@"strokeColorIsKnown"];
+}
+
+ (int) defaultStrokeThickness { return 1; }
- (id)initWithName:(NSString*)nm {