1 /* GormPlacementInfo.h 2 * 3 * Copyright (C) 2002 Free Software Foundation, Inc. 4 * 5 * Author: Pierre-Yves Rivaille <pyrivail@ens-lyon.fr> 6 * Date: 2002 7 * 8 * This file is part of GNUstep. 9 * 10 * This program is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License as published by 12 * the Free Software Foundation; either version 3 of the License, or 13 * (at your option) any later version. 14 * 15 * This program 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 18 * GNU General Public License for more details. 19 * 20 * You should have received a copy of the GNU General Public License 21 * along with this program; if not, write to the Free Software 22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA. 23 */ 24 #ifndef INCLUDED_GormPlacementInfo_h 25 #define INCLUDED_GormPlacementInfo_h 26 27 #include <Foundation/NSObject.h> 28 #include <InterfaceBuilder/InterfaceBuilder.h> 29 30 @class NSView, NSMutableArray; 31 32 @interface GormPlacementInfo : NSObject 33 { 34 @public 35 NSView *resizingIn; 36 NSRect oldRect; 37 BOOL firstPass; 38 BOOL hintInitialized; 39 NSMutableArray *leftHints; 40 NSMutableArray *rightHints; 41 NSMutableArray *topHints; 42 NSMutableArray *bottomHints; 43 NSRect lastLeftRect; 44 NSRect lastRightRect; 45 NSRect lastTopRect; 46 NSRect lastBottomRect; 47 NSRect hintFrame; 48 NSRect lastFrame; 49 IBKnobPosition knob; 50 } 51 @end 52 53 typedef enum _GormHintBorder 54 { 55 Top, Bottom, Left, Right 56 } GormHintBorder; 57 58 @interface GormPlacementHint : NSObject 59 { 60 GormHintBorder _border; 61 float _position; 62 float _start; 63 float _end; 64 NSRect _frame; 65 } 66 - (id) initWithBorder: (GormHintBorder) border 67 position: (float) position 68 validityStart: (float) start 69 validityEnd: (float) end 70 frame: (NSRect) frame; 71 - (NSRect) rectWithHalfDistance: (int) halfDistance; 72 - (int) distanceToFrame: (NSRect) frame; 73 - (float) position; 74 - (float) start; 75 - (float) end; 76 - (NSRect) frame; 77 - (GormHintBorder) border; 78 @end 79 80 #endif 81