1 /* 2 Project: Graphos 3 GRPropsEditor.h 4 5 Copyright (C) 2000-2018 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 #ifndef MAC_OS_X_VERSION_10_4 30 #define MAC_OS_X_VERSION_10_4 1040 31 #endif 32 33 #if !defined (GNUSTEP) && (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4) && !defined(CGFloat) 34 #define NSInteger int 35 #define NSUInteger unsigned 36 #define CGFloat float 37 #endif 38 39 @class GRDocView; 40 41 /** 42 * Object properties editor 43 */ 44 45 46 @interface GRPropsEditor : NSObject 47 { 48 IBOutlet NSPanel *propsPanel; 49 50 IBOutlet NSButton *stkButt; 51 IBOutlet NSButton *fllButt; 52 53 IBOutlet NSMatrix *lineCapMatrix; 54 IBOutlet NSMatrix *lineJoinMatrix; 55 56 IBOutlet NSTextField *linewidthField; 57 IBOutlet NSTextField *flatnessField; 58 IBOutlet NSTextField *miterlimitField; 59 IBOutlet NSStepper *linewidthStepper; 60 IBOutlet NSStepper *flatnessStepper; 61 IBOutlet NSStepper *miterlimitStepper; 62 63 IBOutlet NSColorWell *strokeColorWell; 64 IBOutlet NSColorWell *fillColorWell; 65 66 BOOL ispath; 67 CGFloat flatness, miterlimit, linewidth; 68 int linejoin, linecap; 69 BOOL stroked; 70 NSColor *strokeColor; 71 BOOL filled; 72 NSColor *fillColor; 73 74 GRDocView *docView; 75 } 76 77 - (void)setControlsEnabled:(BOOL)state; 78 79 /** reads the selection properties from the current view */ 80 - (void)readProperties; 81 82 /** sets the view which contains the objects. 83 The view needs to needs to be set so that the selection properties 84 can be read or applied. */ 85 - (void)setDocView: (GRDocView *)view; 86 87 - (void)makeKeyAndOrderFront:(id)sender; 88 89 - (void)selectionChanged: (NSNotification *)notif; 90 91 - (void)controlTextDidEndEditing:(NSNotification *)aNotification; 92 93 - (IBAction)stepperAction:(id)sender; 94 95 - (IBAction)setLnCap:(id)sender; 96 97 - (IBAction)setLnJoin:(id)sender; 98 99 - (IBAction)fllButtPressed:(id)sender; 100 101 - (IBAction)stkButtPressed:(id)sender; 102 103 - (IBAction)valuesChanged:(id)sender; 104 105 - (NSDictionary *)properties; 106 107 @end 108