Doing my own geometry

2008-02-06 Thread Steve Checkley
Hello all,
 
A short while back, I remember seeing a thread about doing ones own geometry 
and not having to rely up the geometry manager.
 
I've had a go at writing my own, mainly so I can have a growbox that looks like 
it belongs to an OS X bottombar. However, there's a great deal of lag as the 
window updates.
 
I'd like to ask those who've written their own managers whether they were able 
to overcome the lag in the screen redraws and create a routine that's quick as 
the native live resizing?
 
Also, I only appear to have had geometry manager muck things up when I edited 
the properties of a control in a group. Are there any other risks that I should 
be aware of if I stick with it?
 
Cheers,
 
 
Steve
_
Share what Santa brought you
https://www.mycooluncool.com___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Doing my own geometry

2008-02-06 Thread J. Landman Gay

Steve Checkley wrote:


A short while back, I remember seeing a thread about doing ones own
geometry and not having to rely up the geometry manager.

I've had a go at writing my own, mainly so I can have a growbox that
looks like it belongs to an OS X bottombar. However, there's a great
deal of lag as the window updates.

I'd like to ask those who've written their own managers whether they
were able to overcome the lag in the screen redraws and create a
routine that's quick as the native live resizing?


I've never noticed any lag and I've had some pretty intense resizestack 
handlers. If you are game to post a script, or even just some 
pseudocode, I'm sure we can help. Managing a single growbox should be 
almost instant. If you have liveresizing turned on, it could slow things 
down because the resizestack message gets sent repeatedly. Even so, 
managing only an object or two shouldn't make much difference.


--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Doing my own geometry

2008-02-07 Thread Steve Checkley
Hi Jacque,
 
Unfortunately, I've deleted the original handlers and gone back to using Rev's 
own geometry manager.
 
I'd placed a button in the bottom right of the window and turned on live 
resizing.
 
In pseudocode, the button's script ran along the lines of:
 
on mouseDown
   repeat while the mouse is down
   set the rect of this stack in relation to the mouseLoc (fixing min and 
max rects)
   end repeat
end mouseDown
 
on resizeStack
lock screen
-- geometry script in here
unlock screen
end resizeStack
 
I have a feeling that I may still have been relying upon rev to actually handle 
the geometry and was calling revUpdateGeometry but I can't remember now. Mind 
you, when I was playing around, I didn't have a lot on the card, so maybe not. 
My brain's a bit fried at the moment, I'm afraid!
 
Hmmm... I might have another look at this to see whether moving objects 
directly in code works quicker that I remember.
 
Thanks for pointing me in possibly the right direction!
 
 
 
Steve
_
Free games, great prizes - get gaming at Gamesbox. 
http://www.searchgamesbox.com___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Doing my own geometry

2008-02-07 Thread Mark Schonewille

Hi Steve,

Why do you need a button to resize a window? Why can't you use OSX's  
own little handle in the bottom-right of each resizable window?


Everybody who uses the geometry manager is bound to run into its  
limits some day, losing a lot of time fixing it or even having to  
completely recreate one's work. I'd use a script that responds to the  
resizeStack message rather than the geometry manager.


Best regards,

Mark Schonewille

--

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Quickly extract data from your HyperCard stacks with DIFfersifier.  
http://differsifier.economy-x-talk.com



Op 7-feb-2008, om 18:53 heeft Steve Checkley het volgende geschreven:


Hi Jacque,

Unfortunately, I've deleted the original handlers and gone back to  
using Rev's own geometry manager.


I'd placed a button in the bottom right of the window and turned on  
live resizing.


In pseudocode, the button's script ran along the lines of:

on mouseDown
   repeat while the mouse is down
   set the rect of this stack in relation to the mouseLoc  
(fixing min and max rects)

   end repeat
end mouseDown

on resizeStack
lock screen
-- geometry script in here
unlock screen
end resizeStack

I have a feeling that I may still have been relying upon rev to  
actually handle the geometry and was calling revUpdateGeometry but  
I can't remember now. Mind you, when I was playing around, I didn't  
have a lot on the card, so maybe not. My brain's a bit fried at the  
moment, I'm afraid!


Hmmm... I might have another look at this to see whether moving  
objects directly in code works quicker that I remember.


Thanks for pointing me in possibly the right direction!



Steve



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Doing my own geometry

2008-02-07 Thread J. Landman Gay

Steve Checkley wrote:

Hi Jacque,
 
Unfortunately, I've deleted the original handlers and gone back to

using Rev's own geometry manager.


I'd placed a button in the bottom right of the window and turned on

live resizing.


In pseudocode, the button's script ran along the lines of:
 
on mouseDown

   repeat while the mouse is down
   set the rect of this stack in relation to the mouseLoc (fixing min and 
max rects)
   end repeat
end mouseDown
 
on resizeStack

lock screen
-- geometry script in here
unlock screen
end resizeStack


A big bottleneck here is using a mouseDown handler, which you don't 
need. Also, "repeat while the mouse is down" is not a great idea in 
Revolution. Polling the mouse is very slow and taxes the CPU, and there 
is almost always a better way to manage things. See an explanation here:


 

At any rate, a resizeStack handler manages all the mousedown stuff for 
you as well as locking and unlocking the screen. It is also unnecessary 
to set the rect of the stack because when the user drags the resize 
button the rect is set automatically. You don't need to deal with any of 
those things, all you need to do is catch the resizeStack message and 
adjust the geometry when it happens.


You'll only need one handler, something like this:

on resizeStack x,y
  set the bottomright of btn "fakeCloseBox" to x,y
end resizeStack

That's it. The resizeStack message passes two parameters that represent 
the current horizontal and vertical dimensions of the bottom right 
corner of the window. All you need to do it set your button to that 
location. This should be very fast, whether liveResizing is turned on or 
off.


--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Doing my own geometry

2008-02-07 Thread J. Landman Gay

Steve Checkley wrote:

Wow! I didn't know how to work better with the mouse. That's really

useful!


The reason I want to have my own growbox is because I've drawn an OS
X

style bottom bar. The standard growbox in Rev doesn't look right, I'm
afraid, especially in Leopard.


I'm very much a stickler for making things look right.


Rev uses OS system calls to draw windows, so I'm not sure what wouldn't 
look right. Some of what I said won't apply if you don't have a native 
growbox for the user to drag though. You would, in that case, have to 
roll your own stack resizing handlers. Rev 2.9 has some Leopard 
compatibility fixes and isn't too far off, so you might be able to save 
yourself some trouble if you wait a bit.


--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Doing my own geometry

2008-02-07 Thread Steve Checkley

Wow! I didn't know how to work better with the mouse. That's really useful!

The reason I want to have my own growbox is because I've drawn an OS X style 
bottom bar. The standard growbox in Rev doesn't look right, I'm afraid, 
especially in Leopard.

I'm very much a stickler for making things look right.

Cheers,


Steve
_
Get Hotmail on your mobile, text MSN to 63463!
http://mobile.uk.msn.com/pc/mail.aspx___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Doing my own geometry

2008-02-07 Thread Chipp Walters
You can grab my altLayout manager at:

http://www.altuit.com/webs/altuit2/altPluginDownload/Downloads.htm

and it will place a grow box in the bottom right hand corner of your stack,
though it is a WinXP one. Just change the graphic. The code manages the
resizing of the window w/out using mouseStilldown. I think I got it a couple
hundred years ago from Scotty Rossi.

(I know how much he likes being called Scotty;-)
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Doing my own geometry

2008-02-07 Thread Scott Rossi
Recently, Chipp Walters wrote:

> You can grab my altLayout manager at:
> 
> http://www.altuit.com/webs/altuit2/altPluginDownload/Downloads.htm
> 
> ... I think I got it a couple
> hundred years ago from Scotty Rossi.

No, I believe that would be Chipp -- any "alt-" thing is part of the vast
empire (altEmpire) that is Altuit.


> (I know how much he likes being called Scotty;-)

I'd rather be called "coach".

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Doing my own geometry

2008-02-07 Thread Scott Rossi
>> ... I think I got it a couple
>> hundred years ago from Scotty Rossi.
> 
> No, I believe that would be Chipp -- any "alt-" thing is part of the vast
> empire (altEmpire) that is Altuit.

I need to read better -- now I see that you (Chipp) were the dude responding
to the geometry thread.

How do you like me lecturing you about your own company? :-)

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Doing my own geometry

2008-02-07 Thread Chipp Walters
eh, no problem coach!
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Doing my own geometry

2008-02-09 Thread Steve Checkley

> Rev uses OS system calls to draw windows, so I'm not sure what wouldn't 
> look right. Some of what I said won't apply if you don't have a native 
> growbox for the user to drag though. You would, in that case, have to 
> roll your own stack resizing handlers. Rev 2.9 has some Leopard 
> compatibility fixes and isn't too far off, so you might be able to save 
> yourself some trouble if you wait a bit.

I'm trying to emulate the look of Automator as it appears in Leopard. Its 
bottom bar contains some controls and is about 22 pixels high. The standard Rev 
growbox is that of a document, which would be something like 16 pixels tall. It 
also has a frame around it, which some Mac apps like Automator don't have.

I'm quite excited about 2.9, but haven't spent too much time trying out the 
beta.

I tried doing my own geometry with the mouseMove set up that you described so 
well in your article. I must admit it was a lot quicker but still not as fast 
as the native geometry manager. Mind you, I do most of my coding on an 800Mhz 
Mac and I am shifting a lot of images, buttons and fields about in order to get 
that perfect UI.

I'll stick with the native geometry manager for the time being as I'm only 
aware of it mucking up in one situation only.

Cheers,


Steve
_
Who's friends with who and co-starred in what?
http://www.searchgamesbox.com/celebrityseparation.shtml___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution