mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-13 16:37:30 +00:00
8a7fbdfc9f
It currently dies when single stepping or exiting due to EditBuffer's retain count not getting incremented when initialized. This is because EditBuffer is initialized in C and thus does not call Object's -init.
40 lines
971 B
Objective-C
40 lines
971 B
Objective-C
#ifndef __qwaq_ui_button_h
|
|
#define __qwaq_ui_button_h
|
|
|
|
#include "ui/draw.h"
|
|
#include "ui/view.h"
|
|
|
|
@class ListenerGroup;
|
|
|
|
@interface Button : View
|
|
{
|
|
DrawBuffer *icon[2];
|
|
int pressed;
|
|
int click;
|
|
Point dragBase;
|
|
Point dragPos;
|
|
ListenerGroup *onPress;
|
|
ListenerGroup *onRelease;
|
|
ListenerGroup *onClick;
|
|
ListenerGroup *onDrag;
|
|
ListenerGroup *onAuto;
|
|
ListenerGroup *onHover;
|
|
}
|
|
+(Button *)withPos: (Point) pos releasedIcon: (DrawBuffer *) released
|
|
pressedIcon: (DrawBuffer *) pressed;
|
|
+(Button *)withRect: (Rect) rect; // invisible button
|
|
-initWithPos: (Point) pos releasedIcon: (DrawBuffer *) released
|
|
pressedIcon: (DrawBuffer *) pressed;
|
|
-initWithRect: (Rect) rect; // invisible button
|
|
-(ListenerGroup *) onPress;
|
|
-(ListenerGroup *) onRelease;
|
|
-(ListenerGroup *) onClick;
|
|
-(ListenerGroup *) onDrag;
|
|
-(ListenerGroup *) onAuto;
|
|
-(ListenerGroup *) onHover;
|
|
|
|
- (int) click;
|
|
- (Point) delta;
|
|
@end
|
|
|
|
#endif//__qwaq_ui_button_h
|