/usr/include/GNUstep/AppKit/NSTextTable.h is in libgnustep-gui-dev 0.25.0-4+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | /* -*-objc-*-
NSTextTable.h
Copyright (C) 2008 Free Software Foundation, Inc.
Author: Fred Kiefer <fredkiefer@gmx.de>
Date: January 2008
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _GNUstep_H_NSTextTable
#define _GNUstep_H_NSTextTable
#import <GNUstepBase/GSVersionMacros.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
#import <Foundation/NSObject.h>
#import <Foundation/NSGeometry.h>
@class NSColor;
@class NSTextContainer;
@class NSView;
@class NSLayoutManager;
@class NSTextTableBlock;
typedef enum _NSTextBlockValueType
{
NSTextBlockAbsoluteValueType,
NSTextBlockPercentageValueType
} NSTextBlockValueType;
typedef enum _NSTextBlockDimension
{
NSTextBlockWidth,
NSTextBlockMinimumWidth,
NSTextBlockMaximumWidth,
NSTextBlockHeight,
NSTextBlockMinimumHeight,
NSTextBlockMaximumHeight
} NSTextBlockDimension;
typedef enum _NSTextBlockLayer
{
NSTextBlockPadding,
NSTextBlockBorder,
NSTextBlockMargin
} NSTextBlockLayer;
typedef enum _NSTextBlockVerticalAlignment
{
NSTextBlockTopAlignment,
NSTextBlockMiddleAlignment,
NSTextBlockBottomAlignment,
NSTextBlockBaselineAlignment
} NSTextBlockVerticalAlignment;
@interface NSTextBlock : NSObject <NSCoding, NSCopying>
{
NSColor *_backgroundColor;
NSColor *_borderColorForEdge[NSMaxYEdge + 1];
NSTextBlockVerticalAlignment _verticalAlignment;
// The following ivars come in pairs
CGFloat _value[NSTextBlockMaximumHeight + 1];
NSTextBlockValueType _valueType[NSTextBlockMaximumHeight + 1];
CGFloat _width[NSTextBlockMargin + 1][NSMaxYEdge + 1];
NSTextBlockValueType _widthType[NSTextBlockMargin + 1][NSMaxYEdge + 1];
}
- (NSColor *) backgroundColor;
- (NSColor *) borderColorForEdge: (NSRectEdge)edge;
- (NSRect) boundsRectForContentRect: (NSRect)cont
inRect: (NSRect)rect
textContainer: (NSTextContainer *)container
characterRange: (NSRange)range;
- (CGFloat) contentWidth;
- (NSTextBlockValueType) contentWidthValueType;
- (void) drawBackgroundWithFrame: (NSRect)rect
inView: (NSView *)view
characterRange: (NSRange)range
layoutManager: (NSLayoutManager *)lm;
- (id) init;
- (NSRect) rectForLayoutAtPoint: (NSPoint)point
inRect: (NSRect)rect
textContainer: (NSTextContainer *)cont
characterRange: (NSRange)range;
- (void) setBackgroundColor: (NSColor *)color;
- (void) setBorderColor: (NSColor *)color;
- (void) setBorderColor: (NSColor *)color forEdge: (NSRectEdge)edge;
- (void) setContentWidth: (CGFloat)val type: (NSTextBlockValueType)type;
- (void) setValue: (CGFloat)val
type: (NSTextBlockValueType)type
forDimension: (NSTextBlockDimension)dimension;
- (void) setVerticalAlignment: (NSTextBlockVerticalAlignment)alignment;
- (void) setWidth: (CGFloat)val
type: (NSTextBlockValueType)type
forLayer: (NSTextBlockLayer)layer;
- (void) setWidth: (CGFloat)val
type: (NSTextBlockValueType)type
forLayer: (NSTextBlockLayer)layer
edge: (NSRectEdge)edge;
- (CGFloat) valueForDimension: (NSTextBlockDimension)dimension;
- (NSTextBlockValueType) valueTypeForDimension: (NSTextBlockDimension)dimension;
- (NSTextBlockVerticalAlignment) verticalAlignment;
- (CGFloat) widthForLayer: (NSTextBlockLayer)layer edge: (NSRectEdge)edge;
- (NSTextBlockValueType) widthValueTypeForLayer: (NSTextBlockLayer)layer
edge: (NSRectEdge)edge;
@end
typedef enum _NSTextTableLayoutAlgorithm {
NSTextTableAutomaticLayoutAlgorithm,
NSTextTableFixedLayoutAlgorithm
} NSTextTableLayoutAlgorithm;
@interface NSTextTable : NSTextBlock
{
NSTextTableLayoutAlgorithm _layoutAlgorithm;
NSUInteger _numberOfColumns;
BOOL _collapsesBorders;
BOOL _hidesEmptyCells;
}
- (NSRect) boundsRectForBlock: (NSTextTableBlock *)block
contentRect: (NSRect)content
inRect: (NSRect)rect
textContainer: (NSTextContainer *)container
characterRange: (NSRange)range;
- (BOOL) collapsesBorders;
- (void) drawBackgroundForBlock: (NSTextTableBlock *)block
withFrame: (NSRect)frame
inView: (NSView *)controlView
characterRange: (NSRange)range
layoutManager: (NSLayoutManager *)manager;
- (BOOL) hidesEmptyCells;
- (NSTextTableLayoutAlgorithm) layoutAlgorithm;
- (NSUInteger) numberOfColumns;
- (NSRect) rectForBlock: (NSTextTableBlock *)block
layoutAtPoint: (NSPoint)start
inRect: (NSRect)rect
textContainer: (NSTextContainer *)container
characterRange: (NSRange)range;
- (void) setCollapsesBorders: (BOOL)flag;
- (void) setHidesEmptyCells: (BOOL)flag;
- (void) setLayoutAlgorithm: (NSTextTableLayoutAlgorithm)algorithm;
- (void) setNumberOfColumns: (NSUInteger)numCols;
@end
@interface NSTextTableBlock : NSTextBlock
{
NSTextTable *_table;
int _row;
int _rowSpan;
int _col;
int _colSpan;
}
- (id) initWithTable: (NSTextTable *)table
startingRow: (int)row
rowSpan: (int)rspan
startingColumn: (int)col
columnSpan: (int)cspan;
- (int) columnSpan;
- (int) rowSpan;
- (int) startingColumn;
- (int) startingRow;
- (NSTextTable *) table;
@end
#endif
#endif // _GNUstep_H_NSTextTable
|