From: jeroen <je...@fo...> - 2003-11-05 14:04:31
|
On Tuesday 04 November 2003 04:13 pm, Mathew Robertson wrote: > > I think its better if we can add some API which can explicitly set the > > focus capability. While we're at it, I think we may also want to > > differentiate between keyboard and mouse focus: > > > > > > 1) With no focus capability, the control never gets focus, period. > > > > 2) With mouse focus capability, the control gets focus only when > > clicked on by the mouse. > > > > 3) With keyboard focus capability, you can navigate focus to the control > > by the keyboard. > > > > 4) With point-to-focus capability moves the focus to a control > > when the mouse moves over it. This is useful for large work-area > > controls like FXText or GLViewer. > > > > 5) Maybe we need wheel focus capability also. > > > > These flags will of course be changable by a new API; so you can always > > change to the desired behavior. > > > > The navigation and mouse handling will have to be changed a bit, but we > > can initialize the focus capability to be the same as what we have now, > > with some changes to some controls (for example, a slider typically does > > not work through keyboad so it would make sense to give it mouse focus > > capability only). > > > > If anyone can see any flaws with this reasoning, please let me know... > > How about allowing parents to define whether their children can be > focus'able. So in the case of FXToolBar, all child widgets inherit their > parents focus policy, so that > > 6) Inherit focus policy from parent > > is a possible mode. This may have an added benefit in that one could > disable the focus to a group of widgets by simply disabling their parent. > > Mathew Mathew, You've never placed text fields and combo boxes into your toolbars? I don't think this is a good idea; there is no precedent for this. - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 07:40 11/ 5/2003 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ |