-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathSSYListPicker.h
76 lines (69 loc) · 3.57 KB
/
SSYListPicker.h
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
#import <Cocoa/Cocoa.h>
#import "SSYAlert.h"
@interface SSYListPicker : NSObject {
SSYAlert* m_alert ;
}
/*!
@brief Convenience method returning an auteleased listPicker
*/
+ (SSYListPicker*)listPicker ;
/*!
@brief Presents a window asking user to pick from
a list of strings and returns the index set of the user's choices.
@param displayNames The list of strings to be given the user as choices.
@param toolTips An array of toolTip strings, and/or NSNull objects,
corresponding by index to displayNames. Number of objects in this array should equal
the number in the displayNames array. If no tooltips are desired, pass nil. If
tooltips are desired for only some choices, pass an array with NSNull objects
at the indexes which have no tooltips.
@param message Text to appear above the list.
@param allowMultipleSelection Whether or not the list will allow multiple
selections. If so, a paragraph instructing the user how to use the cmd key
to make multiple selections.
@param allowEmptySelection Whether or not the receiver requires a selection
to be made before enabling the default button.
@param button1Title Localized title of the default button. If nil,
defaults to localized "OK"
@param button2Title Localized title of the alternate button. If nil,
defaults to localized "Cancel". (The other/3rd button is localized "Clear Selection".)
@param initialPicks Index Set of items to be initially selected (suggested)
when the receiver is displayed
@param windowTitle Localized title to appear in the receiver's title bar. If
nil, the localized application name will appear.
@param alert The alert in which to run.. If nil, will create an
[SSYAlert alert].
@param runModal Specifies whether or not to run the window as a modal session.
@param didEndTarget An object to which the didEndSelector will be sent if and
when the user clicks the default button. May be nil, but then you'd never
find out what the user picked.
@param didEndSelector The selector in the didEndTarget which the message which
will be delivered to. If didEndTarget is not nil, must be a valid selector
taking two arguments. The first argument delivered will be an NSIndexSet
containing the indexes selected by the user. This argument may be an empty
index set, If the user selected no items and clicked the default button, but
it will never be nil. The second argument delivered will be the
didEndUserInfo, passed through.
@param didEndUserInfo An optional object which will be passed to the didEndTarget
via the didEndEndSelector.
@param didCancelInvocation An invocation which will be invoked if the user clicks
the second button (the leftmost button). May be nil, to invoke nothing.
@result The user's selection in terms of the display names, which may be an
empty index set, or nil if the user clicked "Cancel"
*/
- (void)userPickFromList:(NSArray*)displayNames
toolTips:(NSArray*)toolTips
lineBreakMode:(NSLineBreakMode)lineBreakMode
message:(NSString*)message
allowMultipleSelection:(BOOL)allowMultipleSelection
allowEmptySelection:(BOOL)allowEmptySelection
button1Title:(NSString*)button1Title
button2Title:(NSString*)button2Title
initialPicks:(NSIndexSet*)initialPicks
windowTitle:(NSString*)windowTitle
alert:(SSYAlert*)alert
mode:(SSYAlertMode)mode
didEndTarget:(id)didEndTarget
didEndSelector:(SEL)didEndSelector
didEndUserInfo:(id)didEndUserInfo
didCancelInvocation:(NSInvocation*)didCancelInvocation ;
@end