On 11 Sep 2008, at 5:42 PM, Konrad Hofbauer wrote:

> First, thanks for your detailed reply!
>
> Christiaan Hofman wrote:
>> On 11 Sep 2008, at 4:54 PM, Konrad Hofbauer wrote:
>>
>>> Christiaan Hofman wrote:
>>>> What you ask
>>>> is not really possible using Cocoa outlineviews, at least I cannot
>>>> find any API to supply the initial state of expandable rows.
>>> ... and (at least to me) it is not immediately obvious how/where  
>>> this
>>> information is stored in the PDF file. :(
>>>
>>
>> It's not about storage, that's available, at least on Leopard. It's
>> about telling the view whether the item should be initially expanded
>> or not.
>
> Ahhh ... ok, now I understand.
>
>> It just assumes every item is initially collapsed, and doesn't
>> bother to ask or allows you to override this behavior. This is a
>> limitation of Apple's AppKit API. I've filed an enhancement request
>> with Apple (which, surprise, was promptly marked as a duplicate).
>>
>>> Just as ideas for new features:
>>>
>>> 1)
>>> The "problem" is, that Skim collapses the
>>> outlineview/Table-of-Contents-Tree every time the document is
>>> reloaded.
>>> So after every latex-recompile it is (for a large document) a good
>>> number of clicks to reopen the sub-tree one is interested in and
>>> currently working on ...
>>> Would it be difficult to keep the tree open (if it did not change)?
>>>
>>
>> Preserving the selection is just as problematic as initializing it.
>> And initially just always expand the items is possible, but I don't
>> think a good idea. For a large number of items you quickly lose the
>> overview, I personally hate it.
>
> I agree that expanding ALL is usually too much.
>
>> Note that we do this partially: the
>> root item is opened by default. You could argue if you would like the
>> next level open by default, certainly not more.
>
> The level of expanding could be a thing for a hidden preference?
> But if I understood you above, it is anyhow not (easily) possible  
> given
> the AppKit API, right?
>

Opening to a certain level is possible, but I don't want to do that  
more than what is done now, also no hidden pref.

>> But I have several
>> documents where even expanding the next level is annoying.
>>
>>> 2)
>>> One could think about if auto-expanding the branch of the tree
>>> corresponding to the page that is momentarily displayed would make
>>> sense ...
>>>
>>> Cheers,
>>> /Konrad
>>
>> I don't think so. It has the same problem, in the end all items will
>> be open. And it's annoying if you want to close an item and Skim
>> overrules thyat decision.
>
> Good point.
>
>> A tip: when you option-click an expansion triangle, all child items
>> will be expanded or collapsed as well. So you can quickly open the
>> full table by twice option-clicking the root item. This is a general
>> behavior of Cocoa outline views.
>
> Oh that is helpful! Thanks!
>
>> Anyway, I found a way to do it at least partially. That is, at least
>> the items that should initially be visible will be expanded if  
>> they're
>> supposed to be.
>
> Sorry, this I do not understand right now - so you can modify it?

You can't modify it, it's set in the PDF.

>
> What defines "should initially be visible"?
>
> /Konrad
>

The items that are initially visible after expanding items on higher  
levels (if they should). Take the following outline ("v" means it  
should be expanded, and ">" means it should be collapsed):

v item-1
        > item-1.1
                item-1.1.1
 > item-2
        v item-2.1
                item-2.1.1

Here, initially item-1, item-2, and item-1.1 are visible, while  
item-1.1.1, item-2.1, and item-2.1.1 are not.

In the next release, item-1 will be correctly expanded, as it is  
visible, so you will see:

v item-1
        > item-1.1
 > item-2

However, item-2.1 won't be expanded (when you first expose it), as  
it's not initially visible. There's no way I can see to fix this.  
However, such a situation will probably be exceptional.

Christiaan


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-users

Reply via email to