/usr/include/GNUstep/AppKit/NSControl.h is in libgnustep-gui-dev 0.22.0-1ubuntu2.
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 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | /*
NSControl.h
The abstract control class
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
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 Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _GNUstep_H_NSControl
#define _GNUstep_H_NSControl
#import <GNUstepBase/GSVersionMacros.h>
// for NSWritingDirection
#import <AppKit/NSParagraphStyle.h>
#import <AppKit/NSView.h>
@class NSString;
@class NSNotification;
@class NSFormatter;
@class NSCell;
@class NSFont;
@class NSEvent;
@class NSTextView;
@interface NSControl : NSView
{
// Attributes
NSInteger _tag;
id _cell; // id so compiler wont complain too much for subclasses
BOOL _ignoresMultiClick;
}
//
// Setting the Control's Cell
//
+ (Class)cellClass;
+ (void)setCellClass:(Class)factoryId;
- (id)cell;
- (void)setCell:(NSCell *)aCell;
//
// Enabling and Disabling the Control
//
- (BOOL)isEnabled;
- (void)setEnabled:(BOOL)flag;
//
// Identifying the Selected Cell
//
- (id)selectedCell;
- (NSInteger)selectedTag;
//
// Setting the Control's Value
//
- (void) setDoubleValue: (double)aDouble;
- (double) doubleValue;
- (void) setFloatValue: (float)aFloat;
- (float) floatValue;
- (void) setIntValue: (int)anInt;
- (int) intValue;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
- (NSInteger) integerValue;
- (void) setIntegerValue: (NSInteger)anInt;
- (void) takeIntegerValueFrom: (id)sender;
#endif
- (void) setStringValue: (NSString *)aString;
- (NSString *) stringValue;
- (void) setObjectValue: (id)anObject;
- (id) objectValue;
- (void) setNeedsDisplay;
//
// Interacting with Other Controls
//
- (void) takeDoubleValueFrom: (id)sender;
- (void) takeFloatValueFrom: (id)sender;
- (void) takeIntValueFrom: (id)sender;
- (void) takeStringValueFrom: (id)sender;
- (void) takeObjectValueFrom: (id)sender;
//
// Formatting Text
//
- (NSTextAlignment)alignment;
- (NSFont *)font;
- (void)setAlignment:(NSTextAlignment)mode;
- (void)setFont:(NSFont *)fontObject;
- (void)setFloatingPointFormat:(BOOL)autoRange
left:(unsigned)leftDigits
right:(unsigned)rightDigits;
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
- (void)setFormatter:(NSFormatter*)newFormatter;
- (id)formatter;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
- (NSWritingDirection)baseWritingDirection;
- (void)setBaseWritingDirection:(NSWritingDirection)direction;
#endif
//
// Managing the Field Editor
//
- (BOOL)abortEditing;
- (NSText *)currentEditor;
- (void)validateEditing;
//
// Resizing the Control
//
- (void)calcSize;
- (void)sizeToFit;
//
// Displaying the Control and Cell
//
- (void)drawCell:(NSCell *)aCell;
- (void)drawCellInside:(NSCell *)aCell;
- (void)selectCell:(NSCell *)aCell;
- (void)updateCell:(NSCell *)aCell;
- (void)updateCellInside:(NSCell *)aCell;
//
// Target and Action
//
- (SEL)action;
- (BOOL)isContinuous;
- (BOOL)sendAction:(SEL)theAction
to:(id)theTarget;
- (int)sendActionOn:(int)mask;
- (void)setAction:(SEL)aSelector;
- (void)setContinuous:(BOOL)flag;
- (void)setTarget:(id)anObject;
- (id)target;
//
// Attributed string handling
//
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
- (NSAttributedString *)attributedStringValue;
- (void)setAttributedStringValue:(NSAttributedString *)attribStr;
#endif
//
// Assigning a Tag
//
- (void)setTag:(NSInteger)anInt;
- (NSInteger)tag;
//
// Activation
//
- (void)performClick:(id)sender;
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
- (BOOL)refusesFirstResponder;
- (void)setRefusesFirstResponder:(BOOL)flag;
#endif
//
// Tracking the Mouse
//
- (void)mouseDown:(NSEvent *)theEvent;
- (BOOL)ignoresMultiClick;
- (void)setIgnoresMultiClick:(BOOL)flag;
@end
APPKIT_EXPORT NSString *NSControlTextDidBeginEditingNotification;
APPKIT_EXPORT NSString *NSControlTextDidEndEditingNotification;
APPKIT_EXPORT NSString *NSControlTextDidChangeNotification;
//
// Methods Implemented by the Delegate
//
@interface NSObject (NSControlDelegate)
- (BOOL) control: (NSControl *)control isValidObject:(id)object;
- (BOOL) control: (NSControl *)control
textShouldBeginEditing: (NSText *)fieldEditor;
- (BOOL) control: (NSControl *)control
textShouldEndEditing: (NSText *)fieldEditor;
- (void) controlTextDidBeginEditing: (NSNotification *)aNotification;
- (void) controlTextDidEndEditing: (NSNotification *)aNotification;
- (void) controlTextDidChange: (NSNotification *)aNotification;
- (BOOL) control: (NSControl *)control
didFailToFormatString: (NSString *)string
errorDescription: (NSString *)error;
- (void) control: (NSControl *)control
didFailToValidatePartialString: (NSString *)string
errorDescription: (NSString *)error;
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
- (BOOL) control: (NSControl *)control
textView: (NSTextView *)textView
doCommandBySelector: (SEL)command;
- (NSArray *) control: (NSControl *)control
textView: (NSTextView *)textView
completions: (NSArray *)words
forPartialWordRange: (NSRange)charRange
indexOfSelectedItem: (int *)index;
#endif
@end
#endif // _GNUstep_H_NSControl
|