Docking Stacks
zryip theSlug
zryip.theslug at gmail.com
Tue Mar 2 17:32:27 EST 2010
2010/3/2 Andrew Kluthe <andrew at rjdfarm.com>:
>
> I searched around and haven't really found anything about interactions
> between multiple stacks similar to docking.
>
> The Problem: I have 4 stacks That I want to dock to the edges of each other
> (open on the edge, snap to the edge, etc).
>
> 1. Two of the stacks are menu stacks on either side of the larger main
> stack:
>
> One of these is used a menu to navigate the different aspects of the app.
> The other is used to display a report list depending on the selection in the
> menu stack.
>
> 2. A stack on the bottom to continually display help information.
>
> 3. The main stack is in the middle of all of this and the others need to
> snap/dock/open on the edge of this stack.
>
> [Menu stack][----MAIN STACK----][Reports Stack]
> [----------Help Stack---------------]
>
>
> Any ideas on how to start adding this functionality?
>
>
Hi Andrew,
In my color picker projects I'm using a send message in time form to
"dock" the picker at the bottom of the RR tools palette
on preopenCard
scanForRevToolsEvent
end preopenCard
constant kRevToolsPalette = "RevTools"
command scanForRevToolsEvent pToolsRect, pVisibility, pMode, pTool
local tTheCurrenctRect, tTheCurrentVisibility, tCurrentMode, tCurrentTool
put the rect of stack kRevToolsPalette into tTheCurrenctRect
put the visible of stack kRevToolsPalette into tTheCurrentVisibility
put the mode of stack kRevToolsPalette into tCurrentMode
put the tool into tCurrentTool
if (there is no stack "pickerDragControl") then
switch
case (tTheCurrenctRect is not pToolsRect) -- The tool palette
change of rect or loc
set the topLeft of this stack to the bottomLeft of stack
kRevToolsPalette
go to this stack
break
case (tTheCurrentVisibility is not pVisibility) -- The
visibility of the tool palette has changed
set the visible of this stack to tTheCurrentVisibility
break
case (tCurrentMode is not pMode) -- The tools palette has
been closed or opened
set the visible of this stack to (pMode is 0)
break
case (tCurrentTool is not pTool) -- the tool has changed
go to this stack
break
end switch
end if
send "scanForRevToolsEvent
tTheCurrenctRect,tTheCurrentVisibility,tCurrentMode,tCurrentTool" to
me in 100 milliseconds
end scanForRevToolsEvent
In case of some of this code could be useful for you.
Regards,
--
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
More information about the use-livecode
mailing list