John P. Pfost wrote: > In my previous post I forgot that I had another patch in my code that allows > the arrow keys to be used with state keys(ALT, SHIFT, CTRL, etc) to perform > actions other than focus navigation. In Albrecht's examples he used the > state key with other keys, A/B/C/etc, which is how I originally > tested/implemented this patch.
Yes, because this is necessary, if another widget has the focus. And IMHO, this is what shortcuts are designed for. I am now editing the message you are reading. If I press D, then a D is entered in the text, but if I press ALT-D, then the "Datei"-menu (german for File) pops up. > I have not submitted the arrow key patch as of yet, due to the massive work > being done on UTF8 and documentation and I felt the FL_WHEN_CHANGED STR > should be resolved first, one patch at a time for one change. But if they are related, it would be better to have both and decide, which should be done first, or to do one modification in a way that the other can be implemented easier. You can write two different STRs for two different things or patches. > Regarding FL_WHEN_CHANGED. I was attempting to mimic the way the mouse > works, with this button attribute, using short cuts. I thought that the > intention of FL_WHEN_CHANGED was to allow a user to push and hold a button to > start an action which then stops when they released the button. This is > different from a normal or toggle button which would require the user to push/release a button to initiate an action then push/release the button to stop the action. You can do this. Derive your own class, handle() the push event, start a timer, and do something whenever the timer expires (every 0.5 sec. or so). Then, after the release event, stop the timer. > It does not sound like a big difference, but a lot of systems out there > operate in this method. And FLTK does it also. Lool at Fl_Scrollbar for an example. If you push the small arrow buttons, the scrollbar moves, until you release the button. > Just my two cents worth. Thanks for your comments. Every comment is appreciated. Even if my answers may sound negative for you, I hope that they may help. Deriving own widgets may be a hard job for the first time, but if you have done this step, it is much easier to change something, because you can do much more in your own handle() method and not only with the limited design of callbacks. Albrecht _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
