diff options
author | Johan Paulsson <gonz@badcode.net> | 2014-03-25 17:30:35 +0000 |
---|---|---|
committer | Johan Paulsson <gonz@badcode.net> | 2014-03-25 17:30:35 +0000 |
commit | 4c3a82c9146aa0e147b49b429b49fefb0e785a17 (patch) | |
tree | 532436ec35f19d6de54579734df22c20a8d67ca5 /tikzit/src/common | |
parent | 5532f8878b7219720de6145eabbe57efb894957c (diff) |
osx gui: custom nodes preference panel shows tikzit preview and tikz code for selected custom node.
Diffstat (limited to 'tikzit/src/common')
-rw-r--r-- | tikzit/src/common/TikzShape.h | 3 | ||||
-rw-r--r-- | tikzit/src/common/TikzShape.m | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tikzit/src/common/TikzShape.h b/tikzit/src/common/TikzShape.h index 1ccf658..6a91f91 100644 --- a/tikzit/src/common/TikzShape.h +++ b/tikzit/src/common/TikzShape.h @@ -25,8 +25,11 @@ #import "Shape.h" @interface TikzShape : Shape { + NSString *tikzSrc; } +@property (copy) NSString *tikzSrc; + - (id)initWithTikzFile:(NSString*)file; @end diff --git a/tikzit/src/common/TikzShape.m b/tikzit/src/common/TikzShape.m index 9735371..c07c61e 100644 --- a/tikzit/src/common/TikzShape.m +++ b/tikzit/src/common/TikzShape.m @@ -26,6 +26,8 @@ @implementation TikzShape +@synthesize tikzSrc; + - (id)initWithTikzFile:(NSString*)file { self = [super init]; if (self) { @@ -33,6 +35,8 @@ encoding:NSUTF8StringEncoding error:NULL]; if (tikz == nil) return nil; + + tikzSrc = [tikz copy]; Graph *graph = [Graph graphFromTikz:tikz]; if (graph == nil) return nil; |