2020-02-29 15:40:55 +00:00
|
|
|
#ifndef __qwaq_view_h
|
|
|
|
#define __qwaq_view_h
|
|
|
|
|
|
|
|
#include <Array.h>
|
|
|
|
#include <Object.h>
|
|
|
|
|
2020-03-02 06:22:54 +00:00
|
|
|
#include "qwaq-draw.h"
|
2020-03-01 09:25:02 +00:00
|
|
|
#include "qwaq-rect.h"
|
2020-02-29 15:40:55 +00:00
|
|
|
|
2020-03-05 06:44:53 +00:00
|
|
|
@class Group;
|
|
|
|
|
|
|
|
enum {
|
|
|
|
ofCanFocus =0x0001,
|
|
|
|
ofFirstClick =0x0002,
|
|
|
|
ofDontDraw =0x0004,
|
|
|
|
ofPreProcess =0x0008,
|
|
|
|
ofPostProcess =0x0010,
|
|
|
|
ofMakeFirst =0x0020,
|
|
|
|
ofTileable =0x0040,
|
|
|
|
ofCentered =0x0080,
|
|
|
|
|
|
|
|
ofCallHasObject =0x8000,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
sfDrawn =0x0001,
|
|
|
|
sfDisabled =0x0002,
|
|
|
|
sfInFocus =0x0004,
|
|
|
|
sfModal =0x0008,
|
|
|
|
sfLocked =0x0010,
|
|
|
|
};
|
|
|
|
|
|
|
|
@interface View: Object
|
2020-02-29 15:40:55 +00:00
|
|
|
{
|
2020-03-05 06:44:53 +00:00
|
|
|
union {
|
|
|
|
Rect rect;
|
|
|
|
struct {
|
|
|
|
int xpos;
|
|
|
|
int ypos;
|
|
|
|
int xlen;
|
|
|
|
int ylen;
|
|
|
|
};
|
|
|
|
};
|
2020-02-29 15:40:55 +00:00
|
|
|
Rect absRect;
|
|
|
|
Point point; // can't be local :(
|
2020-03-05 06:44:53 +00:00
|
|
|
Group *owner;
|
2020-03-06 02:53:40 +00:00
|
|
|
struct window_s *textContext; //FIXME separate class
|
2020-03-05 06:44:53 +00:00
|
|
|
int state;
|
|
|
|
int options;
|
|
|
|
int cursorState;
|
|
|
|
Point cursor;
|
2020-02-29 15:40:55 +00:00
|
|
|
}
|
|
|
|
-initWithRect: (Rect) rect;
|
2020-03-05 06:44:53 +00:00
|
|
|
- (void) dealloc;
|
|
|
|
-setOwner: (Group *) owner;
|
|
|
|
-(struct Rect_s *)getRect;
|
|
|
|
-draw;
|
|
|
|
-redraw;
|
2020-02-29 15:40:55 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif//__qwaq_view_h
|