Re: [Etoile-cvs] r5106 - in /trunk/Etoile/Frameworks/EtoileUI: Headers/ETSlideshowLayout.h Source/ETSlideshowLayout.m

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: [Etoile-cvs] r5106 - in /trunk/Etoile/Frameworks/EtoileUI: Headers/ETSlideshowLayout.h Source/ETSlideshowLayout.m

by Quentin Mathé-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey Eric,

Le 11 août 09 à 20:11, Eric Wasylishen a écrit :

> Author: ericwa
> Date: Tue Aug 11 20:11:51 2009
> New Revision: 5106
>
> URL: http://svn.gna.org/viewcvs/etoile?rev=5106&view=rev
> Log:
> Added an experimental 'slideshow' layout, which displays one layout  
> item at a time, stretched to fit the available space.
>
> Added:
>    trunk/Etoile/Frameworks/EtoileUI/Headers/ETSlideshowLayout.h
>      - copied, changed from r5089, trunk/Etoile/Frameworks/EtoileUI/
> Headers/ETLineLayout.h
>    trunk/Etoile/Frameworks/EtoileUI/Source/ETSlideshowLayout.m
>      - copied, changed from r5089, trunk/Etoile/Frameworks/EtoileUI/
> Source/ETLineLayout.m


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.
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;
}

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.

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

Cheers,
Quentin.


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

Re: [Etoile-cvs] r5106 - in /trunk/Etoile/Frameworks/EtoileUI: Headers/ETSlideshowLayout.h Source/ETSlideshowLayout.m

by Eric Wasylishen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
https://mail.gna.org/listinfo/etoile-dev