2010-09-09 11:46:38 +00:00
|
|
|
#include "ZScrollView.h"
|
2003-03-18 19:48:24 +00:00
|
|
|
|
|
|
|
@implementation ZScrollView
|
|
|
|
/*
|
|
|
|
====================
|
|
|
|
initWithFrame: button:
|
|
|
|
|
|
|
|
Initizes a scroll view with a button at it's lower right corner
|
|
|
|
====================
|
|
|
|
*/
|
2010-09-19 18:06:35 +00:00
|
|
|
- initWithFrame:(NSRect) frameRect button1:b1
|
|
|
|
{
|
2010-09-11 10:03:41 +00:00
|
|
|
[super initWithFrame:frameRect];
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-11 10:03:41 +00:00
|
|
|
[self addSubview:b1];
|
2003-03-18 19:48:24 +00:00
|
|
|
|
|
|
|
button1 = b1;
|
|
|
|
|
2010-09-11 10:03:41 +00:00
|
|
|
[self setHasHorizontalScroller:YES];
|
|
|
|
[self setHasVerticalScroller:YES];
|
|
|
|
|
|
|
|
[self setBorderType:NSBezelBorder];
|
2003-03-18 19:48:24 +00:00
|
|
|
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
================
|
|
|
|
tile
|
|
|
|
|
|
|
|
Adjust the size for the pop up scale menu
|
|
|
|
=================
|
2010-09-19 18:06:35 +00:00
|
|
|
*/
|
|
|
|
-tile
|
2003-03-18 19:48:24 +00:00
|
|
|
{
|
2010-09-11 10:03:41 +00:00
|
|
|
NSRect scrollerframe;
|
|
|
|
|
2003-03-18 19:48:24 +00:00
|
|
|
[super tile];
|
2010-09-11 10:03:41 +00:00
|
|
|
scrollerframe =[_horizScroller frame];
|
|
|
|
[button1 setFrame:scrollerframe];
|
|
|
|
|
2003-03-18 19:48:24 +00:00
|
|
|
scrollerframe.size.width = 0;
|
2010-09-11 10:03:41 +00:00
|
|
|
[_horizScroller setFrame:scrollerframe];
|
2010-09-19 18:06:35 +00:00
|
|
|
[_horizScroller setHidden:YES];
|
2003-03-18 19:48:24 +00:00
|
|
|
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-(BOOL) acceptsFirstResponder
|
|
|
|
{
|
2010-09-11 10:03:41 +00:00
|
|
|
return YES;
|
2003-03-18 19:48:24 +00:00
|
|
|
}
|
2010-09-11 10:03:41 +00:00
|
|
|
|
2010-09-09 11:46:38 +00:00
|
|
|
/*
|
2003-03-18 19:48:24 +00:00
|
|
|
- superviewSizeChanged:(const NSSize *)oldSize
|
|
|
|
{
|
|
|
|
[super superviewSizeChanged: oldSize];
|
|
|
|
|
2010-09-09 11:46:38 +00:00
|
|
|
[[self documentView] newSuperBounds];
|
2003-03-18 19:48:24 +00:00
|
|
|
|
|
|
|
return self;
|
|
|
|
}
|
2010-09-09 11:46:38 +00:00
|
|
|
*/
|
2003-03-18 19:48:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
@end
|