mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
0e5cd14829
Add return-type information to all methods, split up lines properly where I could find them, and ran the whole thing through uncrustify. Looks purty now. :)
67 lines
1 KiB
Objective-C
67 lines
1 KiB
Objective-C
#include "ZScrollView.h"
|
|
|
|
@implementation ZScrollView
|
|
/*
|
|
====================
|
|
initWithFrame: button:
|
|
|
|
Initizes a scroll view with a button at it's lower right corner
|
|
====================
|
|
*/
|
|
- (id) initWithFrame: (NSRect)frameRect
|
|
button1: b1
|
|
{
|
|
[super initWithFrame: frameRect];
|
|
|
|
[self addSubview: b1];
|
|
|
|
button1 = b1;
|
|
|
|
[self setHasHorizontalScroller: YES];
|
|
[self setHasVerticalScroller: YES];
|
|
|
|
[self setBorderType: NSBezelBorder];
|
|
|
|
return self;
|
|
}
|
|
|
|
/*
|
|
================
|
|
tile
|
|
|
|
Adjust the size for the pop up scale menu
|
|
=================
|
|
*/
|
|
- (id) tile
|
|
{
|
|
NSRect scrollerframe;
|
|
|
|
[super tile];
|
|
scrollerframe = [_horizScroller frame];
|
|
[button1 setFrame: scrollerframe];
|
|
|
|
scrollerframe.size.width = 0;
|
|
[_horizScroller setFrame: scrollerframe];
|
|
[_horizScroller setHidden: YES];
|
|
|
|
return self;
|
|
}
|
|
|
|
- (BOOL) acceptsFirstResponder
|
|
{
|
|
return YES;
|
|
}
|
|
|
|
#if 0
|
|
- (id) superviewSizeChanged: (const NSSize *)oldSize
|
|
{
|
|
[super superviewSizeChanged: oldSize];
|
|
|
|
[[self documentView] newSuperBounds];
|
|
|
|
return self;
|
|
}
|
|
|
|
#endif
|
|
|
|
@end
|