mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-14 00:40:55 +00:00
71 lines
973 B
Objective-C
71 lines
973 B
Objective-C
#include "qedefs.h"
|
|
|
|
@implementation ZScrollView
|
|
|
|
/*
|
|
====================
|
|
initWithFrame: button:
|
|
|
|
Initizes a scroll view with a button at it's lower right corner
|
|
====================
|
|
*/
|
|
|
|
- initWithFrame:(const NSRect *)frameRect button1:b1
|
|
{
|
|
[super initWithFrame: frameRect];
|
|
|
|
[self addSubview: b1];
|
|
|
|
button1 = b1;
|
|
|
|
[self setHorizScrollerRequired: YES];
|
|
[self setVertScrollerRequired: YES];
|
|
|
|
[self setBorderType: NS_BEZEL];
|
|
|
|
return self;
|
|
}
|
|
|
|
|
|
/*
|
|
================
|
|
tile
|
|
|
|
Adjust the size for the pop up scale menu
|
|
=================
|
|
*/
|
|
|
|
- tile
|
|
{
|
|
NSRect scrollerframe;
|
|
|
|
[super tile];
|
|
[_horizScroller getFrame: &scrollerframe];
|
|
[button1 setFrame: &scrollerframe];
|
|
|
|
scrollerframe.size.width = 0;
|
|
[_horizScroller setFrame: &scrollerframe];
|
|
|
|
return self;
|
|
}
|
|
|
|
|
|
|
|
-(BOOL) acceptsFirstResponder
|
|
{
|
|
return YES;
|
|
}
|
|
|
|
- superviewSizeChanged:(const NSSize *)oldSize
|
|
{
|
|
[super superviewSizeChanged: oldSize];
|
|
|
|
[[self docView] newSuperBounds];
|
|
|
|
return self;
|
|
}
|
|
|
|
|
|
|
|
@end
|
|
|