Hey Quentin,

The slideshow layout is a nice idea… :-)
However ETPaneLayout already provides almost all you need. A slideshow is just a pane-like layout with a navigation bar that can be visible or not.

Ah, this didn't occur to me  :)

ETPaneLayout still a bit rough and miss some methods but it should now be usable (since July). I think you don't even need a subclass. My idea was to add several factory methods to ETPaneLayout like +slideshowLayout, +drillDownLayout, +paneNavigationLayout, +wizardLayout etc. that return a pane layout configured in a special way.

+ slideshowLayout
{
ETPaneLayout *layout = [self layout]; // self is ETPaneLayout class here
        // This method isn't yet implemented though
        [layout setBarVisible: NO];
        return layout;
}

A variant with back/forward/etc. buttons would be like:

+ slideshowLayoutWithNavigationbar
{
        ETPaneLayout *layout = [self layout];
        [[layout barItem] setLayout: [ETLineLayout layout]];
[[layout barItem] addItem: [itemFactory buttonWithTitle: _(@"Back") target: layout action: @selector(goBack:)]; [[layout barItem] addItem: [itemFactory buttonWithTitle: _(@"Forward") target: layout action: @selector(goForward:)]; // More buttons could be added and the bar position (left, top, down, bottom) controlled with -setBarPosition: // Take note -setBarPosition: exists but only 'top' is supported (the missing implementation is in the -tile method)
        return layout;
}


Sounds good. I'll try ETPaneLayout and try to implement some of these factory methods.

I was just about to ask what I should do with the code I wrote for preserving the aspect ratio of the displayed "slide" when I noticed the ETContentAspect type, so I will look at that too. :)


As a side note, to sublass ETComputedLayout to present a single item isn't a good idea and make everything a lot more complex than it ought to be.

Okay, that makes sense.

You'll probably encounter bugs or limitations with ETPaneLayout though. Just tell me and I'll help you to fix them quickly :-)

Cheers,
Quentin.


Thanks!
Eric

_______________________________________________
Etoile-dev mailing list
Etoile-dev@gna.org
https://mail.gna.org/listinfo/etoile-dev

Reply via email to