1 /*
2  Project: Graphos
3  GRTextEditorView.h
4 
5  Copyright (C) 2000-2012 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 
29 @interface GRTextEditorView : NSView
30 {
31   NSView *controlsView;
32   NSScrollView *scrollView;
33   NSTextField *fontField;
34   NSButton *chooseFontButton;
35     NSPopUpButton *fontsPopUp;
36     NSTextField *sizeField;
37     NSText *theText;
38     NSButton *leftButt, *centerButt, *rightButt, *cancelButt, *okButt;
39     int result;
40 
41     NSTextAlignment textAlignment;
42     NSFont *font;
43     int fontSize;
44     float parSpace;
45 }
46 
47 - (id)initWithFrame:(NSRect)frameRect
48          withString:(NSString *)string
49          attributes:(NSDictionary *)attributes;
50 
51 - (void)setFirstResponder;
52 
53 - (void)changeTextAlignment:(id)sender;
54 
55 - (void) updateFontPreview:(NSTextField *)previewField :(NSFont *)font;
56 
57 - (void)okCancelPressed:(id)sender;
58 
59 - (NSString *)textString;
60 
61 - (NSDictionary *)textAttributes;
62 
63 - (int)result;
64 
65 @end
66