|
From: Sean P. <sea...@ma...> - 2009-05-21 06:45:41
|
[Foster - can you forward to asl-users? I'm not VPNed in].
The layout engine doesn't deal in view systems, it deals in coordinates.
If you have a button that 80x20 then specify that as your size with 4
pixel outsets (don't include the outsets in the size calculation)
The baseline is specified as an offset within the 80 pixels. The
position specified for placement is where the top/left of the 80x20 box
Top Outset
^
|
* <--+---------> Width
|
|
V
Height
(*) Left Outset
What the outsets do, is "flow" into the outsets of a container so the
container will be created large enough to hold the children.
For example, say you have a button in a panel, when you hide the panel
you don't want it to leave the drop shadow of the button behind. If
the outset of the button overhangs the panel, then the panel will gain
an outset large enough to account for the button outset.
Outsets do not effect layout and do not effect placement. The only
thing outsets effect are other outsets.
If an outset collides with a visible entity then an error is reported
to std::cerr in debug builds. You must provide enough spacing /
margins to account for outsets. This is done because a local change is
not what you want in this case, you most likely want to adjust the
spacing globally to readjust the view.
Sean
On May 20, 2009, at 4:32 PM, Foster Brereton wrote:
> The problem is that I'm in a widget implementation that needs the
> widget to
> own the entire rect pertaining to its widget's pixels on the screen-
> including the outsets- otherwise those regions outside the widget's
> rect
> won't be drawn properly. For example when I have a button that is
> 80x20, I
> need the widget to be 88x28 to account for the 4-pixel-per-size
> focus ring.
> This means I need to take into account the total extents of the
> widget, but
> only for measurement; at layout time I need to inset the actual
> widget to
> account for outsets, which is throwing off my baselines.
>
> Blessings,
> Foster
>
>
> On 20/05/09 1:42 PM, "Sean Parent" <sp...@ad...> wrote:
>
>> outsets don't affect layout or placement. They play two roles:
>>
>> For a creating container which lacks a frame, the outset of a child
>> may become part of the outset of the container. This is to make sure
>> that the container is large enough to hold the child.
>>
>> If outsets collide with a visible element, the engine will assert.
>>
>> If your container is creating, it may not be handling it's own outset
>> correctly.
>>
>> Sean
>>
>> On May 20, 2009, at 1:36 PM, Foster Brereton wrote:
>>
>>> I'm trying to place two widgets in a row. One has no vertical
>>> outsets,
>>> another does. Both have baselines. When I place them I set their top
>>> value
>>> to be top(placement) - top_outset, which lines them up correctly
>>> with
>>> respect to each other and their containers, but messes up the
>>> baseline
>>> alignment. When I set their top value to be simply top(placement),
>>> their
>>> baselines match up but they aren't placed properly vertically (e.g.,
>>> the
>>> distance from their top outset to their neighbor's bottom is the
>>> container's
>>> spacing, which is too much.) What am I missing?
>>>
>>> Blessings,
>>> Foster
>>>
>>>
>>> --
>>> Foster T. Brereton <ἰχθύς>< Ro
>>> 3:21-26
>>> Computer Scientist 2 --- Photoshop Engineering --- Adobe Systems
>>> "What 99 percent of programmers need to know is not how to build
>>> components but how to use them." -- Alexander Stepanov
>>>
>>>
>>
>
> --
> Foster T. Brereton <ἰχθύς>< Ro
> 3:21-26
> Computer Scientist 2 --- Photoshop Engineering --- Adobe Systems
> "What 99 percent of programmers need to know is not how to build
> components but how to use them." -- Alexander Stepanov
>
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity
> professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp asthey present alongside digital heavyweights like
> Barbarian
> Group, R/GA, & Big Spaceship. http://www.creativitycat.com
> _______________________________________________
> Adobe-source-devel mailing list
> Ado...@li...
> https://lists.sourceforge.net/lists/listinfo/adobe-source-devel
|