-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathSSYLabelledPopUp.h
executable file
·51 lines (39 loc) · 1.44 KB
/
SSYLabelledPopUp.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
#import <Cocoa/Cocoa.h>
/*!
@brief This class provides a control which consists of a non-editable NSTextField
<i>label</i> and, below it, a popup button.
@details May be used, for example for a user to select <i>Favorite Color</i>,
etc. etc.
*/
@interface SSYLabelledPopUp : NSView {
NSTextField* labelField ;
NSPopUpButton* popUpButton ;
}
@property (retain) NSTextField* labelField ;
@property (retain) NSPopUpButton* popUpButton ;
/*!
@brief Convenience method for getting an autoreleased instance of this class.
@param label The text value of the <i>label</i> which will appear above
the popup button in the returned instance.
@result The instance, autoreleased
*/
+ (SSYLabelledPopUp*)popUpControlWithLabel:(NSString*)label ;
/*!
@brief Sets the array of choices to appear in the receiver's popup button.
@param choices An array of strings
*/
- (void)setChoices:(NSArray*)choices ;
/*!
@brief Returns the index selected in the menu of the receiver's popup
button.
*/
- (NSInteger)selectedIndex ;
/*!
@brief Resizes the height of the receiver to accomodate the its current values,
subject to allowsShrinking
@param allowShrinking YES if the height is allowed to be reduced. If this parameter
is NO, and less height than the current height is required, this invocation will not reduce
the height but will instead leave empty space.
*/
- (void)sizeHeightToFitAllowShrinking:(BOOL)allowShrinking ;
@end