quakeforge/tools/Forge/Bundles/MapEdit/XYView.h

87 lines
1.5 KiB
C
Raw Normal View History

#ifndef XYView_h
#define XYView_h
#include <AppKit/AppKit.h>
#include "QF/mathlib.h"
#include "SetBrush.h"
#include "render.h"
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;
2010-09-11 10:06:04 +00:00
void linestart (float r, float g, float b);
void lineflush (void);
void linecolor (float r, float g, float b);
2010-09-11 10:06:04 +00:00
void XYmoveto (vec3_t pt);
void XYlineto (vec3_t pt);
@interface XYView: NSView
2010-09-11 16:41:18 +00:00
{
2010-09-11 10:06:04 +00:00
NSRect realbounds, newrect, combinedrect;
NSPoint midpoint;
NSFont *font;
NSFont *scaledFont;
2010-09-11 10:06:04 +00:00
int gridsize;
float scale;
//
// for textured view
//
2010-09-11 10:06:04 +00:00
int xywidth, xyheight;
float *xyzbuffer;
unsigned *xypicbuffer;
2010-09-11 10:06:04 +00:00
drawmode_t drawmode;
//
// UI links
//
id mode_radio_i;
}
- (float) currentScale;
- (id) setModeRadio: m;
- (id) drawMode: sender;
- (id) setDrawMode: (drawmode_t)mode;
- (id) newSuperBounds;
- (id) newRealBounds: (NSRect)nb;
- (id) addToScrollRange: (float)x
: (float)y;
- (id) setOrigin: (NSPoint)pt scale: (float)sc;
- (id) centerOn: (vec3_t)org;
- (id) drawMode: sender;
- (id) superviewChanged;
- (int) gridsize;
- (float) snapToGrid: (float)f;
- (NSFont *) scaledFont;
@end
@interface NSView (XYView)
- (void) setFrame: (NSRect)frame
bounds: (NSRect)bounds
scale: (NSSize)scale;
2010-09-11 10:06:04 +00:00
@end
#endif // XYView_h