mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
6d5ffa9f8e
There's still some cleanup to do, but everything seems to be working nicely: `make -j` works, `make distcheck` passes. There is probably plenty of bitrot in the package directories (RPM, debian), though. The vc project files have been removed since those versions are way out of date and quakeforge is pretty much dependent on gcc now anyway. Most of the old Makefile.am files are now Makemodule.am. This should allow for new Makefile.am files that allow local building (to be added on an as-needed bases). The current remaining Makefile.am files are for standalone sub-projects.a The installable bins are currently built in the top-level build directory. This may change if the clutter gets to be too much. While this does make a noticeable difference in build times, the main reason for the switch was to take care of the growing dependency issues: now it's possible to build tools for code generation (eg, using qfcc and ruamoko programs for code-gen).
137 lines
2.8 KiB
Objective-C
137 lines
2.8 KiB
Objective-C
#ifndef __qwaq_ui_view_h
|
|
#define __qwaq_ui_view_h
|
|
|
|
#include <Array.h>
|
|
#include <Object.h>
|
|
|
|
#include "ruamoko/qwaq/ui/draw.h"
|
|
#include "ruamoko/qwaq/ui/rect.h"
|
|
#include "ruamoko/qwaq/ui/textcontext.h"
|
|
|
|
@class Group;
|
|
@class ListenerGroup;
|
|
@class ScrollBar;
|
|
|
|
enum {
|
|
ofCanFocus = 0x0001,
|
|
ofFirstClick = 0x0002,
|
|
ofMakeFirst = 0x0004,
|
|
ofDontDraw = 0x0008,
|
|
ofRelativeEvents= 0x0010,
|
|
|
|
ofTileable = 0x0020,
|
|
ofCentered = 0x0040,
|
|
};
|
|
|
|
enum {
|
|
sfDrawn = 0x0001,
|
|
sfDisabled = 0x0002,
|
|
sfInFocus = 0x0004,
|
|
sfModal = 0x0008,
|
|
sfLocked = 0x0010,
|
|
};
|
|
|
|
enum {
|
|
gfGrowNone = 0x0000,
|
|
gfGrowLoX = 0x0001,
|
|
gfGrowLoY = 0x0002,
|
|
gfGrowHiX = 0x0004,
|
|
gfGrowHiY = 0x0008,
|
|
gfGrowRel = 0x0010,
|
|
gfGrowLo = gfGrowLoX | gfGrowLoY,
|
|
gfGrowHi = gfGrowHiX | gfGrowHiY,
|
|
gfGrowX = gfGrowLoX | gfGrowHiX,
|
|
gfGrowY = gfGrowLoY | gfGrowHiY,
|
|
gfGrowAll = gfGrowX | gfGrowY,
|
|
};
|
|
|
|
@protocol View
|
|
-setOwner: (Group *) owner;
|
|
-setGrowMode: (int) mode;
|
|
|
|
-(Rect)rect;
|
|
-(Point)origin;
|
|
-(Extent)size;
|
|
|
|
-(int) containsPoint: (Point) point;
|
|
-(void) grabMouse;
|
|
-(void) releaseMouse;
|
|
|
|
-(int) options;
|
|
-(int) state;
|
|
|
|
-setVerticalScrollBar:(ScrollBar *)scrollbar;
|
|
-setHorizontalScrollBar:(ScrollBar *)scrollbar;
|
|
-(ListenerGroup *) onViewScrolled;
|
|
|
|
-(id<TextContext>)context;
|
|
-setContext: (id<TextContext>) context;
|
|
-draw;
|
|
-hide;
|
|
-redraw;
|
|
-move: (Point) delta;
|
|
-resize: (Extent) delta;
|
|
-move:(Point)dpos andResize:(Extent)dsize;
|
|
-moveTo:(Point)pos; // does not redraw
|
|
-resizeTo:(Extent)size; // does not redraw
|
|
-grow: (Extent) delta;
|
|
-(ListenerGroup *)onEvent;
|
|
-handleEvent: (qwaq_event_t *) event;
|
|
-takeFocus;
|
|
-loseFocus;
|
|
-(ListenerGroup *) onReceiveFocus;
|
|
-(ListenerGroup *) onReleaseFocus;
|
|
-raise;
|
|
|
|
- (void) onMouseEnter: (Point) pos;
|
|
- (void) onMouseLeave: (Point) pos;
|
|
|
|
- (void) refresh;
|
|
- (void) mvprintf: (Point) pos, string fmt, ...;
|
|
- (void) mvvprintf: (Point) pos, string fmt, @va_list args;
|
|
- (void) mvaddch: (Point) pos, int ch;
|
|
-clear;
|
|
@end
|
|
|
|
@interface View: Object <View>
|
|
{
|
|
union {
|
|
Rect rect;
|
|
struct {
|
|
int xpos;
|
|
int ypos;
|
|
int xlen;
|
|
int ylen;
|
|
};
|
|
struct {
|
|
Point pos;
|
|
Extent size;
|
|
};
|
|
};
|
|
Rect absRect;
|
|
Group *owner;
|
|
id<TextContext> textContext;
|
|
int state;
|
|
int options;
|
|
int growMode;
|
|
int cursorState;
|
|
Point cursor;
|
|
ListenerGroup *onReceiveFocus;
|
|
ListenerGroup *onReleaseFocus;
|
|
ListenerGroup *onEvent;
|
|
ListenerGroup *onViewScrolled;
|
|
ScrollBar *hScrollBar;
|
|
ScrollBar *vScrollBar;
|
|
Point scroll;
|
|
}
|
|
+(View *)viewWithRect:(Rect)rect;
|
|
+(View *)viewWithRect:(Rect)rect options:(int)options;
|
|
|
|
-initWithRect:(Rect)rect;
|
|
-initWithRect:(Rect)rect options:(int)options;
|
|
@end
|
|
|
|
@interface View (TextContext) <TextContext>
|
|
@end
|
|
|
|
#endif//__qwaq_ui_view_h
|