2010-09-01 10:37:10 +00:00
|
|
|
#ifndef XYView_h
|
|
|
|
#define XYView_h
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2003-05-06 21:52:58 +00:00
|
|
|
#include <AppKit/AppKit.h>
|
2010-09-09 11:46:38 +00:00
|
|
|
|
|
|
|
#include "QF/mathlib.h"
|
|
|
|
|
2003-05-06 21:52:58 +00:00
|
|
|
#include "SetBrush.h"
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-09 11:46:38 +00:00
|
|
|
#include "render.h"
|
|
|
|
|
2003-03-18 19:48:24 +00:00
|
|
|
extern id xyview_i;
|
|
|
|
|
|
|
|
#define MINSCALE 0.125
|
|
|
|
#define MAXSCALE 2.0
|
|
|
|
|
|
|
|
|
|
|
|
extern vec3_t xy_viewnormal; // v_forward for xy view
|
|
|
|
extern float xy_viewdist; // clip behind this plane
|
|
|
|
|
|
|
|
extern NSRect xy_draw_rect;
|
|
|
|
|
|
|
|
void linestart (float r, float g, float b);
|
|
|
|
void lineflush (void);
|
|
|
|
void linecolor (float r, float g, float b);
|
|
|
|
|
|
|
|
void XYmoveto (vec3_t pt);
|
|
|
|
void XYlineto (vec3_t pt);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@interface XYView : NSView
|
|
|
|
{
|
|
|
|
NSRect realbounds, newrect, combinedrect;
|
|
|
|
NSPoint midpoint;
|
|
|
|
int gridsize;
|
|
|
|
float scale;
|
|
|
|
|
|
|
|
// for textured view
|
|
|
|
int xywidth, xyheight;
|
|
|
|
float *xyzbuffer;
|
|
|
|
unsigned *xypicbuffer;
|
|
|
|
|
|
|
|
drawmode_t drawmode;
|
|
|
|
|
|
|
|
// UI links
|
|
|
|
id mode_radio_i;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (float)currentScale;
|
|
|
|
|
|
|
|
- setModeRadio: m;
|
|
|
|
|
|
|
|
- drawMode: sender;
|
|
|
|
- setDrawMode: (drawmode_t)mode;
|
|
|
|
|
|
|
|
- newSuperBounds;
|
|
|
|
- newRealBounds: (NSRect *)nb;
|
|
|
|
|
|
|
|
- addToScrollRange: (float)x :(float)y;
|
|
|
|
- setOrigin: (NSPoint *)pt scale: (float)sc;
|
|
|
|
- centerOn: (vec3_t)org;
|
|
|
|
|
|
|
|
- drawMode: sender;
|
|
|
|
|
|
|
|
- superviewChanged;
|
|
|
|
|
|
|
|
- (int)gridsize;
|
|
|
|
- (float)snapToGrid: (float)f;
|
|
|
|
|
|
|
|
@end
|
2010-09-01 10:37:10 +00:00
|
|
|
|
|
|
|
#endif//XYView_h
|