[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

RE: [XaraXtreme-dev] Galleries and focus handling

> I think it's just the same old hack with the controls that 
> Luke did to make bar stuff work, isn't it? IE if a /control/ 
> has focus, and it's not one which we think is interested in 
> keys, pass the key to the main frame. This means we can't 
> (say) use the space-bar to toggle a check-box (I presume) as 
> they are not on Luke's list.

I think this is broadly what Windows version does anyway. i.e. you can
copy / paste text in fields on dialogs, and undo edits, as you'd expect.
It's just that we transfer focus back to the main app whenever possible.

So this means you can't give focus to a control that doesn't absolutely
need it. So check boxes etc are example that can't be keyboard driven.

There's one dialog where we get this completely wrong, the align dialog,
where it's not correctly returning focus back to the main app. As a
result all your main app key short cuts stops working if you have
touched the align dialog - which I, and many moaning customers, have
found to be infuriating. i.e. you can change your alignment, but can't
then do a Ctrl-Z to undo it. Clearly that is wrong.

It is a difficult issue.  Take the example of sliders. These can have
the concept of having focus, and on Windows and perhaps other OSes these
can then be keyboard driven. But the price for this 'flexibility' is too
high. The last thing you'd want is to adjust a slider, and then find
that your arrow keys no longer moves objects on the page or that Ctrl-Z
stops working.

(In the case of mouse wheel events some good apps get this right, in
that they do not have the concept of focus, but do intelligently send
the events to the right control, so that scrolling over a slider will do
what you'd expect (adjust the slider, not scroll the page). Scroll bars
are a perfect example, you can and should be able to move over a scroll
bar an wheel to move it without having to click it. (and the galleries
are an example where this presently does not work in LX but does work in
Xara Xtreme. i.e. you wheel over a gallery and to scroll the gallery,
wheel over the page and it scrolls the page and no clicks are

Presently it's quite easy for galleries. They do not have any need for
focus. They should never have it and it should not be possible to
highlight their title bars. The same really should apply to all
non-modal dialogs, with the exception where these an editable fields and
they've clicked in it. Galleries have no editable fields, so shouldn't
be a problem. In the case of non-modal dialog that do have fields then
press Enter must return focus back to the main canvas.

But it's possible there may be a time where galleries may need focus
(e.g. the concept of selected layer) and then we have a major problem
because there are conflicting demands on key short cuts.

> I don't think galleries themselves are particularly interested in 
> any keyboard shortcuts, are they?


> Note that a gallery is really just a dialog. There should be 
> no special keyboard handling required for galleries that is 
> different to other dialogs or bars (as far as I can see). 
> Info bars and long lived dialogs seem to me to present 
> exactly the same problem space.

Well galleries can presently get focus and that's wrong because they
have no need to ever have focus. And that's what's causing the current
gallery problems I suspect.