2006-12-16 14:42:55 +00:00
|
|
|
#ifndef __impulse_menu_h
|
|
|
|
#define __impulse_menu_h
|
|
|
|
|
|
|
|
#include "Object.h"
|
|
|
|
|
|
|
|
@interface MenuItem: Object
|
|
|
|
{
|
|
|
|
string text;
|
|
|
|
}
|
|
|
|
- (id) initWithText:(string)txt;
|
|
|
|
- (string) text;
|
|
|
|
- (void) select;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@protocol FlagMenuItem
|
2011-03-30 01:38:44 +00:00
|
|
|
-(int) state;
|
2010-08-23 05:08:37 +00:00
|
|
|
-(void) toggle;
|
2006-12-16 14:42:55 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface FlagMenuItem: MenuItem
|
|
|
|
{
|
|
|
|
id flag;
|
|
|
|
}
|
|
|
|
- (id) initWithText:(string)txt flagObject:(id)flg;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface CommandMenuItem: MenuItem
|
|
|
|
{
|
|
|
|
id object;
|
|
|
|
SEL selector;
|
|
|
|
}
|
|
|
|
- (id) initWithText:(string)txt object:(id)obj selector:(SEL)sel;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface ImpulseMenu: Object
|
|
|
|
{
|
|
|
|
string text;
|
|
|
|
}
|
|
|
|
- (id) initWithText:(string)txt;
|
2011-03-30 01:38:44 +00:00
|
|
|
- (int) impulse:(int)imp;
|
2006-12-16 14:42:55 +00:00
|
|
|
- (string) text;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface ImpulseValueMenu: ImpulseMenu
|
|
|
|
{
|
2011-03-30 01:38:44 +00:00
|
|
|
int value;
|
2006-12-16 14:42:55 +00:00
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface ImpulseListMenu: ImpulseMenu
|
|
|
|
{
|
2011-03-20 08:27:47 +00:00
|
|
|
MenuItem *items[10];
|
2006-12-16 14:42:55 +00:00
|
|
|
}
|
2011-03-20 08:27:47 +00:00
|
|
|
- (void) addItem:(MenuItem *)item;
|
2006-12-16 14:42:55 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif//__impulse_menu_h
|