Initial OGComboBox implementation.
Only support for text so far.
This commit is contained in:
parent
73e7da5fb7
commit
45380da631
5 changed files with 148 additions and 1 deletions
27
headers/OGComboBox.h
Normal file
27
headers/OGComboBox.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
#import "OGWidget.h"
|
||||
#import "OGComboBoxItem.h"
|
||||
|
||||
@class OGComboBox;
|
||||
|
||||
@protocol OGComboBoxDelegate <OFObject>
|
||||
@optional
|
||||
- (void)comboBoxWasChanged: (OGComboBox*)comboBox;
|
||||
@end
|
||||
|
||||
@protocol OGComboBoxDataSource <OFObject>
|
||||
- (size_t)numberOfItemsInComboBox: (OGComboBox*)comboBox;
|
||||
- (OGComboBoxItem*)comboBox: (OGComboBox*)comboBox
|
||||
itemAtIndex: (size_t)index;
|
||||
@end
|
||||
|
||||
@interface OGComboBox: OGWidget
|
||||
{
|
||||
id <OGComboBoxDelegate> delegate;
|
||||
id <OGComboBoxDataSource> dataSource;
|
||||
}
|
||||
|
||||
@property (assign) id <OGComboBoxDelegate> delegate;
|
||||
@property (assign) id <OGComboBoxDataSource> dataSource;
|
||||
|
||||
+ comboBox;
|
||||
@end
|
Reference in a new issue