1 /*
2  Project: Graphos
3  GRText.h
4 
5  Copyright (C) 2000-2013 GNUstep Application Project
6 
7  Author: Enrico Sersale (original GDraw implementation)
8  Author: Ing. Riccardo Mottola
9 
10  This application is free software; you can redistribute it and/or
11  modify it under the terms of the GNU General Public
12  License as published by the Free Software Foundation; either
13  version 2 of the License, or (at your option) any later version.
14 
15  This application is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  Library General Public License for more details.
19 
20  You should have received a copy of the GNU General Public
21  License along with this library; if not, write to the Free
22  Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
23  */
24 
25 
26 #import <Foundation/Foundation.h>
27 #import <AppKit/AppKit.h>
28 #import "GRDrawableObject.h"
29 
30 @class GRDocView;
31 
32 @interface GRText : GRDrawableObject
33 {
34     NSString *str;
35     NSDictionary *parAttributes;
36     NSPoint pos;
37     NSSize size;
38     NSRect bounds;
39     float scalex, scaley;
40     float rotation;
41     NSRect selRect;
42 }
43 
44 - (id)initInView:(GRDocView *)aView
45          atPoint:(NSPoint)p
46       zoomFactor:(CGFloat)zf
47   withProperties:(NSDictionary *)properties
48       openEditor:(BOOL)openedit;
49 
50 - (id)initFromData:(NSDictionary *)description
51             inView:(GRDocView *)aView
52         zoomFactor:(CGFloat)zf;
53 
54 
55 - (void)setString:(NSString *)aString attributes:(NSDictionary *)attrs;
56 
57 - (void)edit;
58 
59 - (void)moveAddingCoordsOfPoint:(NSPoint)p;
60 
61 - (void)setZoomFactor:(CGFloat)f;
62 
63 - (void)setScalex:(float)x scaley:(float)y;
64 
65 - (void)setRotation:(float)r;
66 
67 - (void)draw;
68 
69 
70 - (NSBezierPath *) makePathFromString: (NSString *) aString
71                               forFont: (NSFont *) aFont
72                               atPoint: (NSPoint) aPoint;
73 @end
74 
75