mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:10:48 +00:00
Added aditional methods for text completion
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9541 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
576a4db6e6
commit
13f8324f10
3 changed files with 41 additions and 0 deletions
|
@ -77,6 +77,12 @@
|
||||||
- (int)indexOfItemWithObjectValue:(id)object;
|
- (int)indexOfItemWithObjectValue:(id)object;
|
||||||
- (NSArray *)objectValues;
|
- (NSArray *)objectValues;
|
||||||
|
|
||||||
|
#ifndef STRICT_OPENSTEP
|
||||||
|
/* text completion */
|
||||||
|
- (void)setCompletes:(BOOL)completes;
|
||||||
|
- (BOOL)completes;
|
||||||
|
#endif
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface NSObject (NSComboBoxDataSource)
|
@interface NSObject (NSComboBoxDataSource)
|
||||||
|
@ -84,6 +90,11 @@
|
||||||
- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index;
|
- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index;
|
||||||
- (unsigned int)comboBox:(NSComboBox *)aComboBox
|
- (unsigned int)comboBox:(NSComboBox *)aComboBox
|
||||||
indexOfItemWithStringValue:(NSString *)string;
|
indexOfItemWithStringValue:(NSString *)string;
|
||||||
|
#ifndef STRICT_OPENSTEP
|
||||||
|
/* text completion */
|
||||||
|
- (NSString *)comboBox:(NSComboBox *)aComboBox
|
||||||
|
completedString:(NSString *)aString;
|
||||||
|
#endif
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface NSObject (NSComboBoxNotifications)
|
@interface NSObject (NSComboBoxNotifications)
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
NSMutableArray *_popUpList;
|
NSMutableArray *_popUpList;
|
||||||
BOOL _usesDataSource;
|
BOOL _usesDataSource;
|
||||||
BOOL _hasVerticalScroller;
|
BOOL _hasVerticalScroller;
|
||||||
|
BOOL _completes;
|
||||||
int _visibleItems;
|
int _visibleItems;
|
||||||
NSSize _intercellSpacing;
|
NSSize _intercellSpacing;
|
||||||
float _itemHeight;
|
float _itemHeight;
|
||||||
|
@ -95,6 +96,12 @@
|
||||||
- (int)indexOfItemWithObjectValue:(id)object;
|
- (int)indexOfItemWithObjectValue:(id)object;
|
||||||
- (NSArray *)objectValues;
|
- (NSArray *)objectValues;
|
||||||
|
|
||||||
|
#ifndef STRICT_OPENSTEP
|
||||||
|
/* text completion */
|
||||||
|
- (NSString *)completedString:(NSString *)substring;
|
||||||
|
- (void)setCompletes:(BOOL)completes;
|
||||||
|
- (BOOL)completes;
|
||||||
|
#endif
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface NSObject (NSComboBoxCellDataSource)
|
@interface NSObject (NSComboBoxCellDataSource)
|
||||||
|
@ -103,6 +110,11 @@
|
||||||
objectValueForItemAtIndex:(int)index;
|
objectValueForItemAtIndex:(int)index;
|
||||||
- (unsigned int)comboBoxCell:(NSComboBoxCell *)aComboBoxCell
|
- (unsigned int)comboBoxCell:(NSComboBoxCell *)aComboBoxCell
|
||||||
indexOfItemWithStringValue:(NSString *)string;
|
indexOfItemWithStringValue:(NSString *)string;
|
||||||
|
#ifndef STRICT_OPENSTEP
|
||||||
|
/* text completion */
|
||||||
|
- (NSString *)comboBoxCell:(NSComboBoxCell *)aComboBoxCell
|
||||||
|
completedString:(NSString *)uncompletedString;
|
||||||
|
#endif
|
||||||
@end
|
@end
|
||||||
|
|
||||||
#endif /* _GNUstep_H_NSComboBoxCell */
|
#endif /* _GNUstep_H_NSComboBoxCell */
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
//_buttonCell = nil;
|
//_buttonCell = nil;
|
||||||
_popUpList = [[NSMutableArray alloc] init];
|
_popUpList = [[NSMutableArray alloc] init];
|
||||||
//_usesDataSource = NO;
|
//_usesDataSource = NO;
|
||||||
|
//_completes = NO;
|
||||||
_visibleItems = 10;
|
_visibleItems = 10;
|
||||||
_intercellSpacing = NSZeroSize;
|
_intercellSpacing = NSZeroSize;
|
||||||
_itemHeight = 14;
|
_itemHeight = 14;
|
||||||
|
@ -296,6 +297,23 @@
|
||||||
return _popUpList;
|
return _popUpList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Text completion
|
||||||
|
- (NSString *)completedString:(NSString *)substring
|
||||||
|
{
|
||||||
|
// FIXME
|
||||||
|
return substring;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setCompletes:(BOOL)completes
|
||||||
|
{
|
||||||
|
_completes = completes;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)completes
|
||||||
|
{
|
||||||
|
return _completes;
|
||||||
|
}
|
||||||
|
|
||||||
- (void)performPopUsingSelector:(SEL)aSelector
|
- (void)performPopUsingSelector:(SEL)aSelector
|
||||||
inRect:(NSRect)cellFrame
|
inRect:(NSRect)cellFrame
|
||||||
ofView:(NSView *)controlView
|
ofView:(NSView *)controlView
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue