Re: Making my own NSScrollers
Re: Making my own NSScrollers
- Subject: Re: Making my own NSScrollers
- From: Ivan Milles <email@hidden>
- Date: Wed, 7 May 2003 12:43:35 +0200
As a matter of fact, it is. As I make NSOpenGLView grow, it does it all
nicely until it hits the magical 2048 border. As long as it doesn't
pass 2048 in any dimension, it works nicely, but when it does, all
sorts of strange things starts to happen. Most notably, the coordinate
system seems to retain it's size - I can still draw at the GL
coordinate (2400, 200), but the entire view seems scaled down. That is,
the pixel still ends up to the left of view coordinate 2048. I know
that this is a persistent behaviour, as it has emerged with other
applications of mine.
Anyway, keeping a huge OpenGLView around is massive waste of memory, so
I'd still like to try connecting a pair of NSScrollers myself. (Huge
thanks, though, publiclook!)
/Ivan
There is no problem with defining a 10000x10000 view as the document
view of a scroll view. When you open Gl code is asked to draw, you
can use the rectangle passed to -drawRect: and draw only that portion
using glTranslate as you like.
I posted source code that supports all of this as well as scaling just
a few days ago. Search http://cocoa.mamasam.com/. You don't need to
do a lot of work circumventing the appkit. All of this works well as
is.
On Monday, May 5, 2003, at 10:27 AM, Ivan Milles wrote:
[Snippety-snip]
I'm extending upon the known hardships of scrolling an NSOpenGLView.
The thing is, I need to use an enormous GLView, often above
10000x10000
pixels in size. Now, I know that the GLView doesn't handle that size
too well, and it is also unnecessary. What I want to do is to connect
two NSScrollers to my GLView, and use them to issue glTranslatef
commands to my GL view.
So, what I need to do is the following:
Programmatically add two NSScrollers to my GL view. (They don't need
to have any real connection to it, but I need to now how to position
and resize them)
Set knob position and knob size (I guess this is done with the
-(void)setFloatValue:(float)aFloat knobProportion:(float)percent
method.
Catch events when the knob is moved
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.