window in a window

Wilhelm Sanke sanke at hrz.uni-kassel.de
Mon May 2 04:25:37 EDT 2005


On Sun, 01 May 2005 , Bob Hartley <rev at armbase.com> wrote:

> Hi  All.
>
> I have an app that has a toolbar that does things to a window (an
> independent rev file). However, I want to embed this independent window
> into one stack and then save it back out.
>
> EG. Imagine a word processor like MS word without an open document.
> You  have a blank window and a toolbar, call it bobsBlankWindow. Now I 
> want
> to have a rev file to open "within" bobsBlankWindow and then be saved 
> back
> as the rev file when edited.
>
> Is it possible to embed a stack within the area of another stack.
>
> Apart from that, there is the problem of the window focus. if the edit
> stack is clicked upon it would hide the other window behind it. would 
> using
> the systemWindow command work?
>
>
> Sorry to not try it in advance but I'd need to change a lot before doing
> this and I want advice before messing around with it.
>
> cheers
> bob


Hi Bob,

We had a related discussion about "Stacks in Stacks" on the improvement 
list a few days ago.
Below is my contribution to this thread that was received unchallenged 
(meaning nobody reacted directly to my contribution), so I have to guess 
that my proposal may be a viable solution. Here is my post of April 20:

The discussion in this thread has meanwhile moved to having multiple 
viewers and several instances of the same stack being opened 
simultanously or at the same time, meaning my thoughts may seem somewhat 
beside the point when I consider what could be realized *now*.
Apart from Rodneys solution with groups aren't there existing 
possibilities that at least come near to a "viewer-stack" concept?

What about an alternative scenario embedding stacks (one or more) in the 
window of a stack "glued" to the "viewer" stack? Of course some of the 
problems and suggestions discussed in this thread are not answered by 
such a workaround.

Here is the scenario - one of more solutions possible:

Open the "viewer" and at the same time a smaller placeholder stack with 
its bottomright set to the bottomright of the viewer. Open the 
placeholder as "palette" to keep both stacks on top and to allow to work 
with both stacks without the smaller stack disapperaring behind the 
bigger viewer.

Get the windowID of the placeholder and open the stacks you want to show 
in the window of the placeholder. When you open another stack in the 
window of the placeholder, some properties of the placeholder stack are 
transferred to the embedded stack: palette style, empty decorations, 
size etc. - meaning they need not be set.
If you want to display information in the embedded stack that can be 
scrolled, just place a scrolling group the size of the placeholder stack 
on the first card - or any other card the user can navigate to in the 
embedded stack.

In the same way you could "embed" more stacks in different panes of the 
viewer at the same time.--

To create an entity of viewer and embedded stacks (neccessary in case 
you want to move the viewer) set the decorations of the viewer to empty 
and add a "decoration bar" field with a mousemove script that "glues" 
the embedded stacks to the viewer. This is because - as far as I know - 
mousemoves cannot be intercepted by Transcript when you drag a stack via 
the decorations. Or is this possible?

The alwaysbuffer of all stacks should be set to true.

Tested here with a couple of sample stacks. Works fine on WindowsXP and 
can achieve effects like with frames in a browser, but with the added 
functionality of Transcript.

Regards,

Wilhelm Sanke
<http://www.sanke.org/MetaMedia>




More information about the use-livecode mailing list