mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-19 07:20:50 +00:00
[qwaq] Make a View protocol
This commit is contained in:
parent
d73f380ba4
commit
05e377c3ac
1 changed files with 31 additions and 29 deletions
|
@ -43,36 +43,8 @@ enum {
|
|||
gfGrowY = gfGrowLoY | gfGrowHiY,
|
||||
gfGrowAll = gfGrowX | gfGrowY,
|
||||
};
|
||||
@interface View: Object
|
||||
{
|
||||
union {
|
||||
Rect rect;
|
||||
struct {
|
||||
int xpos;
|
||||
int ypos;
|
||||
int xlen;
|
||||
int ylen;
|
||||
};
|
||||
struct {
|
||||
Point pos;
|
||||
Extent size;
|
||||
};
|
||||
};
|
||||
Rect absRect;
|
||||
Point point; // can't be local :(
|
||||
Group *owner;
|
||||
id<TextContext> textContext;
|
||||
int state;
|
||||
int options;
|
||||
int growMode;
|
||||
int cursorState;
|
||||
Point cursor;
|
||||
ListenerGroup *onReceiveFocus;
|
||||
ListenerGroup *onReleaseFocus;
|
||||
}
|
||||
-initWithRect: (Rect) rect;
|
||||
- (void) dealloc;
|
||||
|
||||
@protocol View
|
||||
-setOwner: (Group *) owner;
|
||||
-setGrowMode: (int) mode;
|
||||
|
||||
|
@ -109,6 +81,36 @@ enum {
|
|||
- (void) mvaddch: (Point) pos, int ch;
|
||||
@end
|
||||
|
||||
@interface View: Object <View>
|
||||
{
|
||||
union {
|
||||
Rect rect;
|
||||
struct {
|
||||
int xpos;
|
||||
int ypos;
|
||||
int xlen;
|
||||
int ylen;
|
||||
};
|
||||
struct {
|
||||
Point pos;
|
||||
Extent size;
|
||||
};
|
||||
};
|
||||
Rect absRect;
|
||||
Point point; // can't be local :(
|
||||
Group *owner;
|
||||
id<TextContext> textContext;
|
||||
int state;
|
||||
int options;
|
||||
int growMode;
|
||||
int cursorState;
|
||||
Point cursor;
|
||||
ListenerGroup *onReceiveFocus;
|
||||
ListenerGroup *onReleaseFocus;
|
||||
}
|
||||
-initWithRect: (Rect) rect;
|
||||
@end
|
||||
|
||||
@interface View (TextContext) <TextContext>
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in a new issue