pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bartlett <cbartlet...@gmail.com>
Subject Re: Tool bar separators?
Date Fri, 10 Sep 2010 19:38:42 GMT
But could the rotation code be part of the Separator component's
paint/layout/'whatever magic happens when painting' code?

paint() {

    if (orientation = VERTICAL) {
        // Swap the width & height values for the purposed of painting
        // ie, 20x100 would be painted horizontally within the bounds of
100x20
    }

    // Draw the component horizontally as normal, but to an image/buffer
rather than the GUI

    if (orientation = VERTICAL) {
        // Rotate and possibly re-align the previously rendered image
    }

    // Paint the image to the GUI
}

On 11 September 2010 02:26, Greg Brown <gkbrown@mac.com> wrote:

> Good idea, but it wouldn't work. Decorators don't change the bounds of a
> component. They only augment its appearance.
>
> On Sep 10, 2010, at 3:22 PM, Chris Bartlett wrote:
>
>
> On 10 September 2010 19:05, Greg Brown <gkbrown@mac.com> wrote:
>
>> I was actually thinking that a new BoxPane.Divider class might be a better
>> way to go. Separator has a "title" property that would be hard to support in
>> a vertical orientation. Divider could simply mirror the orientation of the
>> containing box pane.
>>
>> Is it worth considering using some sort of rotation decorator that would
> rotate a horizontal Separator, including any title property +/- 90 degrees
> to create a vertical one?
>
> Chris
>
>
>
>

Mime
View raw message