mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-24 11:41:02 +00:00
b60efa59f4
compiles. The rest are just the results of a simple conversion script I wrote.
71 lines
950 B
Objective-C
71 lines
950 B
Objective-C
#import "qedefs.h"
|
|
|
|
@implementation ZScrollView
|
|
|
|
/*
|
|
====================
|
|
initFrame: button:
|
|
|
|
Initizes a scroll view with a button at it's lower right corner
|
|
====================
|
|
*/
|
|
|
|
- initFrame:(const NSRect *)frameRect button1:b1
|
|
{
|
|
[super initFrame: frameRect];
|
|
|
|
[self addSubview: b1];
|
|
|
|
button1 = b1;
|
|
|
|
[self setHorizScrollerRequired: YES];
|
|
[self setVertScrollerRequired: YES];
|
|
|
|
[self setBorderType: NX_BEZEL];
|
|
|
|
return self;
|
|
}
|
|
|
|
|
|
/*
|
|
================
|
|
tile
|
|
|
|
Adjust the size for the pop up scale menu
|
|
=================
|
|
*/
|
|
|
|
- tile
|
|
{
|
|
NSRect scrollerframe;
|
|
|
|
[super tile];
|
|
[hScroller getFrame: &scrollerframe];
|
|
[button1 setFrame: &scrollerframe];
|
|
|
|
scrollerframe.size.width = 0;
|
|
[hScroller setFrame: &scrollerframe];
|
|
|
|
return self;
|
|
}
|
|
|
|
|
|
|
|
-(BOOL) acceptsFirstResponder
|
|
{
|
|
return YES;
|
|
}
|
|
|
|
- superviewSizeChanged:(const NSSize *)oldSize
|
|
{
|
|
[super superviewSizeChanged: oldSize];
|
|
|
|
[[self docView] newSuperBounds];
|
|
|
|
return self;
|
|
}
|
|
|
|
|
|
|
|
@end
|
|
|